Hugging Face MCP Server
Allows retrieval and summarization of research papers using arXiv IDs, with features to control summary detail level and access implementation details.
Enables searching for Gradio spaces on Hugging Face, specifically mentioned as part of the Space Tools for finding popular Gradio spaces for various applications.
Provides read-only access to Hugging Face Hub APIs, allowing interaction with models, datasets, spaces, papers, and collections. Includes tools for searching and retrieving detailed information across these resource types.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hugging Face MCP Server search for text classification datasets with over 10k samples"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🤗 Hugging Face MCP Server 🤗
A Model Context Protocol (MCP) server that provides read-only access to the Hugging Face Hub APIs. This server allows LLMs like Claude to interact with Hugging Face's models, datasets, spaces, papers, and collections.
Components
Resources
The server exposes popular Hugging Face resources:
Custom
hf://URI scheme for accessing resourcesModels with
hf://model/{model_id}URIsDatasets with
hf://dataset/{dataset_id}URIsSpaces with
hf://space/{space_id}URIsAll resources have descriptive names and JSON content type
Prompts
The server provides two prompt templates:
compare-models: Generates a comparison between multiple Hugging Face modelsRequired
model_idsargument (comma-separated model IDs)Retrieves model details and formats them for comparison
summarize-paper: Summarizes a research paper from Hugging FaceRequired
arxiv_idargument for paper identificationOptional
detail_levelargument (brief/detailed) to control summary depthCombines paper metadata with implementation details
Tools
The server implements several tool categories:
Model Tools
search-models: Search models with filters for query, author, tags, and limitget-model-info: Get detailed information about a specific model
Dataset Tools
search-datasets: Search datasets with filtersget-dataset-info: Get detailed information about a specific dataset
Space Tools
search-spaces: Search Spaces with filters including SDK typeget-space-info: Get detailed information about a specific Space
Paper Tools
get-paper-info: Get information about a paper and its implementationsget-daily-papers: Get the list of curated daily papers
Collection Tools
search-collections: Search collections with various filtersget-collection-info: Get detailed information about a specific collection
Related MCP server: UIThub MCP Server
Configuration
The server does not require configuration, but supports optional Hugging Face authentication:
Set
HF_TOKENenvironment variable with your Hugging Face API token for:Higher API rate limits
Access to private repositories (if authorized)
Improved reliability for high-volume requests
Quickstart
Install
Installing via Smithery
To install huggingface-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @shreyaskarnik/huggingface-mcp-server --client claudeClaude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"huggingface": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/huggingface-mcp-server",
"run",
"huggingface_mcp_server.py"
],
"env": {
"HF_TOKEN": "your_token_here" // Optional
}
}
}Development
Building and Publishing
To prepare the package for distribution:
Sync dependencies and update lockfile:
uv syncBuild package distributions:
uv buildThis will create source and wheel distributions in the dist/ directory.
Publish to PyPI:
uv publishNote: You'll need to set PyPI credentials via environment variables or command flags:
Token:
--tokenorUV_PUBLISH_TOKENOr username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /path/to/huggingface-mcp-server run huggingface_mcp_server.pyUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Example Prompts for Claude
When using this server with Claude, try these example prompts:
"Search for BERT models on Hugging Face with less than 100 million parameters"
"Find the most popular datasets for text classification on Hugging Face"
"What are today's featured AI research papers on Hugging Face?"
"Summarize the paper with arXiv ID 2307.09288 using the Hugging Face MCP server"
"Compare the Llama-3-8B and Mistral-7B models from Hugging Face"
"Show me the most popular Gradio spaces for image generation"
"Find collections created by TheBloke that include Mixtral models"
Troubleshooting
If you encounter issues with the server:
Check server logs in Claude Desktop:
macOS:
~/Library/Logs/Claude/mcp-server-huggingface.logWindows:
%APPDATA%\Claude\logs\mcp-server-huggingface.log
For API rate limiting errors, consider adding a Hugging Face API token
Make sure your machine has internet connectivity to reach the Hugging Face API
If a particular tool is failing, try accessing the same data through the Hugging Face website to verify it exists
Available Tools
10 toolsget-collection-infoC
Get detailed information about a specific collection
Inputs: namespace (required), collection_id (required).
get-daily-papersB
Get the list of daily papers curated by Hugging Face
Inputs: no named parameters.
get-dataset-infoC
Get detailed information about a specific dataset
Inputs: dataset_id (required).
get-model-infoB
Get detailed information about a specific model
Inputs: model_id (required).
get-paper-infoC
Get information about a specific paper on Hugging Face
Inputs: arxiv_id (required).
get-space-infoC
Get detailed information about a specific Space
Inputs: space_id (required).
search-collectionsC
Search for collections on Hugging Face Hub
Inputs: owner, item, query, limit.
search-datasetsC
Search for datasets on Hugging Face Hub
Inputs: query, author, tags, limit.
search-modelsC
Search for models on Hugging Face Hub
Inputs: query, author, tags, limit.
search-spacesC
Search for Spaces on Hugging Face Hub
Inputs: query, author, tags, sdk, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Every tool has a clearly distinct purpose with no ambiguity. The tools are cleanly separated into 'get-info' operations for specific resources (collections, daily papers, datasets, models, papers, spaces) and 'search' operations for those same resource types, making it easy for an agent to select the right tool based on whether it needs detailed information about a known item or wants to search for items.
The tool names follow a perfectly consistent verb_noun pattern throughout. All tools use either 'get-[resource]-info' or 'search-[resource]s' with consistent hyphenation and pluralization, making the naming highly predictable and readable.
With 10 tools, this is well-scoped for a Hugging Face Hub server. The count is appropriate as it covers multiple resource types (collections, papers, datasets, models, spaces) with both info retrieval and search capabilities, ensuring each tool earns its place without being overwhelming.
The tool surface is nearly complete for browsing and searching the Hugging Face Hub, covering key resources with both info and search operations. A minor gap is the lack of tools for interacting with resources (e.g., downloading models/datasets or running spaces), but for a read-only browsing server, it provides excellent coverage.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.ISC
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that enables Claude to retrieve and analyze code from GitHub repositories through the uithub API.21MIT
- FlicenseBqualityDmaintenanceA Python-based Model Context Protocol server that integrates with Claude Desktop, allowing users to connect to Hubble API services by configuring the server with their Hubble API key.7-
- AlicenseNot gradedqualityDmaintenanceAn unofficial MCP server that provides semantic search capabilities for Hugging Face models and datasets, enabling Claude and other MCP-compatible clients to search, discover, and explore the Hugging Face ecosystem using natural language queries.20MIT
Appeared in Searches
- A server for finding papers in PubMed
- Using Google Scholar for Conducting Deep and Critical Literature Reviews
- A resource for finding scholarly articles and publications
- A server for finding, reading, and summarizing arXiv research papers
- A tool for finding academic papers using semantic search and citation analysis