Hugging Face MCP Server
🤗 フェイスMCPサーバー🤗
Hugging Face Hub APIへの読み取り専用アクセスを提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、ClaudeのようなLLM(法学修士)はHugging Faceのモデル、データセット、スペース、論文、コレクションを操作できるようになります。
コンポーネント
リソース
サーバーは、人気のHugging Faceリソースを公開します。
リソースにアクセスするためのカスタム
hf://URI スキームhf://model/{model_id}URI を持つモデルhf://dataset/{dataset_id}URI を持つデータセットhf://space/{space_id}URI を持つスペースすべてのリソースには説明的な名前とJSONコンテンツタイプがあります
プロンプト
サーバーは 2 つのプロンプト テンプレートを提供します。
compare-models: 複数のHugging Faceモデル間の比較を生成します必須の
model_ids引数(カンマ区切りのモデル ID)モデルの詳細を取得し、比較のためにフォーマットします
summarize-paper: Hugging Faceの研究論文を要約します論文識別に必要な
arxiv_id引数要約の深さを制御するためのオプションの
detail_level引数(brief/detailed)紙のメタデータと実装の詳細を組み合わせる
ツール
サーバーはいくつかのツール カテゴリを実装します。
モデルツール
search-models: クエリ、著者、タグ、制限などのフィルターを使用してモデルを検索しますget-model-info: 特定のモデルに関する詳細情報を取得する
データセットツール
search-datasets: フィルターを使用してデータセットを検索するget-dataset-info: 特定のデータセットに関する詳細情報を取得する
宇宙ツール
search-spaces: SDKタイプを含むフィルター付きの検索スペースget-space-info: 特定のスペースに関する詳細情報を取得する
紙ツール
get-paper-info: 論文とその実装に関する情報を取得するget-daily-papers: 厳選された日刊紙のリストを取得する
収集ツール
search-collections: さまざまなフィルターを使用してコレクションを検索するget-collection-info: 特定のコレクションに関する詳細情報を取得する
Related MCP server: UIThub MCP Server
構成
サーバーは設定を必要としませんが、オプションの Hugging Face 認証をサポートしています。
HF_TOKEN環境変数を Hugging Face API トークンで設定します。APIレート制限の引き上げ
プライベートリポジトリへのアクセス(承認されている場合)
大量のリクエストに対する信頼性の向上
クイックスタート
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の huggingface-mcp-server を自動的にインストールするには:
npx -y @smithery/cli install @shreyaskarnik/huggingface-mcp-server --client claudeクロードデスクトップ
MacOS の場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"huggingface": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/huggingface-mcp-server",
"run",
"huggingface_mcp_server.py"
],
"env": {
"HF_TOKEN": "your_token_here" // Optional
}
}
}発達
建築と出版
配布用のパッケージを準備するには:
依存関係を同期し、ロックファイルを更新します。
uv syncパッケージディストリビューションをビルドします。
uv buildこれにより、 dist/ディレクトリにソースとホイールのディストリビューションが作成されます。
PyPI に公開:
uv publish注: 環境変数またはコマンド フラグを使用して PyPI 資格情報を設定する必要があります。
トークン:
--tokenまたはUV_PUBLISH_TOKENまたはユーザー名/パスワード:
--username/UV_PUBLISH_USERNAMEおよび--password/UV_PUBLISH_PASSWORD
デバッグ
MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、 MCP Inspectorの使用を強くお勧めします。
次のコマンドを使用して、 npm経由で MCP Inspector を起動できます。
npx @modelcontextprotocol/inspector uv --directory /path/to/huggingface-mcp-server run huggingface_mcp_server.py起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。
クロードの例題
このサーバーを Claude で使用する場合は、次のサンプルプロンプトを試してください。
「Hugging Face で 1 億未満のパラメータを持つ BERT モデルを検索する」
「Hugging Faceでテキスト分類に最も人気のあるデータセットを見つける」
「Hugging Face で今日注目されている AI 研究論文は何ですか?」
「Hugging Face MCPサーバーを使用して、arXiv ID 2307.09288の論文を要約してください」
「Hugging FaceのLlama-3-8BとMistral-7Bモデルを比較」
「画像生成に最も人気のあるGradio空間を表示」
「TheBlokeが作成したMixtralモデルを含むコレクションを見つける」
トラブルシューティング
サーバーに問題が発生した場合:
Claude Desktop でサーバー ログを確認します。
macOS:
~/Library/Logs/Claude/mcp-server-huggingface.logWindows:
%APPDATA%\Claude\logs\mcp-server-huggingface.log
APIレート制限エラーの場合は、Hugging Face APIトークンの追加を検討してください。
Hugging Face APIにアクセスするために、マシンがインターネットに接続されていることを確認してください。
特定のツールが失敗する場合は、Hugging Faceのウェブサイトから同じデータにアクセスして、それが存在するかどうかを確認してください。
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
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.18MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that enables Claude to retrieve and analyze code from GitHub repositories through the uithub API.2521MIT
- FlicenseBqualityCmaintenanceA Python-based Model Context Protocol server that integrates with Claude Desktop, allowing users to connect to Hubble API services by configuring the server with their Hubble API key.7
- AlicenseNot gradedqualityDmaintenanceAn unofficial MCP server that provides semantic search capabilities for Hugging Face models and datasets, enabling Claude and other MCP-compatible clients to search, discover, and explore the Hugging Face ecosystem using natural language queries.20MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Appeared in Searches
- A server for finding papers in PubMed
- Using Google Scholar for Conducting Deep and Critical Literature Reviews
- A resource for finding scholarly articles and publications
- A server for finding, reading, and summarizing arXiv research papers
- A tool for finding academic papers using semantic search and citation analysis
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/shreyaskarnik/huggingface-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server