HuggingFace MCP Server
HuggingFace MCP server provides AI assistants with access to the model hub — search 1M+ models, discover datasets, explore Spaces, read papers, and fetch documentation directly through MCP.
Overview
The HuggingFace MCP Server is the official Model Context Protocol integration for the HuggingFace Hub — the world's largest collection of machine learning models, datasets, and demos. It lets AI assistants search and discover models, explore datasets, browse Spaces, read ML papers, and fetch up-to-date documentation without leaving the conversation.
Official Verified Server:
Developed and maintained by HuggingFace. Verified on Smithery. Available as a remote MCP server with OAuth authentication.
Key Features
Model Discovery
Search 1M+ models by task, framework, license, and popularity with detailed metadata
Dataset Explorer
Find and inspect datasets across NLP, vision, audio, tabular, and multimodal domains
Spaces Discovery
Explore interactive ML demos and applications deployed as HuggingFace Spaces
Research Papers
Search daily ML papers, filter by upvotes, and access paper details with citations
Documentation Search
Search and fetch HuggingFace library docs (Transformers, Diffusers, Datasets, PEFT) live
Image Generation
Generate images directly through hosted Spaces using Gradio-powered models
Available Tools
Quick Reference
| Tool | Purpose | Category |
|---|---|---|
hub_repo_search | Search models, datasets, and Spaces | Discovery |
hub_repo_details | Get full metadata for any HF repository | Discovery |
model_search | Search specifically for models by task | Models |
dataset_search | Search specifically for datasets | Datasets |
paper_search | Search daily ML papers with filters | Research |
space_search | Search interactive demos and apps | Spaces |
hf_doc_search | Search HuggingFace library documentation | Docs |
hf_doc_fetch | Fetch specific documentation pages | Docs |
hf_whoami | Check authenticated user identity | Auth |
Detailed Usage
hub_repo_search▶
Search across models, datasets, and Spaces with filters for task type, framework, license, and sort order.
{
"query": "text-to-image diffusion model",
"type": "model",
"task": "text-to-image",
"sort": "likes",
"limit": 10
}
hub_repo_details▶
Get full metadata for a specific repository including README, model card, tags, downloads, and files.
{
"repoId": "meta-llama/Llama-3.1-8B-Instruct"
}
paper_search▶
Search the daily AI/ML papers feed with filters by date range and minimum upvotes.
{
"query": "mixture of experts",
"dateRange": "lastWeek",
"minUpvotes": 10
}
hf_doc_search▶
Search across HuggingFace library documentation (Transformers, Diffusers, Datasets, PEFT, TRL) for up-to-date API references and guides.
{
"query": "pipeline text generation parameters",
"library": "transformers",
"limit": 5
}
Installation
{
"mcpServers": {
"huggingface": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.huggingface.co"
]
}
}
}
The remote server handles OAuth authentication — you'll be prompted to log in to your HuggingFace account on first use.
HuggingFace Token:
Generate a token at huggingface.co/settings/tokens. A read-only token is sufficient for search and documentation tools. Write access is required for Spaces and image generation.
Example Use Cases
- Model Selection: Ask your AI assistant to find the best open-source LLM for your use case, comparing licenses, context windows, and performance benchmarks
- Research Discovery: Stay current with daily ML papers filtered by your domain of interest
- Documentation Lookup: Fetch exact Transformers or Diffusers API references without leaving your IDE
- Dataset Search: Find training datasets by task, language, and size with licensing details
- Demo Exploration: Discover interactive Spaces for a specific technology to understand capabilities before implementation
Security
- OAuth authentication via HuggingFace account — no API keys in config files
- Read-only tools for search and metadata require no special permissions
- Fine-grained token scopes for write operations (read, write, inference)
- Remote server handles credential management and token refresh
- HTTPS encryption for all communication
Sources
Related Articles
Airbnb MCP Server
Airbnb MCP server provides AI assistants with vacation rental search, property details, and availability information from the world's largest short-term rental marketplace.
Kubernetes MCP Server
Connect your AI assistant to Kubernetes clusters for cluster management, pod inspection, deployment automation, and troubleshooting.
Cloudflare MCP Server
Interact with Cloudflare services using natural language through the Model Context Protocol.