---
title: "Windsurf / Devin Desktop MCP 配置：文件路径、键和示例 · DotsAgent"
description: "从 Cognition 向 Windsurf / Devin Desktop 添加 MCP 服务器：了解配置文件位置、顶层键和格式、远程 OAuth 支持，以及配置示例。"
url: https://dotsagent.io/zh/mcp/clients/windsurf
---

Cognition

# 向 Windsurf / Devin Desktop 添加 MCP 服务器

Windsurf 现已更名为 Devin Desktop。它会读取 mcp_config.json，但官方文档对文件位置的说法不一致。

- **macOS**: `~/.config/devin/mcp_config.json (current Cascade doc); legacy ~/.codeium/windsurf/mcp_config.json; FAQ says ~/.codeium/mcp_config.json`
- **Windows**: `%APPDATA%\devin\mcp_config.json (current Cascade doc)`
- **Linux**: `~/.config/devin/mcp_config.json (or $XDG_CONFIG_HOME/devin/mcp_config.json)`
- **项目文件**: `.devin/mcp_config.json (Devin CLI / Devin Local project scope)`
- **顶层键**: `mcpServers`
- **格式**: json
- **远程服务器的 OAuth**: 

## 配置示例

此示例按该客户端所需的格式，添加 GitHub 托管的服务器和作为本地服务器的 Playwright。

`.devin/mcp_config.json`

```
{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "transport": "http"
    },
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
```

`shell`

```
devin mcp add github https://api.githubcopilot.com/mcp/
devin mcp add playwright -- npx @playwright/mcp@latest
```

## 注意事项和特殊情况

- Windsurf 于 2026-06-02 更名为 Devin Desktop，Devin Local 现为默认 agent。
- Cascade 文档给出的路径是 ~/.config/devin/mcp_config.json，FAQ 给出的是 ~/.codeium/mcp_config.json，旧路径则是 ~/.codeium/windsurf/mcp_config.json。请确认你的版本实际读取哪个文件。
- Devin Local 会在 .devin/mcp_config.json 和 .devin/mcp_config.local.json 中添加项目级配置。
- 远程条目支持 url、transport http 或 sse、headers、oauthClientId、oauthClientSecret 和 oauthResource；Cascade 也接受 serverUrl。
- 值可以使用 ${env:VAR} 和 ${file:path}；Cascade 最多支持 100 个工具。

[生成 Windsurf / Devin Desktop 配置 →](https://dotsagent.io/zh/mcp/config#client=windsurf)

## 其他客户端

[Claude Desktop](https://dotsagent.io/zh/mcp/clients/claude-desktop)

[Claude Code](https://dotsagent.io/zh/mcp/clients/claude-code)

[Cursor](https://dotsagent.io/zh/mcp/clients/cursor)

[VS Code (GitHub Copilot)](https://dotsagent.io/zh/mcp/clients/vscode-copilot)

[Zed](https://dotsagent.io/zh/mcp/clients/zed)

[OpenAI Codex CLI](https://dotsagent.io/zh/mcp/clients/codex-cli)

[Gemini CLI](https://dotsagent.io/zh/mcp/clients/gemini-cli)

[ChatGPT](https://dotsagent.io/zh/mcp/clients/chatgpt)

[OpenClaw](https://dotsagent.io/zh/mcp/clients/openclaw)

[Cline](https://dotsagent.io/zh/mcp/clients/cline)

[Continue](https://dotsagent.io/zh/mcp/clients/continue)

[JetBrains AI Assistant](https://dotsagent.io/zh/mcp/clients/jetbrains-ai)

## 来源

1. [docs.windsurf.com](https://docs.windsurf.com/windsurf/cascade/mcp)/windsurf/cascade/mcp
2. [docs.devin.ai](https://docs.devin.ai/desktop/devin-desktop-faq)/desktop/devin-desktop-faq
3. [docs.devin.ai](https://docs.devin.ai/cli/extensibility/mcp/configuration.md)/cli/extensibility/mcp/configuration.md
4. [code.visualstudio.com](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)/docs/copilot/customization/mcp-servers

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

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