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

Zed Industries

# 向 Zed 添加 MCP 服务器

Zed 在 settings.json 的 context_servers 下列出 MCP 服务器。

- **macOS**: `~/.config/zed/settings.json`
- **Windows**: `%APPDATA%\Zed\settings.json`
- **Linux**: `~/.config/zed/settings.json`
- **顶层键**: `context_servers`
- **格式**: json
- **远程服务器的 OAuth**: 

## 配置示例

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

`~/.config/zed/settings.json`

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

## 注意事项和特殊情况

- 远程条目需要 url，也可设置 headers。若未提供 Authorization 标头，Zed 会运行标准 MCP OAuth 流程。
- Zed 仅支持 MCP 的 Tools 和 Prompts 功能。
- settings.json 的路径来自次要来源；Zed 的 MCP 页面未说明该路径。
- settings.json 还包含 Zed 的其他设置，因此请合并配置块，而不要替换整个文件。

[生成 Zed 配置 →](https://dotsagent.io/zh/mcp/config#client=zed)

## 其他客户端

[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)

[Windsurf / Devin Desktop](https://dotsagent.io/zh/mcp/clients/windsurf)

[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. [zed.dev](https://zed.dev/docs/ai/mcp)/docs/ai/mcp

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

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