docs/installation-guides/install-zed.md
Zed is a high-performance multiplayer code editor with native MCP support. Zed exposes MCP servers under the context_servers settings key. For general setup information (prerequisites, Docker installation, security best practices), see the Installation Guides README.
agent.tool_permissions settings shape)There are two ways to install the GitHub MCP server in Zed:
zed: extensions action. After installation, Zed pops up a modal asking for your GitHub Personal Access Token.settings.json to use either GitHub's hosted remote server or the official Docker image directly. The rest of this guide covers Option B.Uses GitHub's hosted server at https://api.githubcopilot.com/mcp/. Open your Zed settings file (Command Palette → zed: open settings) and add the configuration below under context_servers.
{
"context_servers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer YOUR_GITHUB_PAT"
}
}
}
}
Replace YOUR_GITHUB_PAT with your GitHub Personal Access Token. To customize toolsets, add server-side headers like X-MCP-Toolsets or X-MCP-Readonly to the headers object — see the Server Configuration Guide.
[!NOTE] If you omit the
Authorizationheader, Zed will attempt the standard MCP OAuth flow on first use. The GitHub MCP server does not currently advertise OAuth for non-Copilot hosts, so a Personal Access Token in theAuthorizationheader is the supported path.
The local GitHub MCP server runs via Docker and requires Docker Desktop (or another Docker runtime) to be installed and running.
{
"context_servers": {
"github": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
}
}
}
}
[!IMPORTANT] Zed expects
commandas a string plus a separateargsarray, not a single array combining both. This differs from hosts like OpenCode and Claude Desktop.
agent: open settings).github in the context servers list. A green indicator dot with the tooltip "Server is active" confirms a working configuration. Other colors and tooltip messages indicate startup or auth errors.List my recent GitHub pull requests. Zed will prompt for tool approval before the first call unless your agent.tool_permissions.default is set to "allow".Zed v0.224.0+ controls tool approval via agent.tool_permissions. Approve a specific GitHub MCP tool without per-call prompts by using the mcp:<server>:<tool_name> key format:
{
"agent": {
"tool_permissions": {
"default": "confirm",
"rules": [
{ "tool": "mcp:github:list_pull_requests", "permission": "allow" },
{ "tool": "mcp:github:list_issues", "permission": "allow" }
]
}
}
}
See the Zed tool permissions docs for the full schema.
settings.json — Zed surfaces JSON parse errors in the editor itself.401 Unauthorized: verify your PAT has not expired and includes the scopes for the tools you intend to call. The remote endpoint will reject requests with no Authorization header (no anonymous access).enable_all_context_servers is true or that github is explicitly listed.ghcr.io/github/github-mcp-server image has been pulled at least once. Try docker pull ghcr.io/github/github-mcp-server from a terminal.context_servers (not mcpServers).command is a string + separate args array.Authorization triggers Zed's MCP OAuth flow, but the GitHub MCP server's PAT-based auth is the supported path today.context_servers are forwarded to external agents via the Agent Client Protocol.