This guide explains how to set up MCP Connect with the Zed editor.
.mcp-connect.jsonGenerate the Zed configuration file:
mcp-connect generate --ide zed
This creates or updates ~/.config/zed/settings.json with the MCP Connect server configuration.
Restart Zed (or reload the window) for the changes to take effect.
mcp-connect appears in the list of context serversThe generated configuration adds the following to your Zed settings:
{
"context_servers": {
"mcp-connect": {
"source": "custom",
"command": "/path/to/mcp-connect",
"args": ["serve"]
}
}
}
To specify a custom location for the settings file:
mcp-connect generate --ide zed --output /path/to/settings.json
If you prefer to configure manually, add the following to ~/.config/zed/settings.json:
{
"context_servers": {
"mcp-connect": {
"source": "custom",
"command": "/absolute/path/to/mcp-connect",
"args": ["serve"]
}
}
}
Important: Use the absolute path to the mcp-connect binary.
settings.json is correctmcp-connect is executablemcp-connect config validatemcp-connect serve --debug to see errors.env file is in the project rootmcp-connect config test --all.env are correctIf your .mcp-connect.json is in a different location:
{
"context_servers": {
"mcp-connect": {
"source": "custom",
"command": "/path/to/mcp-connect",
"args": ["serve"],
"cwd": "/path/to/project"
}
}
}
Set environment variables directly in Zed config:
{
"context_servers": {
"mcp-connect": {
"source": "custom",
"command": "/path/to/mcp-connect",
"args": ["serve"],
"env": {
"GITHUB_TOKEN": "your-token-here",
"CONTEXT7_API_KEY": "your-key-here"
}
}
}
}
Note: Using .env file is recommended over hardcoding credentials.
When you add or remove servers, regenerate the configuration:
mcp-connect generate --ide zed
The command safely merges with existing settings, preserving other configuration.