-
Notifications
You must be signed in to change notification settings - Fork 374
[Documentation] HF MCP Server #1938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
48d4d70
[Documentation] HF MCP Server
Vaibhavs10 615fe30
up.
Vaibhavs10 86e52bc
reorganise + add images.
Vaibhavs10 f5fa5a8
Apply suggestions from code review
Vaibhavs10 f7ba29a
review.
Vaibhavs10 8e9cd8b
review + last edits.
Vaibhavs10 dc6f489
Update docs/hub/hf-mcp-server.md
Vaibhavs10 5dae728
last edits.
Vaibhavs10 043a9d8
Update docs/hub/hf-mcp-server.md
Vaibhavs10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Hugging Face MCP Server | ||
|
|
||
| The Hugging Face MCP (Model Context Protocol) Server connects your MCP‑compatible AI assistant (for example Codex, Cursor, VS Code extensions, Zed, ChatGPT 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. | ||
|
|
||
| ## What you can do | ||
|
|
||
| - Search and explore Hub resources: models, datasets, Spaces, and papers. | ||
| - Run community tools via MCP‑compatible Gradio apps hosted on [Spaces](https://hf.co/spaces). | ||
| - Bring results back into your assistant with metadata, links, and context. | ||
|
|
||
| ## 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 Cursor, VS Code, 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. | ||
Vaibhavs10 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <Tip> | ||
|
|
||
| The settings page generates the exact configuration your client expects. Use it rather than writing config by hand. | ||
Vaibhavs10 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| </Tip> | ||
|
|
||
|  | ||
|
|
||
| ## Using the server | ||
|
|
||
| After connecting, ask your assistant to use the Hugging Face tools. Example prompts: | ||
|
|
||
| - “Search Hugging Face models for Qwen 3 Quantizatizations.” | ||
| - “Find a Space that can transcribe audio files.” | ||
| - “Show datasets about weather time‑series.” | ||
| - “Create a 1024 x 1024 image of a cat anime style.” | ||
Vaibhavs10 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 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. | ||
|
|
||
|  | ||
|
|
||
| ## Add community tools (Spaces) | ||
|
|
||
| You can extend your setup with MCP‑compatible Gradio spaces built by the community: | ||
|
|
||
| - Explore Spaces with MCP support [here](https://huggingface.co/spaces?filter=mcp-server). | ||
| - Add the relevant space in your MCP settings on Hugging Face [here](https://huggingface.co/settings/mcp). | ||
|
|
||
| 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 | ||
|
|
||
| - Settings and client setup: https://huggingface.co/settings/mcp | ||
| - Changelog announcement: https://huggingface.co/changelog/hf-mcp-server | ||
| - Hugging Face MCP Server: https://huggingface.co/mcp | ||
| - Build your own MCP Server with Gradio Spaces: https://www.gradio.app/guides/building-mcp-server-with-gradio | ||
|
|
||
Vaibhavs10 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.