---
title: "Hugging Face：Claude、Cursor、Codex 配置指南 · DotsAgent"
description: "搜索 Hub 上的模型、数据集、论文和文档，并调用由 Hugging Face 托管的 Gradio Spaces 作为工具。 在 13 个 MCP 客户端中配置 Hugging Face。"
url: https://dotsagent.io/zh/mcp/servers/hugging-face
---

模型与记忆 · Hugging Face

# 配置 Hugging Face

搜索 Hub 上的模型、数据集、论文和文档，并调用由 Hugging Face 托管的 Gradio Spaces 作为工具。

- **发布者**: Hugging Face 官方
- **托管端点**: `https://huggingface.co/mcp`
- **传输方式**: streamable-http
- **身份验证**: OAuth，或通过 bearer token 传递 Hugging Face token。
- **可访问内容**: 主要为读取权限；Space 工具可以运行任务。
- **许可证**: MIT
- **源码**: [github.com/huggingface/hf-mcp-server](https://github.com/huggingface/hf-mcp-server)
- **状态**: 活跃

## 安装

此服务器由供应商托管，因此只需添加其 URL，无需在本机运行任何内容。如果需要身份验证，上方的条目会说明具体方式；OAuth 服务器会在首次连接时提示你进行授权。

### Claude Code

`shell`

```
claude mcp add --transport http --scope project hugging-face https://huggingface.co/mcp
```

### Cursor

`.cursor/mcp.json`

```
{
  "mcpServers": {
    "hugging-face": {
      "url": "https://huggingface.co/mcp"
    }
  }
}
```

### Codex

`~/.codex/config.toml`

```
[mcp_servers.hugging-face]
url = "https://huggingface.co/mcp"
```

[其他客户端的配置 →](https://dotsagent.io/zh/mcp/config#add=hugging-face)

## 模型与记忆 中的其他服务器

- [Memory](https://dotsagent.io/zh/mcp/servers/memory): 在本地文件中维护实体和关系的知识图谱，让 Agent 能在不同会话间回忆信息。

- [Sequential Thinking](https://dotsagent.io/zh/mcp/servers/sequential-thinking): 为模型提供一个临时笔记区，用于将问题拆解为编号思路，并进行修改或分支扩展。

- [Pinecone](https://dotsagent.io/zh/mcp/servers/pinecone): 搜索 Pinecone 文档，并通过本地服务器创建 Pinecone 向量索引、写入向量和执行查询。

## 来源

1. [github.com](https://github.com/huggingface/hf-mcp-server)/huggingface/hf-mcp-server

为 AI agent 开发者提供的独立参考资料。与此处提及的任何厂商均无关联。

© 2026 DotsAgent · 事实核查日期：2026年10月1日
