Hugging Face MCP Server
Provides access to thousands of Gradio AI applications, allowing interaction with deployed models and demos.
Connects to the Hugging Face Hub, enabling search and interaction with models, datasets, and Spaces.
Click on "Install 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 Serversearch for text generation models"
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 Official MCP Server
Welcome to the official Hugging Face MCP Server š¤. Connect your LLM to the Hugging Face Hub and thousands of Gradio AI Applications.
Installing the MCP Server
Follow the instructions below to get started:
Click here to add the Hugging Face connector to your account.
Alternatively, navigate to https://claude.ai/settings/connectors, and add "Hugging Face" from the gallery.
Enter the command below to install in Claude Code:
claude mcp add hf-mcp-server -t http https://huggingface.co/mcp?loginThen start claude and follow the instructions to complete authentication.
claude mcp add hf-mcp-server \
-t http https://huggingface.co/mcp \
-H "Authorization: Bearer <YOUR_HF_TOKEN>"Enter the command below to install in Gemini CLI:
gemini mcp add -t http huggingface https://huggingface.co/mcp?loginThen start gemini and follow the instructions to complete authentication.
Click here to add the Hugging Face connector directly to VSCode. Alternatively, install from the gallery at https://code.visualstudio.com/mcp:
If you prefer to configure manually or use an auth token, add the snippet below to your mcp.json configuration:
"huggingface": {
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer <YOUR_HF_TOKEN>"
}Click here to install the Hugging Face MCP Server directly in Cursor.
If you prefer to use configure manually or specify an Authorization Token, use the snippet below:
"huggingface": {
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer <YOUR_HF_TOKEN>"
}Once installed, navigate to https://huggingface.co/settings/mcp to configure your Tools and Spaces.
Add ?no_image_content=true to the URL to remove ImageContent blocks from Gradio Servers.
Related MCP server: Hugging Face Hub MCP Server
Quick Guide (Repository Packages)
This repo contains:
(
/mcp) MCP Implementations of Hub API and Search endpoints for integration with MCP Servers.(
/app) An MCP Server and Web Application for deploying endpoints.
MCP Server
The following transports are supported:
STDIO
StreamableHTTP in Stateless JSON Mode (StreamableHTTPJson)
The Web Application and HTTP Transports start by default on Port 3000.
The StreamableHTTP service is available at /mcp. Although not strictly enforced by the specification, this is a common convention.
The Web Application reports server status and MCP method metrics. Tool selection is resolved independently for each request from the optional Hugging Face user configuration API and the bouquet/mix query parameters.
Running Locally
You can run the MCP Server locally with either npx or docker.
npx @llmindset/hf-mcp-server # Start in STDIO mode
npx @llmindset/hf-mcp-server-http # Start in stateless Streamable HTTP JSON modeTo run with docker:
docker pull ghcr.io/evalstate/hf-mcp-server:latest
docker run --rm -p 3000:3000 ghcr.io/evalstate/hf-mcp-server:latestAll commands above start the Management Web interface on http://localhost:3000/. The Streamable HTTP server is accessible on http://localhost:3000/mcp. See [Environment Variables](#Environment Variables) for configuration options. Docker defaults to Streamable HTTP (JSON RPC) mode.
Developing OpenAI Apps SDK Components
To build and test the Apps SDK component, run
cd packages/app
npm run dev:widgetThen open http://localhost:5173/gradio-widget-dev.html. This will bring up a browser with HMR where you can send Structured Content to the components for testing.

