dotsagent.io
语言:简体中文
连接 · 13 款客户端

MCP 客户端配置参考

每款 MCP 客户端都会从自己的位置读取服务器配置,使用各自的键,有时还采用不同的格式。此表列出了每款客户端读取配置的位置、所需的配置结构,以及是否支持远程服务器的 OAuth。

客户端配置文件顶层键格式远程 OAuth通过 CLI 添加
Claude Desktop
Anthropic
~/Library/Application Support/Claude/claude_desktop_config.jsonmcpServersjson是否
Claude Code
Anthropic
.mcp.jsonmcpServersjson是是
Cursor
Anysphere
.cursor/mcp.jsonmcpServersjson是否
VS Code (GitHub Copilot)
Microsoft
.vscode/mcp.json (key 'servers') or portable .mcp.json (key 'mcpServers')serversjson是是
Windsurf / Devin Desktop
Cognition
.devin/mcp_config.json (Devin CLI / Devin Local project scope)mcpServersjson是是
Zed
Zed Industries
~/.config/zed/settings.jsoncontext_serversjson是否
OpenAI Codex CLI
OpenAI
.codex/config.toml (trusted projects only)mcp_serverstoml是是
Gemini CLI
Google
.gemini/settings.jsonmcpServersjson是是
ChatGPT
OpenAI
仅限设置界面——是否
OpenClaw
OpenClaw
~/.openclaw/openclaw.jsonmcp.serversjson5是是
Cline
Cline Bot Inc.
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonmcpServersjson未提供文档是
Continue
Continue Dev
.continue/mcpServers/<name>.yaml (or drop a Claude/Cursor/Cline-style mcp.json into .continue/mcpServers/)mcpServersyaml未提供文档否
JetBrains AI Assistant
JetBrains
仅限设置界面mcpServersjson (pasted in UI)未提供文档否

容易导致配置失败的差异

VS Code 使用 servers

.vscode/mcp.json 使用 servers 而非 mcpServers 列出配置项,因此直接粘贴 Cursor 或 Claude 的配置无法加载。较新的通用配置文件 .mcp.json 和 ~/.copilot/mcp-config.json 则使用 mcpServers。

Gemini CLI 使用 httpUrl,而非 url

Gemini CLI 根据字段名选择传输方式。httpUrl 表示 Streamable HTTP,url 表示旧版 SSE 传输方式,command 表示 stdio。现代远程服务器需要使用 httpUrl。

OpenClaw 和 Cline 默认使用 SSE

远程配置项如果未指定传输方式,两者都会回退到旧版 SSE。在 OpenClaw 中将 transport 设为 streamable-http,在 Cline 中将 type 设为 streamableHttp。

Claude Code 需要设置 type

在 .mcp.json 中,远程条目如果有 url 却没有 type,就会报错。在 url 旁添加 type http;stdio 条目则使用 type stdio。

Codex 使用 TOML,每个服务器对应一个表

Codex 不使用 JSON 文件。每个服务器在 config.toml 中都有自己的 [mcp_servers.<name>] 表,args 是 TOML 数组,而 env_vars 会按名称从你的 shell 转发密钥。

Continue 要求使用 YAML 列表

在 Continue 中,mcpServers 是一个条目列表,每个条目都包含 name,而不是以名称为键的映射。每个 block 文件顶部还必须包含 name、version 和 schema: v1。

生成配置 →

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

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