1---
2title: Model Context Protocol (MCP) in Zed
3description: Install and configure MCP servers in Zed to extend your AI agent with external tools, data sources, and integrations.
4---
5
6# Model Context Protocol
7
8Zed uses the [Model Context Protocol](https://modelcontextprotocol.io/) to interact with context servers.
9
10> The Model Context Protocol (MCP) is an open protocol for connecting LLM applications to external tools and data sources through a standard interface.
11
12## Supported Features
13
14Zed currently supports MCP's [Tools](https://modelcontextprotocol.io/specification/2025-11-25/server/tools) and [Prompts](https://modelcontextprotocol.io/specification/2025-11-25/server/prompts) features.
15We welcome contributions that help advance Zed's MCP feature coverage (Discovery, Sampling, Elicitation, etc).
16
17Zed also handles the `notifications/tools/list_changed` notification from MCP servers. When a server adds, removes, or modifies its available tools at runtime, Zed automatically reloads the tool list without requiring a server restart.
18
19## Installing MCP Servers
20
21### As Extensions
22
23One of the ways you can use MCP servers in Zed is by exposing them as an extension.
24Check out the [MCP Server Extensions](../extensions/mcp-extensions.md) page to learn how to create your own.
25
26Many MCP servers are available as extensions. Find them via:
27
281. [the Zed website](https://zed.dev/extensions?filter=context-servers)
292. in the app, open the Command Palette and run the `zed: extensions` action
303. in the app, go to the Agent Panel's top-right menu and look for the "View Server Extensions" menu item
31
32Popular servers available as an extension include:
33
34- [Context7](https://zed.dev/extensions/context7-mcp-server)
35- [GitHub](https://zed.dev/extensions/github-mcp-server)
36- [Puppeteer](https://zed.dev/extensions/puppeteer-mcp-server)
37- [Gem](https://zed.dev/extensions/gem)
38- [Brave Search](https://zed.dev/extensions/brave-search-mcp-server)
39- [Prisma](https://github.com/aqrln/prisma-mcp-zed)
40- [Framelink Figma](https://zed.dev/extensions/framelink-figma-mcp-server)
41- [Linear](https://zed.dev/extensions/linear-mcp-server)
42- [Resend](https://zed.dev/extensions/resend-mcp-server)
43
44### As Custom Servers
45
46Creating an extension is not the only way to use MCP servers in Zed.
47You can connect them by adding their commands directly to your settings file ([how to edit](../configuring-zed.md#settings-files)), like so:
48
49```json [settings]
50{
51 "context_servers": {
52 "local-mcp-server": {
53 "command": "some-command",
54 "args": ["arg-1", "arg-2"],
55 "env": {}
56 },
57 "remote-mcp-server": {
58 "url": "custom",
59 "headers": { "Authorization": "Bearer <token>" }
60 }
61 }
62}
63```
64
65Alternatively, you can also add a custom server by accessing the Agent Panel's Settings view (also accessible via the `agent: open settings` action).
66From there, you can add it through the modal that appears when you click the "Add Custom Server" button.
67
68## Using MCP Servers
69
70### Configuration Check
71
72Most MCP servers require configuration after installation.
73
74In the case of extensions, after installing it, Zed will pop up a modal displaying what is required for you to properly set it up.
75For example, the GitHub MCP extension requires you to add a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
76
77In the case of custom servers, make sure you check the provider documentation to determine what type of command, arguments, and environment variables need to be added to the JSON.
78
79To check if your MCP server is properly configured, go to the Agent Panel's settings view and watch the indicator dot next to its name.
80If they're running correctly, the indicator will be green and its tooltip will say "Server is active".
81If not, other colors and tooltip messages will indicate what is happening.
82
83### Agent Panel Usage
84
85Once installation is complete, you can return to the Agent Panel and start prompting.
86
87How reliably MCP tools get called can vary from model to model.
88Mentioning the MCP server by name can help the model pick tools from that server.
89
90If you want to _ensure_ a given MCP server will be used, you can create [a custom profile](./agent-panel.md#custom-profiles) where all built-in tools (or the ones that could cause conflicts with the server's tools) are turned off and only the tools coming from the MCP server are turned on.
91
92As an example, [the Dagger team suggests](https://container-use.com/agent-integrations#zed) doing that with their [Container Use MCP server](https://zed.dev/extensions/mcp-server-container-use):
93
94```json [settings]
95"agent": {
96 "profiles": {
97 "container-use": {
98 "name": "Container Use",
99 "tools": {
100 "fetch": true,
101 "thinking": true,
102 "copy_path": false,
103 "find_path": false,
104 "delete_path": false,
105 "create_directory": false,
106 "list_directory": false,
107 "diagnostics": false,
108 "read_file": false,
109 "open": false,
110 "move_path": false,
111 "grep": false,
112 "edit_file": false,
113 "terminal": false
114 },
115 "enable_all_context_servers": false,
116 "context_servers": {
117 "container-use": {
118 "tools": {
119 "environment_create": true,
120 "environment_add_service": true,
121 "environment_update": true,
122 "environment_run_cmd": true,
123 "environment_open": true,
124 "environment_file_write": true,
125 "environment_file_read": true,
126 "environment_file_list": true,
127 "environment_file_delete": true,
128 "environment_checkpoint": true
129 }
130 }
131 }
132 }
133 }
134}
135```
136
137### Tool Permissions
138
139> **Note:** In Zed v0.224.0 and above, tool approval is controlled by `agent.tool_permissions.default`.
140> In earlier versions, it was controlled by the `agent.always_allow_tool_actions` boolean (default `false`).
141
142Zed's Agent Panel provides the `agent.tool_permissions.default` setting to control tool approval behavior for the native Zed agent:
143
144- `"confirm"` (default) — Prompts for approval before running any tool action, including MCP tool calls
145- `"allow"` — Auto-approves tool actions without prompting
146- `"deny"` — Blocks all tool actions
147
148For granular control over specific MCP tools, you can configure per-tool permission rules.
149MCP tools use the key format `mcp:<server>:<tool_name>` — for example, `mcp:github:create_issue`.
150The `default` key on a per-tool entry is the primary mechanism for MCP tools, since pattern-based rules match against an empty string for MCP tools and most patterns won't match.
151
152Learn more about [how tool permissions work](./tool-permissions.md), how to further customize them, and other details.
153
154### External Agents
155
156Note that for [external agents](./external-agents.md) connected through the [Agent Client Protocol](https://agentclientprotocol.com/), access to MCP servers installed from Zed may vary depending on the ACP agent implementation.
157
158Regarding the built-in ones, Claude Agent and Codex both support it, and Gemini CLI does not yet.
159In the meantime, learn how to add MCP server support to Gemini CLI through [their documentation](https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#using-mcp-servers).