Development
This project uses pnpm for build and development. Corepack is used to ensure everyone uses the same pnpm version (10.12.3).
# Install dependencies
pnpm install
# Build all packages
pnpm buildBuild Commands
pnpm run clean -> clean build artifacts
pnpm run build -> build packages
pnpm run start -> start the mcp server application
pnpm run buildrun -> clean, build and start
pnpm run dev -> concurrently watch mcp and start dev server with HMR
Docker Build
Build the image:
docker build -t hf-mcp-server .Run with default settings (Streaming HTTP JSON Mode), Dashboard on Port 3000.
HTTP clients must send a Hugging Face token in the Authorization: Bearer header:
docker run --rm -p 3000:3000 hf-mcp-serverRun STDIO MCP Server:
docker run -i --rm -e TRANSPORT=stdio -p 3000:3000 -e DEFAULT_HF_TOKEN=hf_xxx hf-mcp-serverTRANSPORT can be stdio or streamableHttpJson (default).
Transport Endpoints
The different transport types use the following endpoints:
Stateless Streamable HTTP JSON:
/mcpSTDIO: Uses stdin/stdout directly, no HTTP endpoint
Environment Variables
The server respects the following environment variables:
TRANSPORT: The transport type to use (stdioorstreamableHttpJson)DEFAULT_HF_TOKEN: Default token for local STDIO deployments. HTTP transports do not use this as a fallback for requests without anAuthorization: Bearerheader.If running with
stdiotransport,HF_TOKENis used ifDEFAULT_HF_TOKENis not set.MCP_ALLOWED_HOSTS: Additional comma-separated Host allowlist for MCP and API routes. Loopback hostslocalhost,127.0.0.1,::1are always allowed. Use exact hostnames or leading wildcard entries such as*.example.com.HF_API_TIMEOUT: Timeout for Hugging Face API requests in milliseconds (default: 12500ms / 12.5 seconds)USER_CONFIG_API: Optional URL for per-user Hugging Face MCP settings. When unset, immutable built-in defaults are used.ALLOW_INTERNAL_ADDRESS_HOSTS: Optional comma-separated host allowlist to permit internal/reserved DNS resolutions for trusted domains during outbound checks (supports exact hosts and*.wildcards, for example:huggingface.co,*.hf.space).MCP_STRICT_COMPLIANCE: set to True for GET 405 rejects in JSON Mode (default serves a welcome page).DISABLE_TOOLS: Optional comma-separated tool names to hide fromtools/listand reject if called, for examplehub_repo_search,hf_fs. Rejected calls remain visible as errors in the MCP dashboard tool-call statistics.PROXY_TOOLS_CSV: Optional CSV that defines Streamable HTTP proxy tool sources (see below).PROXY_TOKEN: Optional token used only for startup authentication while discoveringPROXY_TOOLS_CSVschemas.GRADIO_SKIP_INITIALIZE: When set totrue, Gradio MCP calls skip theinitializehandshake and issuetools/calldirectly.HF_SKILLS_DIR: Local directory containing a prebuilt skills distribution in the SEP-2640 index format (askill://index.jsonwhose entries carry verbatimfrontmatter, an optionalurl+digest, and anarchives[]array, alongside the expandedSKILL.md/supporting-file tree and.tar.gzarchives). The server walks each skill directory and exposes every file as an individualskill://resource, supportsresources/directory/readfor scoped navigation, and advertises theio.modelcontextprotocol/skillsextension withdirectoryRead: true. Defaults to/mnt/hf-skills/distribution/latest, intended for a Hugging Face Space volume mounted fromhf://buckets/huggingface/skills.
To expose the shared Hugging Face skills catalog from a Space, mount the bucket and keep HF_SKILLS_DIR pointed at its latest distribution directory:
hf spaces volumes set <org>/<space> -v hf://buckets/huggingface/skills:/mnt/hf-skills:ro
hf spaces variables add <org>/<space> -e HF_SKILLS_DIR=/mnt/hf-skills/distribution/latestProxy tools (Streamable HTTP via CSV)
You can load proxy tool definitions at startup by setting PROXY_TOOLS_CSV to a HTTPS URL or a local file path.
If those proxy servers require authentication, set PROXY_TOKEN. User, default, and logging tokens are never used
for startup proxy schema discovery.
The server fetches each MCP endpoint once on startup, runs initialize + tools/list (10s timeout), and registers any tools returned.
If a source fails or returns no tools, it is skipped (no startup failure).
CSV format
tool_name,url,response_type
papers,https://evalstate-hf-papers.hf.space/mcp,SSE
news,https://example.com/mcp,JSONtool_name: local tool name for single-tool upstreams; identifier for the proxy source when the upstream exposes multiple tools.url: Streamable HTTP MCP endpoint.response_type: legacy compatibility field;SSEandJSONare both accepted. Proxy calls can still consume upstream Streamable HTTP responses, while this server always returns direct JSON-RPC responses to its clients.
Tool naming
Tool naming depends on how many tools the upstream MCP endpoint returns:
Single upstream tool: the exposed tool name is the first CSV column.
Multiple upstream tools: the exposed tool names are the upstream tool names.
If an exposed proxy tool name collides with an already-registered tool, the proxy tool is skipped and a warning is logged.
You can include these tool names in bouquets or mixes as needed.
Use bouquet=proxy or mix=proxy to enable all proxy tools loaded from PROXY_TOOLS_CSV (in addition to the base built-in tools).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceConnects Claude Desktop to Hugging Face Spaces with minimal setup, enabling capabilities like image generation, vision tasks, text-to-speech, and chat with AI models.Last updated3241MIT
- FlicenseAqualityDmaintenanceEnables access to the Hugging Face Hub API to search and retrieve information about machine learning models, datasets, and their metadata. Provides comprehensive tools for exploring the Hugging Face ecosystem including model details, dataset information, and parquet file access.Last updated8
- Alicense-quality-maintenanceEnables access to 200,000+ machine learning models through the Hugging Face Inference API. Supports text generation, image creation, classification, translation, speech processing, embeddings, and more AI tasks.Last updated
- AlicenseAqualityBmaintenanceEnables web search, scraping, and live package version lookup for local LLMs, with no API keys required.Last updated52MIT
Related MCP Connectors
Search US grants + federal contracts (Grants.gov + SAM.gov) from any LLM.
Give your agent live data from Twitter, Reddit, the web and GitHub. No API keys, no scraping stack.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to iā¦
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/evalstate/hf-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server