Hugging Face MCP Server – Hub and AI Apps
Hugging Face's official MCP server connects AI assistants to the Hugging Face Hub and MCP-compatible Gradio Spaces. Use it to search models, datasets, Spaces, papers, and documentation, retrieve repository context, run selected community tools, and manage supported Hugging Face Jobs workflows.
Overview
Hugging Face's official MCP server connects compatible AI assistants to the
Hugging Face Hub. It lets agents search and explore current Hub resources, use
selected community tools hosted as Gradio Spaces, and bring structured metadata,
links, and documentation context back into an editor, chat, or CLI workflow.
What the MCP server enables
The server includes built-in tools that can be enabled or disabled from
Hugging Face MCP settings. Depending on the user's configuration and
authentication, an AI agent can:
- Search models with filters for tasks, libraries, and related metadata.
- Search datasets by author, tags, and other Hub information.
- Find Spaces and MCP-compatible Gradio apps through semantic search.
- Search machine-learning papers.
- Search Hugging Face documentation with natural-language queries.
- Retrieve repository details for models, datasets, and Spaces, optionally
including README content. - Run, monitor, and schedule Jobs on Hugging Face infrastructure.
- Call selected MCP-compatible Gradio Spaces as tools.
- Use optional dynamic Spaces discovery for MCP-compatible Spaces.
When to use it
Use Hugging Face MCP when an AI agent needs live machine-learning ecosystem
context or wants to call AI applications hosted on Spaces. Typical workflows
include finding a model for a task, comparing datasets, locating Spaces that
transcribe audio or generate images, finding papers about a research topic,
checking current Transformers or PEFT documentation, and using selected Gradio
tools directly from a coding assistant.
Connection and authentication
The hosted endpoint is https://huggingface.co/mcp. Hugging Face recommends
opening the MCP settings page while logged in and copying the client-specific
configuration it generates. Many clients can use https://huggingface.co/mcp?login
to start interactive authentication. Manual configurations can send a Hugging
Face token in the Authorization: Bearer header.
The official project also documents local packages for stdio and local
Streamable HTTP use, including @llmindset/hf-mcp-server for stdio and
@llmindset/hf-mcp-server-http for a local Streamable HTTP server.
Key considerations
Tool availability is controlled from Hugging Face MCP settings, and clients may
need to restart or refresh after tools or Spaces are changed. Community Gradio
Spaces expose their own functions, arguments, outputs, and runtime behavior, so
review a Space before allowing an agent to call it. Hosted and local HTTP
configurations can use OAuth-style login or bearer tokens; keep tokens out of
source control. Optional image-content removal is available for clients with
limited image support, and dynamic Spaces support is documented as
experimental. Jobs and Space tool calls may consume Hugging Face resources
according to the user's account and selected infrastructure.
Supported Transports
streamable_http
URL: https://huggingface.co/mcp
stdio
Command: npx
Args:
@llmindset/hf-mcp-server
streamable_http
URL: http://localhost:3000/mcp
Frequently Asked Questions
- When should an AI agent use the Hugging Face MCP server?
- Use it when a workflow needs current Hugging Face Hub context, such as finding models, datasets, Spaces, papers, documentation, repository details, or selected Gradio tools and Jobs available through the user's MCP settings.
- What does the Hugging Face MCP server add to an AI agent's capabilities?
- It gives the agent live access to Hugging Face Hub search, documentation semantic search, repository metadata, selected MCP-compatible Spaces, and supported Jobs workflows instead of relying only on static model knowledge.
- What can an AI agent access or manage through Hugging Face MCP?
- Depending on enabled tools and authentication, the agent can search models, datasets, Spaces, and papers, retrieve repository details, search documentation, call selected Gradio Space tools, and run, monitor, or schedule Hugging Face Jobs.
- How is authentication configured for the Hugging Face MCP server?
- Hosted setup can use the client-specific configuration from Hugging Face MCP settings, interactive login through the hosted endpoint, or a Hugging Face token sent with the Authorization Bearer header. Store HF_TOKEN securely and avoid committing it to source control.
- Which transport should be used for the Hugging Face MCP server?
- Use the hosted Streamable HTTP endpoint at https://huggingface.co/mcp for most clients. Use local stdio or local Streamable HTTP only when a desktop or IDE client requires a local server process or when testing the official server packages locally.