
shreyaskarnik/huggingface-mcp-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
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_idsargument (comma-separated model IDs) - Retrieves model details and formats them for comparison
- Required
-
summarize-paper: Summarizes a research paper from Hugging Face- Required
arxiv_idargument for paper identification - Optional
detail_levelargument (brief/detailed) to control summary depth - Combines paper metadata with implementation details
- Required
Tools
The server implements several tool categories:
-
Model Tools
search-models: Search models with filters for query, author, tags, and limitget-model-info: Get detailed information about a specific model
-
Dataset Tools
search-datasets: Search datasets with filtersget-dataset-info: Get detailed information about a specific dataset
-
Space Tools
search-spaces: Search Spaces with filters including SDK typeget-space-info: Get detailed information about a specific Space
-
Paper Tools
get-paper-info: Get information about a paper and its implementationsget-daily-papers: Get the list of curated daily papers
-
Collection Tools
search-collections: Search collections with various filtersget-collection-info: Get detailed information about a specific collection
Configuration
The server does not require configuration, but supports optional Hugging Face authentication:
- Set
HF_TOKENenvironment 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": {
Установка
npx -y @smithery/cli install @shreyaskarnik/huggingface-mcp-server --client claudeКонфигурация
"mcpServers": {
"huggingface": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/huggingface-mcp-server",
"run",
"huggingface_mcp_server.py"
],
"env": {
"HF_TOKEN": "your_token_here" // Optional
}
}
}