Agents
Claude Code
Persistent memory for Claude Code with one command.
Give Claude Code persistent memory across sessions with one command.
Setup
Install Meivo first (local quickstart), then register it as an MCP server:
# Available in the current project only (default scope)
claude mcp add meivo -- gm-server mcp
# Or available in every project on this machine
claude mcp add --scope user greatmemory -- gm-server mcp
Everything after -- is the command Claude Code runs to start the server - here, Meivo's stdio MCP mode.
By default each project gets its own memory store, because gm-server mcp resolves its data dir relative to the working directory (./.greatmemory). For one shared store across all projects, pin the data dir:
claude mcp add --scope user --env GM_DATA_DIR="$HOME/.greatmemory" greatmemory -- gm-server mcp
Verify with claude mcp list - greatmemory should show as connected.
What you get
Thirteen tools appear in Claude Code: the core remember, recall,
get_context, get_profile, timeline, and forget operations, plus episode
and linked-card tools. See the MCP reference for the complete
parameters.
Usage
Just talk to Claude:
You: Remember that our staging database is Postgres 17 with pgvector, and deploys go through the
releasebranch.Claude calls
rememberand confirms it stored the note.
Days later, in a fresh session:
You: What do you know about our staging setup?
Claude calls
recall(orget_context) and answers from memory: staging runs Postgres 17 with pgvector; deploys go through thereleasebranch.
You can also ask "what do you know about me?" or "summarize what you've remembered for this project" - Claude will use get_profile. A useful habit is asking for a get_profile at the start of long sessions so standing facts are in context from the first turn.
Troubleshooting
Do I need gm-server serve running? No. gm-server mcp (stdio) is
self-contained: Claude Code launches the process and it opens the database
directly from GM_DATA_DIR. The HTTP server is only needed for the REST API or
the /mcp HTTP transport.
Tools don't appear. Check claude mcp list for errors. The most common
cause is gm-server not being on the PATH Claude Code uses - pass an absolute
path instead:
claude mcp add meivo -- ~/.cargo/bin/gm-server mcp
First call is slow. On first use the embedding model is downloaded into
<data_dir>/models. Pre-warm it without starting the service by running
gm-server warmup.
Memories differ between projects. That's the default per-project data dir. Set GM_DATA_DIR to a fixed absolute path (see above) for a single shared store.
Sharing one store with a running server. stdio mode and serve each open the database independently. If you want multiple clients on one live instance, connect Claude Code to the HTTP transport of a running server instead:
claude mcp add --transport http greatmemory http://127.0.0.1:7437/mcp
Scope and transport flags reflect current Claude Code releases - run
claude mcp add --helpif a flag has moved.
Trust boundary:
spaceseparates retrieval namespaces; it is not an authorization boundary. A direct stdio MCP client can choose any space in the store. Give each trusted local client its own data directory, or put the enterprise gateway and built-in governance controls in front of shared, multi-user deployments.