Skip to content

Menu

Hugging Face MCP Server logo

Hugging Face MCP Server

Published · Updated

At a glance

GitHub repository
huggingface/hf-mcp-server
Watch out for
Community Spaces are written by many people; their quality, uptime and data handling vary.

Hugging Face's official MCP server connects an assistant to the Hugging Face Hub. It can search and explore models, datasets, Spaces and papers, search Hugging Face's documentation, and call Gradio apps hosted on Spaces as tools. Hugging Face hosts it at huggingface.co/mcp; the repository holds the code if you want to run it yourself.

The Spaces part is what makes it unusual. Many Spaces are Gradio apps that also act as MCP servers, so through this one connection your assistant can use community tools for things like transcription or image generation. You choose which Spaces to add on your MCP settings page at huggingface.co/settings/mcp, and there is a Dynamic Spaces option that lets the assistant discover suitable Spaces at runtime instead.

The settings page is also where you switch on extra built-in tools. Hugging Face describes hf_fs as the main tool for working through the Hub, including semantic search of documents and Spaces. Optional tools let the assistant create repositories and write files to them, use sandboxes, and run, monitor and schedule Jobs on Hugging Face infrastructure. Those write and compute tools are where costs and risks live, so it is sensible to leave them off until you need them.

How it connects

Your AI app

An assistant or agent that supports MCP

Hugging Face MCP Server

Runs as

  • npx (Node.js)
  • Docker
  • Remote (HTTP)

Gives the agent

  • Hub search and navigation
  • Documentation search
  • Gradio Spaces as tools
  • Repositories, sandboxes and Jobs
  • Self-hosting options

Hugging Face

Signs in with

  • Token
Your AI app talks to Hugging Face MCP Server over the Model Context Protocol, and the server carries out the work. Built from the setup and capability sections on this page.

What it can do

Hub search and navigation
Find models, datasets, Spaces and papers and read their details, with hf_fs as the main navigation tool and hub_repo_search for repository search.
Documentation search
Natural-language search across Hugging Face documentation, for questions like how to use LoRA adapters with PEFT.
Gradio Spaces as tools
Add MCP-compatible Spaces in your settings and their functions appear as tools. Dynamic Spaces lets the assistant find them on the fly.
Repositories, sandboxes and Jobs
Optional tools create repos and write files, manage sandboxes, and run or schedule Jobs on Hugging Face infrastructure.
Self-hosting options
The server can run locally with npx @llmindset/hf-mcp-server or in Docker, with DISABLE_TOOLS to hide specific tools.

Setting it up

Log in to Hugging Face and open huggingface.co/settings/mcp, pick your client, and copy the configuration it generates; Hugging Face recommends this over writing config by hand. In Claude Code you can run claude mcp add hf-mcp-server -t http https://huggingface.co/mcp?login and complete the sign-in when Claude starts. Claude Desktop and claude.ai users can add Hugging Face from the connectors gallery. After adding Spaces or tools in settings, restart or refresh your client so it picks them up. For self-hosting, run npx @llmindset/hf-mcp-server for stdio with HF_TOKEN set, or use the Docker image.

Run in a terminal
claude mcp add huggingface -- npx -y @llmindset/hf-mcp-server

Runs the @llmindset/hf-mcp-server package from npm. Add any API keys, environment variables or extra arguments the setup notes above list. Combine several servers in the MCP config generator

Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)

Where it helps

  • Finding a suitable model or quantisation for a task without browsing the Hub by hand
  • Looking up datasets on a topic with download counts and links
  • Answering a transformers or PEFT question from current documentation
  • Calling a community Space, such as speech-to-text, from your assistant
  • Running a training or evaluation Job on Hugging Face infrastructure

Limitations and things to watch

  • Community Spaces are written by many people; their quality, uptime and data handling vary.
  • Jobs and some Spaces use paid compute or GPU quota on your account.
  • The repo and file-writing tools can change your Hub repositories, so enable them deliberately.
  • Tool availability depends on your settings page, so the same config can behave differently for different accounts.

Sources

Written from the project's own documentation, checked November 2026.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…