SH

shreyaskarnik/huggingface-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

72 stars 10 forks 品質 66 トレンド 0MIT

shreyaskarnik/huggingface-mcp-server は [https://github.com/shreyaskarnik/huggingface-mcp-server.] からインポートされた MCP サーバーの候補です

概要

shreyaskarnik/huggingface-mcp-server は [https://github.com/shreyaskarnik/huggingface-mcp-server.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

Hugging Face Hub API への読み取り専用アクセスを提供するモデルコンテキストプロトコル(MCP)サーバー。 このサーバーでは、Claude のような LLM を Hugging Face のモデル、データセット、スペース、ペーパー、コレクションとやり取りすることができます。

コンポーネント

リソース

サーバは、一般的なハッギングフェイスリソースを公開します。

  • カスタム[hf://]]リソースにアクセスするためのURIスキーム
  • [hf://model/{model_id} のモデル ログイン
  • [[[T2]でデータセット] ログイン
  • [[T3] のスペース ログイン
  • すべてのリソースには、記述的な名前とJSONコンテンツタイプがあります

プロンプト

サーバは2つのプロンプトテンプレートを提供します。

  • 必須 model_ids 引数(コンマ区切りモデルID)

  • 比較のためにモデルの詳細とフォーマットを取得する

  • [summarize-paper: Hugging Faceから研究論文をまとめる

  • 紙識別のための必須[arxiv_id引数

  • 任意[detail_level 引数(brief/detailed)で、概要の深さを制御する

  • ペーパーメタデータを実装詳細と組み合わせる

ツール

サーバは、いくつかのツールのカテゴリを実装します。

  • モデルツール

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

🤗 Hugging Face MCP Server 🤗

A Model Context Protocol (MCP) server that provides read-only access to the Hugging Face Hub APIs. This server allows LLMs like Claude to interact with Hugging Face’s models, datasets, spaces, papers, and collections.

Components

Resources

The server exposes popular Hugging Face resources:

  • Custom hf:// URI scheme for accessing resources
  • Models with hf://model/{model_id} URIs
  • Datasets with hf://dataset/{dataset_id} URIs
  • Spaces with hf://space/{space_id} URIs
  • All resources have descriptive names and JSON content type

Prompts

The server provides two prompt templates:

  • compare-models: Generates a comparison between multiple Hugging Face models

    • Required model_ids argument (comma-separated model IDs)
    • Retrieves model details and formats them for comparison
  • summarize-paper: Summarizes a research paper from Hugging Face

    • Required arxiv_id argument for paper identification
    • Optional detail_level argument (brief/detailed) to control summary depth
    • Combines paper metadata with implementation details

Tools

The server implements several tool categories:

  • Model Tools

    • search-models: Search models with filters for query, author, tags, and limit
    • get-model-info: Get detailed information about a specific model
  • Dataset Tools

    • search-datasets: Search datasets with filters
    • get-dataset-info: Get detailed information about a specific dataset
  • Space Tools

    • search-spaces: Search Spaces with filters including SDK type
    • get-space-info: Get detailed information about a specific Space
  • Paper Tools

    • get-paper-info: Get information about a paper and its implementations
    • get-daily-papers: Get the list of curated daily papers
  • Collection Tools

    • search-collections: Search collections with various filters
    • get-collection-info: Get detailed information about a specific collection

Configuration

The server does not require configuration, but supports optional Hugging Face authentication:

  • Set HF_TOKEN environment variable with your Hugging Face API token for:
    • Higher API rate limits
    • Access to private repositories (if authorized)
    • Improved reliability for high-volume requests

Quickstart

Install

Installing via Smithery

To install huggingface-mcp-server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @shreyaskarnik/huggingface-mcp-server --client claude

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

"mcpServers": {
GitHub で README 全文を見る

インストール

npx -y @smithery/cli install @shreyaskarnik/huggingface-mcp-server --client claude
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

"mcpServers": { "huggingface": { "command": "uv", "args": [ "--directory", "/absolute/path/to/huggingface-mcp-server", "run", "huggingface_mcp_server.py" ], "env": { "HF_TOKEN": "your_token_here" // Optional } } }