Overview
The Zed integration connects Zed’s Agent Panel to claude-mem through Zed’s native MCP client. It gives you two things:- Recall — Ask Zed’s agent about past work in a project and it searches
your claude-mem memory (
search→timeline→get_observations) and quotes the saved observation. - Explicit save — Tell the agent “save this decision to memory” and it
calls
save_memoryto store a durable note.
Capabilities
Catalog-ready description: Zed connects to claude-mem as an MCP recall
client. It can search memory and explicitly save notes; it does not
automatically capture agent sessions.
How It Works
The installer adds one stdio entry namedclaude-mem to the
context_servers key of your Zed settings.json:
search finds relevant observations, timeline shows what happened
around one, and get_observations reads the full entries. save_memory
writes an explicit note into the same worker database every other
integration uses, so a decision saved from Zed is searchable from Claude
Code, Cursor, and the rest.
The key is context_servers, not mcpServers. Zed silently ignores a
mcpServers entry, with no error — if the server never appears, check
the key name first.
Installation
Prerequisites: Zed 0.140.0 or later (MCP support since 0.140.0; latest release at time of writing: 1.28.1), claude-mem installed, and the claude-mem worker running (npx claude-mem start).
Run the interactive installer and let it auto-detect Zed:
- Resolves your settings file:
~/.config/zed/settings.jsonon Linux and macOS (XDG_CONFIG_HOMEis honoured when set),%APPDATA%\Zed\settings.jsonon Windows. - Backs up an existing
settings.jsonfirst, assettings.json.bak-YYYYMMDD(owner-only, mode0600, one per day). - Merges the
claude-mementry intocontext_servers, preserving every other server and every unrelated setting. Re-running install replaces only its own entry; it never duplicates it. - Refuses to touch a
settings.jsonthat does not parse, instead of replacing it with an empty object.
claude-mem.
Project-level settings
Zed also reads.zed/settings.json in the workspace root. The installer
does not write there: that file is typically committed to git, and an
absolute local MCP path must not leak into a shared repo. If you want a
project override, copy the entry by hand and keep the path local-only.
Manual setup
If you prefer not to run the installer, add the entry yourself. Find the server path withnpx claude-mem installed (plugin/scripts/mcp-server.cjs
under the installed plugin), then add to settings.json:
command or args.
Verification
- Restart Zed. In Settings → AI → MCP Servers,
claude-memshows a green dot and “Server is active”. - In the Agent Panel, ask about something you know is in memory, for
example: “What did I decide about local persistence in this project?”
The agent should call the
searchtool and quote the saved observation. - To verify explicit save, say: “Save to memory: the project uses SQLite
for local persistence.” Then search for it from another agent or with
npx claude-mem search "SQLite local persistence"— the note should be there.
claude-mem tools enabled.
Manual context injection (optional)
Zed reads one project instruction file — the first match of.rules,
.cursorrules, .windsurfrules, .clinerules,
.github/copilot-instructions.md, AGENT.md, AGENTS.md, CLAUDE.md,
GEMINI.md — plus your personal ~/.config/zed/AGENTS.md. To give Zed
sessions a memory summary, paste one into the file your project actually
reads (check which one wins first: only the first match is read). The
installer never writes these files for you.
Troubleshooting
- Server never appears / no green dot: check the key is
context_servers, notmcpServers; check Zed’s own error for the server in Settings → AI → MCP Servers, or runzed: open logfrom the command palette; restart Zed — context servers load at startup. (Zed settings are JSONC, so a strict JSON checker rejects a valid file that has comments.) save_memoryis not offered: you are on the server runtime (CLAUDE_MEM_RUNTIME=server), wheresave_memoryis hidden andobservation_addis the write tool instead. On the default local worker runtimesave_memoryis advertised.- Agent never calls the tools: mention
claude-memby name in the prompt, or use an agent profile with only its tools enabled. Tool calling reliability varies by model. - Install fails with “Corrupt JSON file, refusing to overwrite”: your
settings.jsondoes not parse. Fix the JSON (your original bytes are also in thesettings.json.bak-YYYYMMDDbackup) and re-run install. Comments (//,/* */) and trailing commas are valid in Zed settings and are preserved by install/uninstall — only thecontext_serversentry itself is touched. - Windows path:
%APPDATA%\Zed\settings.json. The Windows path is resolved by the installer but was not verified on a Windows machine; see Known limitations.
Uninstall
claude-mem entry from context_servers
only when its args point at claude-mem’s own mcp-server.cjs — a
same-named entry you wrote yourself is left alone. All other settings and
servers are preserved, and your memory is untouched. Or delete the entry
by hand from settings.json and restart Zed.
Known limitations
- No automatic capture of Zed Agent sessions (no host hook surface).
- The in-editor demonstration (Agent Panel retrieval) needs a desktop; the installer, config merge, and MCP handshake were verified headless.
- The Windows settings path (
%APPDATA%\Zed\settings.json) is resolved by the installer but was not verified on a Windows machine. - A Zed user running Claude Code or Codex in Zed’s terminal already gets capture from those CLIs’ own adapters; this integration adds recall and explicit save only, and does not deduplicate across them.
Official reference
- Zed MCP documentation: https://zed.dev/docs/ai/mcp (MCP Tools and
Prompts;
context_serversinsettings.json; tool permissions; External Agents forwarding) - Zed Agent settings: https://zed.dev/docs/ai/agent-settings
- MCP extension authoring (not used here — the plain
context_serversentry is the first step): https://zed.dev/docs/extensions/mcp-extensions

