What is Zed?
Zed is a next-generation code editor built from the ground up in Rust for maximum performance. Created by the team behind Atom and Tree-sitter, Zed offers native speed, real-time collaboration, and integrated AI assistance.
Zed is designed for speed—it's one of the fastest editors available, with GPU-accelerated rendering and efficient memory usage. The AI features are built-in, not bolted on.
With MCP support (via “context servers”), Zed's AI assistant can access external tools, databases, and APIs—extending its capabilities beyond the codebase.
Context Servers Overview
Zed uses the term “context servers” for MCP servers. There are three ways to add them:
| Method | Complexity | Use Case | Description |
|---|---|---|---|
| Extensions | Easy | Popular, pre-packaged servers | Install MCP servers as Zed extensions from the extension gallery. |
| Custom Command | Medium | Custom local servers | Configure local stdio servers with command, args, and environment. |
| Custom URL | Medium | Remote/cloud servers | Connect to remote HTTP servers with optional headers. |
Configuration Location
Context servers are configured in Zed's settings.json file:
# Open settings with:# Cmd+, (macOS) or Ctrl+, (Linux)# Or via Command Palette: "zed: open settings"# Settings location:# macOS: ~/Library/Application Support/Zed/settings.json# Linux: ~/.config/zed/settings.jsons.jsonInstalling via Extensions
The easiest way to add MCP servers is through Zed's extension gallery:
- Open the Extensions panel (Cmd+Shift+X)
- Search for the MCP server you want (e.g., “postgres”, “puppeteer”)
- Click “Install” on the extension
- Configure any required settings in settings.json
- The context server will be available in the AI panel
Popular MCP Extensions
Postgres Context Server
DatabaseQuery and explore PostgreSQL databases
Puppeteer
AutomationBrowser automation and web scraping
Fetch
NetworkMake HTTP requests to external APIs
Memory
ContextPersistent memory across sessions
Tip
Extensions that provide context servers will appear in Zed's AI assistant automatically once installed. Check the extension's documentation for any required configuration.
Custom Server Configuration
For custom MCP servers not available as extensions, configure them directly in settings.json:
Basic Structure
{
"context_servers": {
"server-name": {
"command": "executable",
"args": ["arg1", "arg2"],
"env": {
"ENV_VAR": "value"
}
}
}
}Configuration Fields
| Field | Required | Description | Example |
|---|---|---|---|
| command | For stdio | Command to run the MCP server | "npx" |
| args | No | Arguments for the command | ["-y", "@modelcontextprotocol/server-filesystem"] |
| env | No | Environment variables | {"API_KEY": "your-key"} |
| url | For HTTP | URL for remote MCP server | "https://api.example.com/mcp" |
| headers | No | HTTP headers for authentication | {"Authorization": "Bearer token"} |
Configuration Examples
Filesystem Server
Allow the AI to read and write files in specific directories:
{
"context_servers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/projects",
"/Users/username/documents"
]
}
}
}GitHub Integration
{
"context_servers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}Remote HTTP Server
Connect to a remote MCP server:
{
"context_servers": {
"remote-api": {
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer your-api-token"
}
}
}
}Multiple Servers
{
"context_servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost:5432/db"
}
}
}
}Agent Profiles
Zed allows you to create custom agent profiles to control which tools are available in different contexts. This is useful for creating specialised AI assistants.
Creating Agent Profiles
Define profiles in your settings.json:
{
"agent": {
"profiles": {
"default": {
"tools": {
"filesystem": true,
"github": true,
"postgres": false
}
},
"database-admin": {
"tools": {
"filesystem": false,
"github": false,
"postgres": true
}
},
"full-access": {
"tools": {
"filesystem": true,
"github": true,
"postgres": true
}
}
}
}
}Use Case
Agent profiles let you restrict tools based on your current task. For example, use a “database-admin” profile when working with databases to avoid accidentally using file system tools.
Tool Approval Settings
By default, Zed asks for approval before executing MCP tools. You can configure this behaviour in settings:
Always Allow Tools
To skip approval prompts for all tool actions:
{
"agent": {
"always_allow_tool_actions": true
}
}Security Warning
Enabling always_allow_tool_actions means the AI can execute tools without your explicit approval. Only enable this for trusted tools and development environments.
Per-Tool Approval
When approval is required (default), Zed will prompt you before each tool execution. You can:
- Approve: Execute the tool this time
- Deny: Skip the tool execution
- View Details: See the parameters before deciding
Troubleshooting
Context server not appearing
- • Check settings.json syntax is valid JSON
- • Verify the command exists in your PATH
- • Restart Zed after configuration changes
- • Check the Zed logs for error messages
npx servers fail to start
- • Ensure Node.js is installed and npx is available
- • Try running the command manually in terminal first
- • Clear npm cache:
npm cache clean --force - • Check for proxy or firewall blocking npm registry
Extension not providing tools
- • Check the extension's documentation for required configuration
- • Verify any API keys or credentials are set correctly
- • Try reinstalling the extension
- • Check for extension updates
Environment variables not working
- • Zed uses the env block in settings, not shell environment
- • Ensure values are strings (quoted in JSON)
- • Try using absolute paths for file-based credentials
- • Restart Zed after changing environment configuration
How to view logs
- • Open Command Palette (Cmd+Shift+P)
- • Search for “zed: open log”
- • Look for context server related errors
High Performance + Extensibility
Zed combines fast performance with deep AI integration. With context servers, you get the speed of a native editor with the extensibility of MCP, accessing databases, APIs, and external tools without leaving your editor.
Frequently Asked Questions
Zed calls MCP servers "context servers" and configures them in settings.json under the context_servers key. Open settings with Cmd+, (macOS) or Ctrl+, (Linux). The file is located at ~/Library/Application Support/Zed/settings.json (macOS) or ~/.config/zed/settings.json (Linux).
Open the Extensions panel (Cmd+Shift+X), search for the MCP server you want (e.g., "postgres", "puppeteer"), click Install, and configure any required settings in settings.json. The context server will automatically appear in the AI panel.
Yes, set "agent": {"always_allow_tool_actions": true} in your settings.json. However, this means the AI can execute tools without your explicit approval, so only enable this for trusted tools in development environments.
Agent profiles let you control which tools are available in different contexts. Define profiles under agent.profiles in settings.json with tool configurations (true/false). For example, create a "database-admin" profile that only enables database tools.
Check settings.json for valid JSON syntax. Verify the command exists in your PATH. Restart Zed after configuration changes. Open Command Palette and search for "zed: open log" to view error messages related to context servers.
References & Further Reading
- Zed Context Servers Documentation- Official guide to MCP in Zed
- Zed Editor- High-performance code editor built in Rust
- Model Context Protocol – Official Documentation- Complete MCP specification and guides
- Official MCP Servers Repository- Reference implementations and pre-built servers
- Zed Extensions Gallery- Browse available Zed extensions including MCP servers
- Building MCP Servers- Guide to creating custom MCP servers
- Zed GitHub Repository- Open source Zed codebase

