# 客户端配置概述 AgentFox 使用 MCP 协议的 Streamable HTTP 传输方式,兼容所有支持 MCP 的 AI 工具。 ## 通用配置模板 所有 MCP 客户端都使用类似的 JSON 配置格式: ```json { "mcpServers": { "my-api": { "type": "http", "url": "https://www.agentfoxapp.com/mcp/{projectId}", "headers": { "Authorization": "Bearer {your-api-key}" } } } } ``` ### 配置字段说明 | 字段 | 说明 | |------|------| | `mcpServers` | MCP 服务器配置的顶层对象 | | `my-api` | 服务器名称,可自定义(建议使用 API 名称,如 `stripe-api`) | | `type` | 传输类型,必须为 `http` | | `url` | MCP 服务 URL,从项目详情的 MCP 标签页复制 | | `headers.Authorization` | 认证头,格式为 `Bearer {你的API-Key}` | ### 获取配置信息 1. 登录 [AgentFox 控制台](https://www.agentfoxapp.com) 2. 进入项目详情页 → 「MCP」标签 3. 复制 MCP 服务 URL 4. 从「设置」中获取 API Key > **提示**:MCP 标签页中有预生成的配置代码片段,可一键复制。 ## 多项目配置 如果你有多个项目,可以在 `mcpServers` 中添加多个服务器: ```json { "mcpServers": { "stripe-api": { "type": "http", "url": "https://www.agentfoxapp.com/mcp/project-id-1", "headers": { "Authorization": "Bearer afk_your-api-key" } }, "github-api": { "type": "http", "url": "https://www.agentfoxapp.com/mcp/project-id-2", "headers": { "Authorization": "Bearer afk_your-api-key" } } } } ``` ## 支持的客户端 | 客户端 | 类型 | 配置指南 | |--------|------|---------| | [Claude Desktop](claude-desktop.md) | 桌面应用 | JSON 配置文件 | | [Claude Code](claude-code.md) | CLI 工具 | 项目级或全局配置 | | [Cursor](cursor.md) | AI 编辑器 | 设置或配置文件 | | [Windsurf](windsurf.md) | AI 编辑器 | JSON 配置文件 | | [GitHub Copilot](github-copilot.md) | VS Code 扩展 | VS Code 配置 | | [Cline](cline.md) | VS Code 扩展 | 扩展设置 | | [Codex](codex.md) | CLI 工具 | CLI 参数或配置文件 | | [其他客户端](other-clients.md) | — | 通用配置 | ## 连接排障 如果连接失败,请检查: 1. **URL 是否正确**:确认 projectId 无误 2. **API Key 是否有效**:确认 Key 未被轮换 3. **网络是否通畅**:确认能访问 `www.agentfoxapp.com` 4. **配置格式**:确认 `type` 为 `http`(不是 `sse` 或 `stdio`)