SH

shreyaskarnik/huggingface-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

72 stars 10 forks Качество 66 Тренд 0MIT

shreyaskarnik/huggingface-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/shreyaskarnik/huggingface-mcp-server.

Обзор

shreyaskarnik/huggingface-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/shreyaskarnik/huggingface-mcp-server.

Обзор (машинный перевод)

Сервер Model Context Protocol (MCP), который предоставляет доступ только для чтения к API Hugging Face Hub. Этот сервер позволяет LLM, таким как Claude, взаимодействовать с моделями Hugging Face, наборами данных, пространствами, документами и коллекциями.

Компоненты

###Ресурсы

Сервер раскрывает популярные ресурсы Hugging Face:

Пользовательская схема URI для доступа к ресурсам

  • Модели с hf://model/{model_id} Ури Наборы данных с hf://dataset/{dataset_id} Ури Пространства с hf://space/{space_id} Ури Все ресурсы имеют описательные имена и тип контента JSON.

###Быстрые предложения

Сервер предоставляет два быстрых шаблона:

  • [[Т4]]: Сравнение нескольких моделей Hugging Face

  • Требуемый аргумент model_ids (идентификаторы модели, разделенные запятой) Получает детали модели и форматирует их для сравнения

  • [[Т6]]: Оригинальное название: Hugging Face

  • Требуемый аргумент arxiv_id для идентификации бумаги

  • Факультативный аргумент detail_level (краткий/подробный) для контроля глубины резюме

  • Сочетает бумажные метаданные с деталями реализации

Инструменты

Сервер реализует несколько категорий инструментов:

** Инструменты для моделей**

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

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": {
Открыть полный README на GitHub

Установка

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 } } }