memory-sharing-mcp gives Claude Code, Pi, OpenCode, Codex and any other MCP client one shared memory store, behind one authenticated service. What you teach one agent, the next one already knows.
go install github.com/pixie-sh/memory-sharing-mcp/cmd/memory-sharing-mcp@latest
Go 1.26+, macOS or Linux. Prebuilt binaries are on the releases page. MIT licensed.
Nobody on a team uses a single agent any more. One person plans in Claude Code, reviews in Codex and runs long jobs in Pi. Each harness keeps its own notes, in its own format, in its own directory.
The deploy gotcha you explained on Monday lives in one of these. Switch tools and you explain it again.
Every agent calls the same five tools. Only the gateway opens the database.
Preferences, decisions and project gotchas get taught once per tool, and drift apart as each copy ages.
A decision confirmed in one CLI is invisible to the agent you open next, so it re-asks or guesses.
Pointing several agents at the same database gives you concurrent writers, mismatched runtimes and no record of who wrote what.
Agents connect over Streamable HTTP MCP or through a small stdio adapter, mcp serve. Scripts use the REST API. The gateway validates, authorizes and queues every call before it reaches the store.
http serve takes an exclusive lock on the store. A second owner refuses to start.
Operations reach the provider strictly in order. Recall updates the store too, so even reads are serialized.
If a write's outcome is unknown, the call is reported as indeterminate and never retried automatically.
Each agent can have its own API key. New memories record the key that wrote them as agent_id, and an optional --caller nickname labels each call in the service log, even when agents share a key.
Read-only, read-write and maintenance. Delete and consolidation stay off until you enable them.
Stores plug in as providers. Mnemosyne works today; results follow mem0's memory format whichever store is behind it.
Claude Code, OpenCode and Pi each saved a test memory at the same moment. All three remember calls returned ok, and a recall from any of the three then listed all three entries.
| Saved at | Source | ID |
|---|---|---|
| 16:23:10 | claude-code | mnemosyne:0f4b1f2c581f0d44 |
| 16:23:11 | ocrobin | mnemosyne:e1304704a8c8d0ba |
| 16:23:12 | pi | mnemosyne:873f19227ff2b13f |
From a checkout, make setup walks through the store, the key and the service. make gen-config then gives each agent its own key and config, named in the log by --caller. By hand, each agent needs one stdio server entry:
Claude Code, Pi and OpenCode are in daily use. The Codex entry follows its documented format and is not yet verified.
| Tool | read-only | read-write | maintenance |
|---|---|---|---|
| memory_recall | yes | yes | yes |
| memory_stats | yes | yes | yes |
| memory_remember | no | yes | yes |
| memory_forget | no | no | with allow_forget |
| memory_sleep | no | no | with allow_sleep |