Hugging Face MCP Server
Official Hugging Face MCP Server that connects AI assistants directly to the Hugging Face Hub ecosystem. Provides tools for searching and retrieving models, datasets, and research papers, running inference on thousands of Gradio-powered AI applications (Spaces), and accessing the full Hub API. Supports remote HTTP-streaming via https://huggingface.co/mcp with OAuth or Bearer token auth, as well as local stdio deployment. Works with Claude, Gemini CLI, VS Code, Cursor, and any MCP-compatible client.
Connect
Add this configuration to .claude/mcp.json
{
"mcpServers": {
"huggingface": {
"url": "https://github.com/huggingface/hf-mcp-server",
"env": {
"HF_TOKEN": "<YOUR_HF_TOKEN>"
}
}
}
}Tools (6)
search_models
Search the Hugging Face Hub for models by task, library, language, or free-text query. Returns model IDs, download counts, and metadata.
{
"type": "object",
"required": [
"query"
],
"properties": {
"task": {
"type": "string",
"description": "Filter by ML task (e.g. text-generation, image-classification)"
},
"limit": {
"type": "integer",
"description": "Maximum number of results (default 10)"
},
"query": {
"type": "string",
"description": "Search query (e.g. \"text classification\", \"llama\", \"whisper\")"
},
"library": {
"type": "string",
"description": "Filter by framework (e.g. transformers, diffusers)"
},
"language": {
"type": "string",
"description": "Filter by language code (e.g. en, fr, zh)"
}
}
}get_model
Retrieve detailed information about a specific Hugging Face model including its model card, tags, pipeline tag, and download statistics.
{
"type": "object",
"required": [
"modelId"
],
"properties": {
"modelId": {
"type": "string",
"description": "Model ID in the format \"owner/model-name\" (e.g. \"meta-llama/Llama-3.1-8B\")"
}
}
}search_datasets
Search the Hugging Face Hub for datasets by task, modality, or keyword.
{
"type": "object",
"required": [
"query"
],
"properties": {
"task": {
"type": "string",
"description": "Filter by task category"
},
"limit": {
"type": "integer",
"description": "Maximum number of results (default 10)"
},
"query": {
"type": "string",
"description": "Search query"
}
}
}search_papers
Search Hugging Face Papers (daily ML paper summaries) by keyword or topic. Returns paper titles, abstracts, and links to associated models.
{
"type": "object",
"required": [
"query"
],
"properties": {
"limit": {
"type": "integer",
"description": "Maximum number of results (default 10)"
},
"query": {
"type": "string",
"description": "Search query (e.g. \"mixture of experts\", \"RLHF\")"
}
}
}run_inference
Run inference on a Hugging Face model using the Inference API. Supports text generation, classification, embeddings, image generation, and more.
{
"type": "object",
"required": [
"modelId",
"inputs"
],
"properties": {
"inputs": {
"type": "string",
"description": "Input text, prompt, or data for the model"
},
"modelId": {
"type": "string",
"description": "Model ID to run inference on"
},
"parameters": {
"type": "object",
"description": "Optional model-specific parameters (e.g. max_new_tokens, temperature)"
}
}
}list_spaces
List or search Hugging Face Spaces (Gradio/Streamlit AI applications) by keyword, SDK, or author.
{
"type": "object",
"properties": {
"sdk": {
"type": "string",
"description": "Filter by SDK (gradio, streamlit, docker)"
},
"limit": {
"type": "integer",
"description": "Maximum number of results (default 10)"
},
"query": {
"type": "string",
"description": "Search query for spaces"
}
}
}Resources
This server does not expose any resources.
Prompts
This server does not expose any prompts.
Server Information
- License
- Apache-2.0
- Version
- 1.0.0
- Stars
- 1,200
- Last Updated
- May 31, 2026