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のウェブサイトから同じデータにアクセスして、それが存在するかどうかを確認してください。
Available Tools
10 toolsget-collection-infoC
Get detailed information about a specific collection
Inputs: namespace (required), collection_id (required).
get-daily-papersB
Get the list of daily papers curated by Hugging Face
Inputs: no named parameters.
get-dataset-infoC
Get detailed information about a specific dataset
Inputs: dataset_id (required).
get-model-infoB
Get detailed information about a specific model
Inputs: model_id (required).
get-paper-infoC
Get information about a specific paper on Hugging Face
Inputs: arxiv_id (required).
get-space-infoC
Get detailed information about a specific Space
Inputs: space_id (required).
search-collectionsC
Search for collections on Hugging Face Hub
Inputs: owner, item, query, limit.
search-datasetsC
Search for datasets on Hugging Face Hub
Inputs: query, author, tags, limit.
search-modelsC
Search for models on Hugging Face Hub
Inputs: query, author, tags, limit.
search-spacesC
Search for Spaces on Hugging Face Hub
Inputs: query, author, tags, sdk, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Every tool has a clearly distinct purpose with no ambiguity. The tools are cleanly separated into 'get-info' operations for specific resources (collections, daily papers, datasets, models, papers, spaces) and 'search' operations for those same resource types, making it easy for an agent to select the right tool based on whether it needs detailed information about a known item or wants to search for items.
The tool names follow a perfectly consistent verb_noun pattern throughout. All tools use either 'get-[resource]-info' or 'search-[resource]s' with consistent hyphenation and pluralization, making the naming highly predictable and readable.
With 10 tools, this is well-scoped for a Hugging Face Hub server. The count is appropriate as it covers multiple resource types (collections, papers, datasets, models, spaces) with both info retrieval and search capabilities, ensuring each tool earns its place without being overwhelming.
The tool surface is nearly complete for browsing and searching the Hugging Face Hub, covering key resources with both info and search operations. A minor gap is the lack of tools for interacting with resources (e.g., downloading models/datasets or running spaces), but for a read-only browsing server, it provides excellent coverage.
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
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.ISC
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that enables Claude to retrieve and analyze code from GitHub repositories through the uithub API.21MIT
- FlicenseBqualityDmaintenanceA 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
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