Model Context Protocol

Zed uses the Model Context Protocol to interact with context servers.

The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.

Check out the Anthropic news post and the Zed blog post for an introduction to MCP.

MCP Servers as Extensions

One of the ways you can use MCP servers in Zed is through exposing it as an extension. Check the servers that are already available in Zed's extension store via either the Zed website or directly through the app by running the zed: extensions action or by going to the Agent Panel's top-right menu and looking for "View Server Extensions".

In any case, here are some of the ones available:

If there's an existing MCP server you'd like to bring to Zed, check out the context server extension docs for how to make it available as an extension.

Bring your own MCP server

Alternatively, you can connect to MCP servers in Zed via adding their commands directly to your settings.json, like so:

{
  "context_servers": {
    "some-context-server": {
      "command": {
        "path": "some-command",
        "args": ["arg-1", "arg-2"],
        "env": {}
      }
      "settings": {}
    }
  }
}

You can also add a custom server by reaching for the Agent Panel's Settings view (also accessible via the agent: open configuration action) and adding the desired server through the modal that appears when clicking the "Add Custom Server" button.