Hugging Face MCP Server
Connects an assistant to the Hugging Face Hub to search and inspect models, datasets and Spaces, and to call Gradio apps hosted on Spaces as tools.
- Maintained by
- Hugging Face
- Hosting
- Hosted endpoint, or run it locally
- Authentication
- API key
- Last checked
Use https://huggingface.co/mcp?login to sign in with OAuth instead of a token; choose which tools and Spaces are exposed at huggingface.co/settings/mcp.
How to connect the Hugging Face MCP server
Pick your AI client and paste the snippet. Swap the YOUR_… placeholders for your own values. New to this? Our guide to how MCP clients and servers fit together explains what each piece does.
Claude Code
claude mcp add --transport http hugging-face https://huggingface.co/mcp \
--header 'Authorization: Bearer YOUR_HF_TOKEN' Claude Desktop and claude.ai
Custom connectors in Claude accept OAuth or no-auth servers only.
This server expects an API key in a header, so use Claude Code,
Cursor or VS Code instead, or the local setup below. Cursor
{
"mcpServers": {
"hugging-face": {
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_HF_TOKEN"
}
}
}
} VS Code
{
"servers": {
"hugging-face": {
"type": "http",
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_HF_TOKEN"
}
}
}
} + − Run it locally instead
Claude Code
claude mcp add --env HF_TOKEN=YOUR_HF_TOKEN --transport stdio hugging-face \
-- npx @llmindset/hf-mcp-server Claude Desktop
{
"mcpServers": {
"hugging-face": {
"command": "npx",
"args": [
"@llmindset/hf-mcp-server"
],
"env": {
"HF_TOKEN": "YOUR_HF_TOKEN"
}
}
}
} Fully quit and reopen Claude Desktop after saving.
Full Claude Desktop setup guide →Cursor
{
"mcpServers": {
"hugging-face": {
"command": "npx",
"args": [
"@llmindset/hf-mcp-server"
],
"env": {
"HF_TOKEN": "YOUR_HF_TOKEN"
}
}
}
} VS Code
{
"servers": {
"hugging-face": {
"type": "stdio",
"command": "npx",
"args": [
"@llmindset/hf-mcp-server"
],
"env": {
"HF_TOKEN": "YOUR_HF_TOKEN"
}
}
}
} Frequently asked questions
What is the Hugging Face MCP server?
It is a Model Context Protocol (MCP) server — a small piece of software that gives AI assistants like Claude a secure, governed connection to Hugging Face. Connects an assistant to the Hugging Face Hub to search and inspect models, datasets and Spaces, and to call Gradio apps hosted on Spaces as tools.
Is there an official Hugging Face MCP server?
Yes. The Hugging Face MCP server is an official integration, maintained by the vendor or the Model Context Protocol project, which makes it the safest default for business use. It is maintained by Hugging Face.
Is the Hugging Face MCP server hosted, or do I run it myself?
Both. Hugging Face runs a hosted endpoint at https://huggingface.co/mcp, so most people just paste that URL into their AI client. You can also run the server locally with npx, supplying your own credentials.
Do I need an API key for the Hugging Face MCP server?
Yes. The hosted server expects an API key from your Hugging Face account, sent in the Authorization header. Store it in your client's secret settings rather than pasting it into shared config files.
What can an AI assistant actually do with Hugging Face?
Through this server an assistant can work with search hub repos, repo details, hub file access, run gradio spaces, hugging face jobs — reading from and acting on Hugging Face directly instead of you copy-pasting between windows. What you allow it to do is controlled by the permissions you grant.
How do I set this up for my business?
The setup section above has copy-paste config for Claude Code, Claude Desktop, Cursor and VS Code. If you want it rolled out across a team with permissions, governance and support handled, that is what Crox's Build engagement covers.
New to MCP? Start with our plain-English guide to the Model Context Protocol or see how to connect AI to your business tools without writing code .
Want this connected to your business — with governance handled?
Crox maps your processes, connects AI to the tools you already use, and keeps it working as models change. Start with a readiness assessment or talk to us about a build.