Docs / Connect / Zed

Connect ModelBrain to Zed

Zed keeps MCP servers under a context_servers section in its settings file, so connecting ModelBrain means adding one entry there.

Zed's default is to ask before every tool runs, MCP tools included. That is the right default for a tool that can change what your assistants remember, so leave the permission setting on confirm.

Where the program lives

This client needs the full path to ModelBrain's mcp_server program. The commands and snippets on this page show the macOS path; on Windows or Linux, put the path for your system in the same place. Write the full path rather than a variable such as %LOCALAPPDATA% or ~, because a client may not expand it.

macOS

/Applications/ModelBrain.app/Contents/MacOS/mcp_server

Windows

C:\Users\you\AppData\Local\Programs\ModelBrain\mcp_server.exe (that is %LOCALAPPDATA%\Programs\ModelBrain\mcp_server.exe, with your own user name). Inside JSON, TOML or a quoted YAML string, double each backslash.

Linux

/home/you/.local/lib/modelbrain/mcp_server, with your own home folder. The install script puts ModelBrain in ~/.local/lib/modelbrain.

Steps
  1. Install ModelBrain if you haven't yet (macOS, Windows or Linux).
  2. Open Zed's settings file. Open the Command Palette and run zed: open settings file. Zed's settings file allows comments, so it is not strict JSON.
  3. Add ModelBrain under context_servers. If you already have a context_servers section, add only the modelbrain entry inside it, with a comma after the entry before it.
    "context_servers": {
      "modelbrain": {
        "command": "/Applications/ModelBrain.app/Contents/MacOS/mcp_server",
        "args": [],
        "env": {}
      }
    }
  4. Save, then check the status. Open Settings, then AI, then MCP Servers. A green dot next to modelbrain with the tooltip "Server is active" means it is running.
  5. Try it. Ask Zed's agent to remember something, then recall it in a new thread.
Questions

Will Zed ask before using ModelBrain's tools?

By default, yes. The setting agent.tool_permissions.default is confirm, which prompts before any tool runs. We suggest leaving it there. Versions before 0.224.0 used an older always allow setting instead.

Is there a button instead of editing the file?

Yes. In Settings, AI, MCP Servers, Add Server then Add Local Server creates an entry for you. You would enter the same command path.

How do I undo it?

Remove the modelbrain entry from context_servers. Your memories are not stored in that file.

Has this been tested?

We have tested this configuration against sample files and the ModelBrain setup code, but not yet by hand on a real install of Zed. If ModelBrain does not appear in Zed after you follow these steps, tell us through the Support page and we will fix this guide.

Not installed yet?

Start with the install guide.

Install ModelBrain →
Then

A 10-minute walkthrough: add a folder, ask something that needs two notes, see the citation.

Quickstart →