Memory MCP Server for Zed
A Zed extension that provides a persistent knowledge graph through the Model Context Protocol. It wraps the official @modelcontextprotocol/server-memory package, giving your AI assistant long-term memory across sessions.
Features
The extension exposes the following tools to the assistant:
| Tool | Description |
|---|---|
create_entities |
Create new entities in the knowledge graph |
create_relations |
Create relations between entities |
add_observations |
Add observations to existing entities |
delete_entities |
Delete entities and their relations |
delete_observations |
Delete specific observations from entities |
delete_relations |
Delete relations between entities |
read_graph |
Read the entire knowledge graph |
search_nodes |
Search entities by name, type, or observation content |
open_nodes |
Retrieve specific entities by name |
Installation
- Open Zed
- Open the extensions panel (
zed: extensionsin the command palette) - Search for Memory MCP Server and install it
Configuration
Add the following to the MCP's settings to configure the memory file location:
{
"settings": {
"memory_file_path": "/absolute/path/to/memory.jsonl"
}
}Note: The path must be absolute. Tilde expansion (
~) is not supported.
If memory_file_path is left empty (the default), the memory file is stored next to the server's index.js inside Zed's extensions directory.
How It Works
Memories are stored as a knowledge graph in a JSONL file. Each line is a JSON object representing either an entity or a relation:
- Entities have a name, a type, and a list of observations (free-text strings).
- Relations connect two entities with a named relationship (in active voice).
The assistant can read and write to this graph, allowing it to remember facts about you, your projects, preferences, and anything else across conversations.
Development
Prerequisites
- Rust with the
wasm32-wasip1target:rustup target add wasm32-wasip1
Dev Extension
- Clone this repository
- In Zed, go to
zed: install dev extensionin the command palette - Select the cloned directory
Zed will compile the extension and load it automatically. Changes to the source require reinstalling the dev extension.
License
MIT