Hugging Face MCP 远程 MCP 服务器 – 官方端点、工具列表与一键连接指南

🛡️ Official✓ VerifiedStreamable HTTPBearer Token🛡️ A+~369 tok12 tools·Online123ms·30 天在线率: 99.67%·上次拨测 12 分钟前

Hugging Face 官方远程 MCP 服务器(huggingface.co/mcp)。使用 HF Access Token 搜索模型、数据集、Spaces 与论文。

本页收录其官方远程端点、传输协议、认证方式、全部工具 Schema、实时可用性拨测与安全审计结果,并为 Cursor、Claude Code、VS Code、ChatGPT 等 10 大客户端提供一键接入指引。

https://huggingface.co/mcp
提供方
Hugging Face ↗
分类
🛠️ 开发者工具与 Git🔍 搜索与文档
Streamable HTTPhttps://huggingface.co/mcp

🔒 Client-side only — never leaves your browser.

Install in Cursor →

Or add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "huggingface": {
      "url": "https://huggingface.co/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

🧰 Hugging Face MCP 工具与 Schema(12)

ToolSafetyDescriptionParameters
hf_doc_search
~31 tok
🟢 ReadSearch Hugging Face documentation.—
hf_doc_fetch
~30 tok
🟢 ReadFetch a Hugging Face docs page.—
model_search
~29 tok
🟢 ReadSearch models on the Hub.—
dataset_search
~30 tok
🟢 ReadSearch datasets on the Hub.—
space_search
~29 tok
🟢 ReadSearch Spaces on the Hub.—
paper_search
~29 tok
🟢 ReadSearch papers on the Hub.—
hub_repo_details
~31 tok
🟢 ReadGet details of a Hub repository.—
hf_whoami
~29 tok
🟢 ReadGet the authenticated HF user.—
space_info
~28 tok
🟢 ReadGet details of a Space.—
use_space
~28 tok
🟠 WriteCall a Hugging Face Space.—
model_info
~27 tok
🟢 ReadGet model card info.—
dataset_info
~28 tok
🟢 ReadGet dataset card info.—

🛡️ 安全评级、质量与上下文 Token 审计

🛡️ 安全评级 A+上下文 Token 开销: ~369 tokens(该服务端 12 个工具定义注入每次系统提示词)

估算单次调用 Token 成本 →

  • No prompt-injection or hidden-character anomalies detected in tool descriptions
  • Streamable HTTP primary endpoint (current 2025-03-26 transport)
  • Static credential (Bearer token / API key) — protect it in client config
  • Official first-party endpoint operated by the vendor
  • Manually verified by RemoteMCP.net

🔐 OAuth 2.1 与安全

认证方式
Bearer Token
动态客户端注册(DCR)
—
PKCE S256
—
受保护资源元数据
https://huggingface.co/.well-known/oauth-protected-resource
审计 OAuth 2.1 配置 →

📡 官方远程端点与传输协议

远程端点 https://huggingface.co/mcp 采用 Streamable HTTP(流式 HTTP,2025-03-26 规范)。Streamable HTTP 在单一 POST 端点上完成 JSON-RPC 双向交互,是当前 MCP 规范推荐的传输方式,可直接被 Claude、Cursor、VS Code 等客户端以 URL 形式接入,无需 npx mcp-remote 桥接。

接入前可将端点粘贴至本站 在线 MCP Inspector 实测 initialize / tools/list 握手,确认真实协议行为。

🔐 认证与权限机制

认证方式为 Bearer Token。需要在客户端配置中提供 Authorization: Bearer <你的密钥> 请求头,凭据可在 Hugging Face 控制台获取。

🛡️ 上下文开销与安全审计

该服务端当前登记 12 个工具,全部定义合计约 369 tokens,会在每次请求时注入模型系统提示词。安全评级为 A+,官方直营来源。工具名与 Schema 越精简,对上下文窗口的"税"越低;可用 feecalculator.app 估算每次调用的边际成本。

🧩 主流客户端快速接入

本站为 Hugging Face MCP 生成了 Cursor / Claude Code / VS Code / ChatGPT / Windsurf / Kiro / Codex / Cline / Gemini 等 10 大客户端的专属配置——包括一键 deeplink、claude mcp add 命令与 JSON/TOML 片段。下方选择你的客户端即可查看 1 分钟接入步骤。代表性工具包括 hf_doc_search、hf_doc_fetch、model_search、dataset_search、space_search 等。

📖 Hugging Face 详解

Hugging Face MCP — Remote MCP Server

Hugging Face's remote MCP is also the Gradio MCP backbone — it can expose thousands of Gradio Spaces as tools on top of Hub search. The endpoint lives on huggingface.co itself and authorizes with a plain HF access token sent as a Bearer header — no OAuth dance required.

Official Hugging Face MCP Endpoint & Transport Architecture

  • Endpoint URL: https://huggingface.co/mcp
  • Transport: Streamable HTTP

Streamable HTTP is the current MCP transport (2025-03-26 spec): a single URL accepts JSON-RPC POSTs and may stream responses over SSE, so one endpoint serves both simple and streaming workloads. Hugging Face MCP does not publish a separate legacy SSE endpoint, so your client must speak Streamable HTTP.

Authentication, Scopes & Permission Boundaries

Hugging Face MCP uses bearer-token authentication. Create an access token in your Hugging Face account settings, then send it as Authorization: Bearer <token>. No OAuth redirect flow is involved.

All 4 cataloged tools are read-only — Hugging Face MCP cannot mutate your account data, which makes it safe to connect broadly.

Common Troubleshooting & Connection Tips

  • 401/403 responses — your credential is missing or rejected. Regenerate the key/token and make sure it is sent as an Authorization: Bearer header on every request, including the initialize call.
  • "Session expired" / stale Mcp-Session-Id — just re-send initialize; stateless clients can ignore session headers entirely.
  • Send your HF access token as Authorization: Bearer <token> — fine-grained tokens work.
  • Anonymous access gives a reduced tool set; a token unlocks the full Hub tools.

🚀 如何接入 Hugging Face MCP 远程 MCP

  1. 获取远程端点 — 复制官方端点 https://huggingface.co/mcp,并先在 Hugging Face 控制台申请 API 凭据。
  2. 写入客户端配置 — 在 Cursor 的 mcp.json / Claude Code CLI / 其他客户端中添加该 URL 与 Authorization 头(见下方分客户端指南)。
  3. 授权并验证 — 保存配置后,在本站 Inspector 中运行 initialize 与 tools/list 验证连通性。

🔌 Hugging Face × 各客户端连接指南

❓ 常见问题

Hugging Face MCP 远程 MCP 服务器是官方提供的吗?

本条目标记为「官方直营」。端点由 Hugging Face 官方运营,所有收录端点均经过真实 MCP initialize 握手验证。

如何在 Claude / Cursor 中连接 Hugging Face MCP?

复制远程端点 https://huggingface.co/mcp:Claude Code 执行 claude mcp add --transport http huggingface https://huggingface.co/mcp;Cursor 可直接使用本页的一键 deeplink 或在 ~/.cursor/mcp.json 中添加 { "mcpServers": { "huggingface": { "url": "https://huggingface.co/mcp" } } }。

连接时返回 401 或需要密钥怎么办?

该端点需要 Bearer Token / API Key:在 Hugging Face 控制台申请凭据后,按对应客户端文档将其写入 headers 配置。

本地 stdio MCP 和这个远程 MCP 有什么区别?

本地 MCP 通过 npx/uvx 在你的机器上启动 stdio 子进程,依赖本地运行时且密钥以明文写入配置文件;远程 MCP 是 Hugging Face 托管的 HTTPS 端点,免安装、支持 OAuth 2.1 授权流,且同一端点可跨桌面与移动端复用。详见 本地 vs 远程 MCP 对比。

🔗 同类远程 MCP 服务端