Files
agent-fox/docs/clients/other-clients.md
2026-04-12 20:15:41 +08:00

83 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 其他 MCP 客户端
任何支持 MCP 协议 Streamable HTTP 传输的 AI 工具都可以连接 AgentFox。
## 连接要素
连接 AgentFox 只需要三个信息:
| 要素 | 值 |
|------|-----|
| **传输类型** | HTTPStreamable HTTP |
| **URL** | `https://www.agentfoxapp.com/mcp/{projectId}` |
| **认证** | `Authorization: Bearer {your-api-key}` |
## 通用配置格式
大多数 MCP 客户端使用 JSON 配置:
```json
{
"mcpServers": {
"my-api": {
"type": "http",
"url": "https://www.agentfoxapp.com/mcp/{projectId}",
"headers": {
"Authorization": "Bearer {your-api-key}"
}
}
}
}
```
## 其他已知兼容客户端
### Gemini CLI
Google 的 Gemini CLI 工具支持 MCP 协议。编辑 `~/.gemini/settings.json`
```json
{
"mcpServers": {
"my-api": {
"type": "http",
"url": "https://www.agentfoxapp.com/mcp/{projectId}",
"headers": {
"Authorization": "Bearer {your-api-key}"
}
}
}
}
```
### Antigravity
Antigravity AI 开发平台支持 MCP。在平台的 MCP 配置中添加 AgentFox 服务器即可。
### OpenClaw
OpenClaw AI 开发平台同样支持 MCP 协议,配置方式类似。
## 技术细节
如果你的工具需要手动实现 MCP 客户端连接,以下是关键技术参数:
| 参数 | 值 |
|------|-----|
| 协议 | MCP (Model Context Protocol) |
| 传输方式 | Streamable HTTP |
| HTTP 方法 | POST发送请求、GETSSE 会话恢复、DELETE终止会话 |
| 会话管理 | 通过 `mcp-session-id` 响应头建立,后续请求携带 |
| 认证方式 | HTTP Bearer Token |
| Content-Type | `application/json` |
## 自检清单
如果连接不成功,请检查:
- [ ] 传输类型是 `http`(不是 `sse``stdio`
- [ ] URL 包含正确的 projectId
- [ ] API Key 以 `afk_` 开头
- [ ] Authorization 头格式为 `Bearer {key}`(注意 Bearer 后有空格)
- [ ] 网络可以访问 `www.agentfoxapp.com`