Hugging Face MCP Server

The Hugging Face MCP (Model Context Protocol) Server connects your MCP‑compatible AI assistant (for example VS Code, Cursor, Zed, or Claude Desktop) directly to the Hugging Face Hub. Once connected, your assistant can search and explore Hub resources and use community tools, all from within your editor, chat or CLI.

The main advanatage of the Hugging Face MCP Server is that it provides a built-in tools for the hub as well as community tools based on Gradio Spaces. As we start to build our own MCP servers, we’ll see that we can use the Hugging Face MCP Server as a reference for our own MCP servers.

What you can do

Built-in tools

The server provides curated tools that work across supported clients:

Get started

  1. Open your MCP settings: visit https://huggingface.co/settings/mcp while logged in.

  2. Pick your client: select your MCP‑compatible client (for example VS Code, Cursor, Zed, Claude Desktop). The page shows client‑specific instructions and a ready‑to‑copy configuration snippet.

  3. Paste and restart: copy the snippet into your client’s MCP configuration, save, and restart/reload the client. You should see “Hugging Face” (or similar) listed as a connected MCP server in your client.

The settings page generates the exact configuration your client expects. Use it rather than writing config by hand.

MCP Settings Example

Using the server

After connecting, ask your assistant to use the Hugging Face tools. Example prompts:

Your assistant will call MCP tools exposed by the Hugging Face MCP Server (including Spaces) and return results (titles, owners, downloads, links, and so on). You can then open the resource on the Hub or continue iterating in the same chat.

HF MCP with Spaces in VS Code

Add community tools (Spaces)

You can extend your setup with MCP‑compatible Gradio Spaces built by the community:

Gradio MCP apps expose their functions as tools (with arguments and descriptions) so your assistant can call them directly. Please, restart or refresh your client so it picks up new tools you add.

Learn more

< > Update on GitHub