Hugging Face MCP Server
Official Hugging Face MCP server. Search models, datasets, Spaces, papers, and docs, and run community Gradio apps as tools from any MCP client.
The Hugging Face MCP Server is the official server hosted by Hugging Face at https://huggingface.co/mcp. It connects MCP-compatible AI assistants (Claude Desktop, Cursor, VS Code, Zed, Gemini CLI, Codex, ChatGPT) directly to the Hugging Face Hub, exposing models, datasets, Spaces, papers, and documentation as tools the assistant can call from inside the editor or chat.
Beyond search, the server can run and manage Jobs on Hugging Face infrastructure, fetch detailed repository info (including READMEs), and act as a gateway to thousands of community Gradio Spaces that expose themselves as MCP tools. Users pick which built-in tools and Spaces to enable from their account at https://huggingface.co/settings/mcp, and the page generates the exact config snippet for their client.
The implementation is also open source at huggingface/hf-mcp-server and can be self-hosted via npx @llmindset/hf-mcp-server or the ghcr.io/evalstate/hf-mcp-server Docker image, with support for STDIO, Streamable HTTP, and JSON-RPC transports.
Tools
| Tool | Description |
|---|---|
Spaces Semantic Search |
Find AI apps on Hugging Face Spaces via natural language queries. |
Papers Semantic Search |
Find ML research papers via natural language queries. |
Model Search |
Search for ML models with filters for task, library, author, tags, and more. |
Dataset Search |
Search for datasets with filters for author, tags, and more. |
Documentation Semantic Search |
Search Hugging Face documentation in natural language for guides, API references, and tutorials across all HF libraries. |
Run and Manage Jobs |
Run, monitor, and schedule jobs on Hugging Face infrastructure. |
Hub Repository Details |
Get detailed information about a Model, Dataset, or Space, optionally including the repository README. |
Gradio Space tools |
Dynamically loaded tools from MCP-compatible Gradio Spaces the user has enabled in their MCP settings. |
Authenticate |
Optional OAuth challenge tool, enabled via the AUTHENTICATE_TOOL setting on self-hosted deployments. |
Hosted setup (recommended)
The server is hosted at https://huggingface.co/mcp. Get a token from https://huggingface.co/settings/tokens and configure your client.
Claude Desktop / claude.ai
Add the "Hugging Face" connector from https://claude.ai/settings/connectors.
Claude Code
claude mcp add hf-mcp-server -t http https://huggingface.co/mcp \
-H "Authorization: Bearer <YOUR_HF_TOKEN>"
Or use OAuth login:
claude mcp add hf-mcp-server -t http https://huggingface.co/mcp?login
Cursor / VS Code (mcp.json)
{
"mcpServers": {
"huggingface": {
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer <YOUR_HF_TOKEN>"
}
}
}
}
Gemini CLI
gemini mcp add -t http huggingface https://huggingface.co/mcp?login
After connecting, manage which built-in tools and Spaces are exposed at https://huggingface.co/settings/mcp.
Self-hosted (optional)
Run locally via npm:
npx @llmindset/hf-mcp-server # STDIO
npx @llmindset/hf-mcp-server-http # Streamable HTTP
npx @llmindset/hf-mcp-server-json # JSON-RPC
Or Docker:
docker run --rm -p 3000:3000 -e DEFAULT_HF_TOKEN=hf_xxx \
ghcr.io/evalstate/hf-mcp-server:latest
Endpoint: http://localhost:3000/mcp. Management UI at http://localhost:3000/.
- Find the best open-source model for a task: "Search Hugging Face models for Qwen 3 quantizations under 8B params."
- Discover datasets to fine-tune on: "Show datasets about weather time-series with permissive licenses."
- Research literature: "Find papers about vision-language models from the last 6 months."
- Pull docs into the editor: "How do I use LoRA adapters with PEFT?" (Documentation Semantic Search returns the relevant guide).
- Call community AI apps as tools: enable a transcription or image-generation Space and have the assistant invoke it inline.
- Trigger training or eval runs on HF infrastructure via the Jobs tool.
- "Search Hugging Face models for Llama 3 fine-tunes optimized for code."
- "Find a Space that can transcribe audio files and run it on this URL."
- "Show me the top 10 datasets tagged 'medical' sorted by downloads."
- "Look up the README and license for the repo
mistralai/Mistral-7B-Instruct-v0.3." - "Find recent papers about diffusion model distillation and summarize the top three."
- Official, maintained by Hugging Face, with a hosted endpoint so no self-hosting required.
- Covers the entire Hub: models, datasets, Spaces, papers, and docs in one server.
- Bridges to thousands of community Gradio Spaces as MCP tools, so capabilities grow without code changes.
- Open source (
huggingface/hf-mcp-server) with STDIO, Streamable HTTP, and JSON-RPC transports for self-hosting.
- Requires a Hugging Face account and access token for most useful operations (Jobs, private repos, rate limits).
- Tool granularity is broad: complex filtering still depends on natural-language queries hitting the right semantic index.
- Dynamic Spaces and MCP-UI options are marked experimental and may change.
evalstate/mcp-hfspace: community MCP server focused on calling Hugging Face Spaces from Claude Desktop.shreyaskarnik/huggingface-mcp-server: community server providing read-only access to Hub APIs (models, datasets, Spaces, papers, collections).- Replicate or OpenRouter MCP servers for similar model-discovery and inference workflows outside the HF ecosystem.