Home / MCP / Hugging Face MCP Server
Provides read-only access to Hugging Face Hub data via MCP for models, datasets, spaces, papers, and collections.
Configuration
View docs{
"mcpServers": {
"huggingface": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/huggingface-mcp-server",
"run",
"huggingface_mcp_server.py"
],
"env": {
"HF_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}You can access Hugging Face Hub resources through a dedicated MCP server that provides read-only interactions with models, datasets, spaces, papers, and collections. This enables LLMs to query and summarize Hugging Face content efficiently and securely.
To use this MCP server, run it in your environment and connect your MCP client to it. You will be able to search models, datasets, spaces, and papers, retrieve detailed information, and invoke prompts that compare models or summarize papers. Each tool is designed to help you discover relevant artifacts on Hugging Face and extract structured information for downstream tasks.
Prerequisites: you need Node.js and a Python runtime available on your system. You will also use a command-line tool to run the MCP server locally.
Install and run the MCP server using the recommended local setup. The following steps show how to run the server with a local runtime instead of a remote endpoint.
{
"mcpServers": {
"huggingface": {
"type": "stdio",
"name": "huggingface",
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/huggingface-mcp-server",
"run",
"huggingface_mcp_server.py"
],
"env": {
"HF_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}Optional authentication with Hugging Face can improve API rate limits and access to private repositories if you have the proper permissions. You can supply your token via the HF_TOKEN environment variable when starting the server.
If you encounter issues, check logs and ensure you have internet connectivity. For debugging, you can use an inspector tool to trace the MCP interactions.
Search models with filters for query, author, tags, and limit
Get detailed information about a specific model
Search datasets with filters
Get detailed information about a specific dataset
Search Spaces with filters including SDK type
Get detailed information about a specific Space
Get information about a paper and its implementations
Get the list of curated daily papers
Search collections with various filters
Get detailed information about a specific collection
Prompt template that generates a comparison between multiple Hugging Face models using provided model_ids
Prompt template that summarizes a Hugging Face paper identified by arxiv_id with optional detail level