Hugging Face MCP リモートMCPサーバー – 公式URL・MCP接続設定・ツール一覧
Hugging Face MCP は Hugging Face が提供するリモートMCPサーバー(公式運営、カテゴリ:開発者ツール・Git・検索・ドキュメント)です。エンドポイント https://huggingface.co/mcp を通じて、AIエージェントが直接呼び出せる 12 個の構造化ツールを提供します。
このページでは、公式リモートエンドポイント、トランスポート、認証方式、全ツールスキーマ、リアルタイムの死活監視・セキュリティ監査結果を掲載し、Cursor・Claude Code・VS Code・ChatGPT など 10 のクライアントへのMCP接続手順を解説します。
🔒 Client-side only — never leaves your browser.
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"huggingface": {
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}claude mcp add --transport http huggingface https://huggingface.co/mcp
With credential header:
claude mcp add --transport http huggingface https://huggingface.co/mcp --header "Authorization: Bearer YOUR_API_KEY"
Or add to .vscode/mcp.json:
{
"servers": {
"huggingface": {
"type": "http",
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}- Open Settings → Connectors (Integrations) → Add Custom Connector.
- Paste the endpoint URL:
https://huggingface.co/mcp - Provide your API key / Bearer token when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"huggingface": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://huggingface.co/mcp",
"--header",
"Authorization: Bearer YOUR_API_KEY"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"huggingface": {
"serverUrl": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"huggingface": {
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.huggingface] url = "https://huggingface.co/mcp" bearer_token_env_var = "HUGGINGFACE_TOKEN"
Add to cline_mcp_settings.json (Cline → MCP Servers → Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"huggingface": {
"type": "streamableHttp",
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"huggingface": {
"httpUrl": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}🧰 Hugging Face のMCPツールとスキーマ(12)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| hf_doc_search ~31 tok | 🟢 Read | Search Hugging Face documentation. | — |
| hf_doc_fetch ~30 tok | 🟢 Read | Fetch a Hugging Face docs page. | — |
| model_search ~29 tok | 🟢 Read | Search models on the Hub. | — |
| dataset_search ~30 tok | 🟢 Read | Search datasets on the Hub. | — |
| space_search ~29 tok | 🟢 Read | Search Spaces on the Hub. | — |
| paper_search ~29 tok | 🟢 Read | Search papers on the Hub. | — |
| hub_repo_details ~31 tok | 🟢 Read | Get details of a Hub repository. | — |
| hf_whoami ~29 tok | 🟢 Read | Get the authenticated HF user. | — |
| space_info ~28 tok | 🟢 Read | Get details of a Space. | — |
| use_space ~28 tok | 🟠 Write | Call a Hugging Face Space. | — |
| model_info ~27 tok | 🟢 Read | Get model card info. | — |
| dataset_info ~28 tok | 🟢 Read | Get dataset card info. | — |
🛡️ セキュリティ評価・品質・コンテキスト監査
- 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
📡 公式リモートエンドポイントとトランスポート
リモートエンドポイント https://huggingface.co/mcp は Streamable HTTP(2025-03-26 仕様) を採用。Streamable HTTP は単一の POST エンドポイントで JSON-RPC の双方向通信を完結する現行推奨トランスポートで、npx mcp-remote ブリッジなしに Claude・Cursor・VS Code などへ URL だけでMCP接続できます。
接続前にエンドポイントを オンライン MCP Inspector に貼り付けて initialize / tools/list のハンドシェイクを確認することを推奨します。
🔐 認証・権限フロー
認証方式は Bearer Token です。クライアント設定に Authorization: Bearer <キー> ヘッダーを追加する必要があります。資格情報は Hugging Face のコンソールから取得できます。
🛡️ コンテキスト消費とセキュリティ監査
このサーバーには現在 12 個のツールが登録されており、定義の合計は約 369 トークン。リクエストごとにモデルのシステムプロンプトへ注入されます。セキュリティ評価は A+(公式運営ソース)。ツール名とスキーマが簡潔なほどコンテキストウィンドウへの「税」は低くなります。feecalculator.app で呼び出しあたりのコストも試算できます。
🧩 主要クライアントへのMCP接続
Hugging Face MCP について、Cursor / Claude Code / VS Code / ChatGPT / Windsurf / Kiro / Codex / Cline / Gemini など 10 クライアント向けの設定を自動生成しています。ワンクリック deeplink、claude mcp add コマンド、JSON / TOML スニペットから選べます。代表的なツール: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: Bearerheader on every request, including theinitializecall. - "Session expired" / stale
Mcp-Session-Id— just re-sendinitialize; 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への接続方法
- リモートエンドポイントを取得 — 公式エンドポイント https://huggingface.co/mcp をコピーし、Hugging Face のコンソールで API 資格情報を取得します。
- クライアント設定に追加 — Cursor の mcp.json / Claude Code CLI / 各クライアントに URL と Authorization ヘッダーを追加します(下記クライアント別ガイド参照)。
- 認可して検証 — 設定を保存後、当サイトの Inspector で initialize と tools/list を実行して接続を確認します。
🔌 Hugging Face × クライアント別MCP接続ガイド
❓ よくある質問
Hugging Face MCP のリモートMCPサーバーは公式ですか?
このエントリは「公式運営」と表示されています。エンドポイントは Hugging Face 公式が運営しています。掲載エンドポイントはすべて実際の MCP initialize ハンドシェイクで検証済みです。
Claude / Cursor で Hugging Face MCP に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 キーが必要です。Hugging Face のコンソールで取得し、各クライアントの headers 設定に追加してください。
ローカル stdio MCP とリモート MCP の違いは?
ローカル MCP は npx / uvx で起動する stdio 子プロセスで、ローカルランタイムが必要で API キーを平文で設定ファイルに書きます。リモート MCP は Hugging Face がホストする HTTPS エンドポイントで、インストール不要・OAuth 2.1 対応・同一 URL をデスクトップとモバイルで共用できます。詳しくは ローカル vs リモート MCP 比較 をご覧ください。