这是 Hugging Face 官方的 MCP 服务器吗?
不是。本条目是 Shreyas Karnik 开发的社区项目。官方 Hugging Face MCP 服务器由 Hugging Face 托管在 `https://huggingface.co/mcp`,源码位于 github.com/huggingface/hf-mcp-server。
@shreyaskarnik
基本信息
暂无概览
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"huggingface-mcp-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@shreyaskarnik/huggingface-mcp-server",
"--client",
"claude"
]
}
}
}Search models with filters for query, author, tags, and limit
Get detailed information about a specific model
Search datasets with filters
Get detailed information about a specific dataset
Search Spaces with filters including SDK type
Get detailed information about a specific Space
Get information about a paper and its implementations
Get the list of curated daily papers
Search collections with various filters
Get detailed information about a specific collection
Hugging Face MCP Server 是由 Shreyas Karnik 开发的社区版 huggingface mcp server,为 Claude 等 MCP 客户端提供对 Hugging Face Hub 的只读访问:可以搜索和查看模型、数据集、Spaces、论文和合集。
它是一个小型 Python 服务器,在本地通过 stdio 运行,调用公开的 Hub API。它不是 Hugging Face 官方的 MCP 服务器;Hugging Face 自己托管的服务器位于 https://huggingface.co/mcp,下文的对比部分会介绍。
前置条件:
pyproject.toml 要求 >=3.13)https://github.com/shreyaskarnik/huggingface-mcp-server 的本地克隆https://huggingface.co/settings/tokens 获取的 Hugging Face 访问令牌,设置为 HF_TOKEN不需要 API 密钥。README 将 HF_TOKEN 列为可选项,用于获得更高的速率限制和访问私有仓库。
README 提供的 Claude Desktop 一步安装命令:
npx -y @smithery/cli install @shreyaskarnik/huggingface-mcp-server --client claude
编辑 claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json{
"mcpServers": {
"huggingface": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/huggingface-mcp-server",
"run",
"huggingface"
],
"env": {
"HF_TOKEN": "your_token_here"
}
}
}
}
README 中的示例运行的是 huggingface_mcp_server.py,但当前仓库里没有这个文件。服务器代码位于 src/huggingface/,pyproject.toml 定义了 huggingface 命令,Smithery 配置启动的也是这个命令,所以上面的示例运行 huggingface。保存后重启 Claude Desktop。
通过 stdio 注册同一个本地命令:
claude mcp add huggingface -- uv --directory /absolute/path/to/huggingface-mcp-server run huggingface
在客户端的 MCP 配置文件中使用与 Claude Desktop 条目相同的 command 和 args。如果你想在 Cursor 或 VS Code 中一键配置远程服务器,请改用官方托管服务器(见下文)。
hf:// URI 方案用于资源:hf://model/{model_id}、hf://dataset/{dataset_id}、hf://space/{space_id},均以 JSON 返回compare-models(接收逗号分隔的 model_ids)和 summarize-paper(接收 arxiv_id,可选 detail_level,取值 brief 或 detailed)HF_TOKEN 为可选项uv 安装工具分为五组:
search-models 可按关键词、作者、标签和数量过滤;get-model-info 返回单个模型的详细信息。search-datasets 和 get-dataset-info 对数据集提供同样的功能。search-spaces 可按 SDK 类型(如 Gradio)过滤;get-space-info 返回单个 Space 的详细信息。get-paper-info 按 arXiv ID 查询论文及其在 Hub 上的实现;get-daily-papers 返回每日精选论文列表。search-collections 和 get-collection-info 用于浏览精选合集。这些工具都不会运行推理或生成内容,只返回 Hub 元数据。
compare-models 提示模板。官方 Hugging Face MCP 服务器(https://huggingface.co/mcp,源码位于 huggingface/hf-mcp-server)。这是 Hugging Face 维护的托管服务器,通过 HTTP 连接,本地无需运行任何程序。它支持通过 ?login 登录,或使用 Authorization: Bearer <YOUR_HF_TOKEN> 请求头。工具和 Spaces 在 https://huggingface.co/settings/mcp 中选择。除了 Hub 搜索,它还能调用支持 MCP 的 Gradio Spaces,例如生成图片。官方文档提供了 Claude Desktop/claude.ai、Claude Code、Gemini CLI、VS Code 和 Cursor 的配置方法。在 Claude Code 中:
claude mcp add hf-mcp-server -t http https://huggingface.co/mcp?login
在 Cursor 或 VS Code 中使用令牌时,官方配置片段为:
"huggingface": {
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer <YOUR_HF_TOKEN>"
}
}
本社区服务器。 它是一套固定的只读工具,运行在你自己的机器上。如果你想要一个无需登录 Hugging Face 的小型本地进程,或者需要 hf:// 资源和两个提示模板,它会比较合适。该仓库自 2025 年 3 月以来没有新的提交。
如今搜索 "hugging face mcp" 的大多数人需要的是官方托管服务器。只有在明确需要本地只读 Hub 浏览器时,才选择这个社区版本。
~/Library/Logs/Claude/mcp-server-huggingface.log(macOS)或 %APPDATA%\Claude\logs\mcp-server-huggingface.log(Windows)。常见原因是让 uv run 运行仓库中不存在的 huggingface_mcp_server.py。请改为运行 huggingface,并确保 --directory 是绝对路径。uv 安装匹配的解释器,或升级现有版本。npx @modelcontextprotocol/inspector uv --directory /path/to/huggingface-mcp-server run huggingface,然后打开它输出的 URL。不是。本条目是 Shreyas Karnik 开发的社区项目。官方 Hugging Face MCP 服务器由 Hugging Face 托管在 `https://huggingface.co/mcp`,源码位于 github.com/huggingface/hf-mcp-server。
免费。该服务器基于 MIT 许可证开源,读取公开的 Hugging Face Hub API,无需令牌。
不需要。README 将 `HF_TOKEN` 列为可选项,用于获得更高的速率限制和访问私有仓库。没有令牌时,服务器读取公开的 Hub 数据。
可以。它是标准的 stdio MCP 服务器,任何能启动本地命令的客户端都能运行它。不过 README 只介绍了 Claude Desktop 和 Smithery。如果想在 Cursor、VS Code 或 Claude Code 中一键配置,官方托管服务器提供了相应的文档说明。
本地。它在你的机器上通过 stdio 运行。官方 Hugging Face MCP 服务器是远程的,通过 HTTP 连接 `https://huggingface.co/mcp`。
不能。它是只读的,可以搜索和获取模型、数据集、Spaces、论文和合集的信息,但不能上传、编辑或删除任何内容。
不能。该服务器只返回 Hub 元数据。如果想在助手中运行图片生成等 Gradio Spaces,请使用官方 Hugging Face MCP 服务器,并在 `https://huggingface.co/settings/mcp` 中添加 Spaces。
它把 Hub 条目以 MCP 资源的形式提供:`hf://model/{model_id}`、`hf://dataset/{dataset_id}` 和 `hf://space/{space_id}`。支持资源的客户端可以把这些条目作为 JSON 上下文附加进来。

MCP server for the Pocket Network agentic marketplace: search our catalog of data services and utilities and call them, paying per request in USDC on Base with x402. No account or API key. Search and describe are free; p

Quantum-inspired keyring for AI coding agents. Secure secrets with superposition, entanglement, tunneling, and teleportation — CLI + 44 MCP tools.
28-tool MCP server for web scraping, crawling, deep research & autonomous extraction — clean Markdown & structured JSON for Claude, Cursor & any MCP client. 1,000 free one-time credits, local-Ollama LLM support.
Model Context Protocol (MCP) server for Hostinger API. If you don't want to install or run anything locally, connect directly to Hostinger's hosted MCP server: This opens a browser window to authorize via OAuth. Once app

Krafters is a French club of specialized AIs for freelancers and small businesses. Its connector opens the member's AI kits for Facebook and Instagram ads, SEO/GEO and short videos directly in Claude, and gives the next
评论