Updated 2026-07-02
Share one memory across Claude Code, Cursor, Codex, and Gemini CLI
The problem isn't that your agents forget — it's that each one remembers alone. One SQLite file fixes that.
If you use more than one AI coding tool — Claude Code for the heavy lifting, Cursor in the editor, maybe Codex or Gemini CLI on the side — you have several memory silos. Claude's built-in memory stays with Claude. Cursor's rules stay with Cursor. Explain a constraint to one agent, and the next one violates it an hour later.
The fix is architectural, not heroic: keep memory outside the agents, in a neutral store they all read. linksee-memory does this with one SQLite file at ~/.linksee-memory/memory.db, exposed to every agent through the Model Context Protocol. Declare once, recall anywhere.
How it works
Each client is configured to spawn the same MCP server — npx -y linksee-memory — over stdio. The server owns the SQLite file; the agents just call remember / recall / read_smart tools. Because the store is a single local file, there is no sync service, no account, and no network call involved.
Setup per client
The interactive way is npx -y linksee-memory setup, which detects installed clients. Manual configs:
Claude Code
claude mcp add -s user linksee -- npx -y linksee-memoryCursor
Add to ~/.cursor/mcp.json, then restart Cursor:
{
"mcpServers": {
"linksee": {
"command": "npx",
"args": ["-y", "linksee-memory"]
}
}
}OpenAI Codex
codex mcp add linksee -- npx -y linksee-memoryOr add to ~/.codex/config.toml:
[mcp_servers.linksee]
command = "npx"
args = ["-y", "linksee-memory"]Gemini CLI
Add the same mcpServers block to ~/.gemini/settings.json.
Claude Desktop / Windsurf
Same JSON block in claude_desktop_config.json (macOS ~/Library/Application Support/Claude/, Windows %APPDATA%\Claude\) or Windsurf's MCP settings.
Try the round-trip
- In Claude Code: “linksee this — we use FTS5, not vector search, because our corpus is small and we want zero infra.”
- In Cursor (same machine, any time later): “use linksee — what did we decide about search?”
The second agent answers with the decision and the reasoning, because memories carry six layers (goal / context / emotion / implementation / caveat / learning), not just flat facts.
What about drift between agents?
Shared memory creates a new possibility: the store knows what you decided, so it can notice when any agent's work quietly contradicts it. Declare decisions as anchors, and ask what's drifting? from any client to reconcile reality against them. That layer is what separates a shared notebook from a shared brain — see the persistent-memory guide for the full setup.
Limits, honestly
- One machine. The free core shares memory between agents on the same computer. Cross-device sync is planned for the paid tier.
- Consumer ChatGPT apps can't connect — they don't support stdio MCP servers. Codex CLI works.
- Concurrent writes are serialized by SQLite. Fine for interactive use; not designed as a team-wide server (yet).