🤗 Hugging Face MCP Server 🤗
Overview
The Hugging Face MCP Server is a Model Context Protocol server that provides read-only access to the Hugging Face Hub APIs, enabling large language models (LLMs) like Claude to interact with Hugging Face's models, datasets, spaces, papers, and collections.
To use the server, install it via Smithery and configure it with an optional Hugging Face API token for enhanced access. You can then send prompts to interact with various Hugging Face resources.
- Custom
hf://URI scheme for accessing models, datasets, and spaces. - Prompt templates for comparing models and summarizing research papers. - Tools for searching and retrieving detailed information about models, datasets, spaces, and papers.
- Comparing multiple Hugging Face models based on specific criteria.
- Summarizing research papers for quick insights.
- Searching for datasets and models relevant to specific tasks or queries.
Add to your AI client
Use these steps to connect 🤗 Hugging Face MCP Server 🤗 in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"huggingface-mcp-server-shreyaskarnik": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-huggingface-mcp-server-shreyaskarnik"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"huggingface-mcp-server-shreyaskarnik": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-huggingface-mcp-server-shreyaskarnik"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"huggingface-mcp-server-shreyaskarnik": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-huggingface-mcp-server-shreyaskarnik"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"huggingface-mcp-server-shreyaskarnik": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-huggingface-mcp-server-shreyaskarnik"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"huggingface-mcp-server-shreyaskarnik": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-huggingface-mcp-server-shreyaskarnik"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"huggingface-mcp-server-shreyaskarnik": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-huggingface-mcp-server-shreyaskarnik"
]
}
}
}FAQ
Can I access private models and datasets?
Yes, with a valid Hugging Face API token, you can access private resources.
Is there a limit on API requests?
Yes, using an API token increases your rate limits, but there are still limits based on your account type.
How do I troubleshoot issues with the server?
Check the server logs for errors and ensure your internet connection is stable.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3491,"uuid":"d37f6d81-7dc6-40d2-a3dd-53c24cae6599","name":"huggingface-mcp-server","title":"🤗 Hugging Face MCP Server 🤗","description":"","avatar_url":"https://avatars.githubusercontent.com/u/311217?v=4","created_at":"$D2025-03-19T20:37:19.467Z","updated_at":"$D2025-03-19T21:19:16.926Z","status":"created","author_name":"shreyaskarnik","author_avatar_url":"https://avatars.githubusercontent.com/u/311217?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/shreyaskarnik/huggingface-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/bef9d66a7cbb50a0eaf9eb2e03245bb0fcf0aac43dec7411de89aa69cc3be4a2/68747470733a2f2f736d6974686572792e61692f62616467652f40736872657961736b61726e696b2f68756767696e67666163652d6d63702d736572766572","type":null,"metadata":"{\"star\":\"1\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-19 16:25:13\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]