---
title: "MCP 客户端配置：13 款应用的文件和键 · DotsAgent"
description: "了解 13 款 MCP 客户端（从 Claude Code 到 Zed）存放服务器配置的位置：配置路径、顶层键、格式、远程 OAuth 支持，以及容易导致配置失败的差异。"
url: https://dotsagent.io/zh/mcp/clients
---

连接 · 13 款客户端

# MCP 客户端配置参考

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

| 客户端 | 配置文件 | 顶层键 | 格式 | 远程 OAuth | 通过 CLI 添加 |
| --- | --- | --- | --- | --- | --- |
| [Claude Desktop](https://dotsagent.io/zh/mcp/clients/claude-desktop)Anthropic | `~/Library/Application Support/Claude/claude_desktop_config.json` | `mcpServers` | json | — | — |
| [Claude Code](https://dotsagent.io/zh/mcp/clients/claude-code)Anthropic | `.mcp.json` | `mcpServers` | json | — | — |
| [Cursor](https://dotsagent.io/zh/mcp/clients/cursor)Anysphere | `.cursor/mcp.json` | `mcpServers` | json | — | — |
| [VS Code (GitHub Copilot)](https://dotsagent.io/zh/mcp/clients/vscode-copilot)Microsoft | `.vscode/mcp.json (key 'servers') or portable .mcp.json (key 'mcpServers')` | `servers` | json | — | — |
| [Windsurf / Devin Desktop](https://dotsagent.io/zh/mcp/clients/windsurf)Cognition | `.devin/mcp_config.json (Devin CLI / Devin Local project scope)` | `mcpServers` | json | — | — |
| [Zed](https://dotsagent.io/zh/mcp/clients/zed)Zed Industries | `~/.config/zed/settings.json` | `context_servers` | json | — | — |
| [OpenAI Codex CLI](https://dotsagent.io/zh/mcp/clients/codex-cli)OpenAI | `.codex/config.toml (trusted projects only)` | `mcp_servers` | toml | — | — |
| [Gemini CLI](https://dotsagent.io/zh/mcp/clients/gemini-cli)Google | `.gemini/settings.json` | `mcpServers` | json | — | — |
| [ChatGPT](https://dotsagent.io/zh/mcp/clients/chatgpt)OpenAI | 仅限设置界面 | — | — | — | — |
| [OpenClaw](https://dotsagent.io/zh/mcp/clients/openclaw)OpenClaw | `~/.openclaw/openclaw.json` | `mcp.servers` | json5 | — | — |
| [Cline](https://dotsagent.io/zh/mcp/clients/cline)Cline Bot Inc. | `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` | `mcpServers` | json | — | — |
| [Continue](https://dotsagent.io/zh/mcp/clients/continue)Continue Dev | `.continue/mcpServers/<name>.yaml (or drop a Claude/Cursor/Cline-style mcp.json into .continue/mcpServers/)` | `mcpServers` | yaml | — | — |
| [JetBrains AI Assistant](https://dotsagent.io/zh/mcp/clients/jetbrains-ai)JetBrains | 仅限设置界面 | `mcpServers` | json (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。

[生成配置 →](https://dotsagent.io/zh/mcp/config)

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

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