Hugging Face MCP server

The official Hugging Face Hub server for searching models, datasets and Spaces and reading their details. Basic Hub tools work without authentication; signing in enables your own tool and Space settings.

Remote (HTTP)No auth

Set up Hugging Face

Configuration examples, not tested connections. Replace placeholders and review the upstream documentation before use.

Claude Code

Run in your terminal.

claude mcp add --transport http hugging-face https://huggingface.co/mcp

Cursor

Merge into ~/.cursor/mcp.json

{
  "mcpServers": {
    "hugging-face": {
      "url": "https://huggingface.co/mcp"
    }
  }
}

Codex

Run in your terminal.

codex mcp add hugging-face --url https://huggingface.co/mcp

Gemini CLI

Merge into ~/.gemini/settings.json

{
  "mcpServers": {
    "hugging-face": {
      "httpUrl": "https://huggingface.co/mcp"
    }
  }
}

OpenCode

Merge into ~/.config/opencode/opencode.jsonc

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "hugging-face": {
      "type": "remote",
      "url": "https://huggingface.co/mcp",
      "enabled": true
    }
  }
}

VS Code

Merge into .vscode/mcp.json

{
  "servers": {
    "hugging-face": {
      "type": "http",
      "url": "https://huggingface.co/mcp"
    }
  }
}

Using more than one server?Add to a config with other servers

Step-by-step setup guides: Claude Code and Codex CLI, Cursor and VS Code. In Claude Desktop, add the URL as a custom connector. This is a remote server; see remote vs local servers and authentication and security basics.

Overview

The Hugging Face MCP Server is the Hub's official server, hosted at https://huggingface.co/mcp and maintained in huggingface/hf-mcp-server. Version 0.4.28 was released on 5 October 2026. It connects an agent to the Hugging Face Hub and, with an account, to Gradio applications hosted on Spaces.

Without signing in, the endpoint offers a small set of Hub tools. We confirmed this on 11 October 2026: hub_repo_search finds models, datasets and Spaces, hub_repo_details reads a repository's card and metadata, hf_fs browses repository files, and hf_whoami reports the connection's identity. These are enough to research models or find a dataset from inside an agent.

The example connects anonymously. To use your own configuration, sign in. Upstream's Claude Code example adds ?login to the URL to start authentication, or sends a Hugging Face token as a bearer header. Once you are signed in, the tools and Spaces you choose at huggingface.co/settings/mcp are what the server exposes, and some of them, such as Jobs, need a signed-in account. A token carries your Hub permissions, so use a fine-grained token with only the access you intend to give.

Example tools

  • hub_repo_search
  • hub_repo_details
  • hf_fs
  • hf_whoami

Tool names are upstream examples. The server's live tool list can differ.

Browse Developer Tools servers

Sources

This page was written from the upstream documentation below and last reviewed on 11 October 2026. Listing is not a security or compatibility endorsement. Report a correction through the contact page.