memshare
memshare
Peer-to-peer AI memory sharing between users — approved on both sides.
Every AI memory tool today treats memory as a feature of a chat product. memshare treats it as a data type: plain JSON files you own.
Once memory is a file, three things follow, in this order. You can inspect it — greppable, diffable, and actually gone when you delete it. You can move it — one store, every MCP client, every machine you own. And only then can you share it — selectively, item by item, with approval on both sides. That last one no other tool does at all; they are all per-account by design.
That third one is the part nothing else does. A designer working in Cursor and backend devs working in Claude Code can hand each other context directly — different people and different vendors, same bundle format.
No central server. No cloud. No signup.
🌐 Site · 📊 Pitch deck
30-second quickstart
npm install -g memshare-mcp
memshare init
# Connect it to Claude Code
claude mcp add memshare -- npx -y memshare-mcp serve
# Or add it to any MCP client's config:
# { "mcpServers": { "memshare": { "command": "npx", "args": ["-y", "memshare-mcp", "serve"] } } }Asking an AI assistant to install this for you? Say "install
memshare-mcpfrom github.com/kampana/memshare" — not just "install memshare." The plain namememshareis a different, unpublished package on npm, and a search for it can surface unrelated results. The command above is the one that actually works.
Related MCP server: Simple Memory MCP
You mostly talk, not type
After setup, capture and recall happen in conversation — there is no command to run:
"we went with Postgres — the JSONB support decided it" → the AI calls
memory_set, saved asprivate"what do you know about this project?" → the AI calls
memory_get"remember that I like dark mode" → the AI calls
memory_set
Sharing works the same way. Ask to send something and you are shown the exact list — including anything held back for containing personal data — before a file is written. Ask to take something in and you see every item first. The approval moves into the conversation rather than disappearing from it. The CLI does all of this too, for scripting and for people who prefer it.
Promoting happens either way — in conversation, or at a prompt:
"make the project-x notes shareable" → the AI calls
memory_set_visibility
memshare mark --tags project-x --shareableEither route only makes an item eligible. Nothing is shared until you run memshare export and approve the preview — that step stays deliberately out of the model's hands.
Tags name themselves
You never have to say "tag this project-x". The project tag is derived from the git checkout the assistant is working in, so every tool, every session and every teammate on that repo agrees on it — and the model is told to add only subject-matter tags (auth, deploy) on top. Turn it off with memshare config --set autoProjectTag=false.
If near-duplicates creep in anyway, merge them:
memshare tags --rename projectx --to project-xYou can also add memories by hand at any time:
memshare add "Auth service uses JWT with 15min refresh" --tags project-x,auth --visibility shareable
memshare list
memshare list --tags project-xIs it actually capturing?
The honest risk with this tool is a silent one: nothing in MCP can force a model to call a tool, so capture can quietly not happen and you would not find out for weeks. Two things make that visible.
The assistant is asked to say so in one line each time it saves — "noted: the team chose Postgres for JSONB" — so you see it working, and can correct a bad one on the spot instead of a month later. And:
memshare stats12 memories, 5 in the last 14 days
▂▁▄█▂ ▁▃ 14d ago → today
- 9 captured by an assistant, 3 added by hand
- 5 shareable, 7 privateA flat line there means capture is not firing, and you know within days rather than at the end of a month.
If nothing is being captured
memshare can offer memory, but nothing in MCP can make a model use it. The server asks the assistant to save as it learns — in its handshake and in every tool description — but some clients never pass server instructions to the model at all.
If memshare list is still empty after a few days of real work, say it once more in the file your tool reads every session:
memshare instructions --append ~/.claude/CLAUDE.md # Claude Code
memshare instructions --append ./AGENTS.md # Cursor, Windsurf, CopilotSafe to run twice — it checks before appending.
Try it in a sandbox first
The whole flow — capture, the consent step, PII getting blocked, export, per-item import — against throwaway stores:
git clone https://github.com/kampana/memshare.git
cd memshare && npm install && npm run build
bash examples/try-it.shThis does install the project's dependencies locally, in the folder you cloned. What it does not do: install anything globally, create or modify ~/.memshare, or add anything to your Claude config. It builds two fake stores under a temp directory and deletes cleanly. Nothing carries over to a real setup.
Sharing with someone else
# Alice — see exactly what would go out, before anything is written
memshare export --tags "project-x,architecture" --for bob --expires 7d --preview
# Happy with it? Write the bundle.
memshare export --tags "project-x,architecture" --for bob --expires 7d
# → ~/.memshare/bundles/bundle-a3f8c2d1.memshare.jsonSend that file however you like — email, Slack, AirDrop, a USB stick. Then, on Bob's machine:
memshare preview bundle-a3f8c2d1.memshare.json # look, import nothing
memshare import bundle-a3f8c2d1.memshare.json # choose item by itemBob picks each item individually. Accepted items land in his store marked imported, stored private by default — receiving something is not consent to pass it on. Nothing he already had is overwritten.
Architecture
~/.memshare/memories/*.json
the actual product — plain JSON files
▲ ▲ ▲ ▲
│ │ │ │
MCP server CLI ChatGPT adapter system-prompt inject
│ (planned) (planned)
│
Claude · Cursor · VS Code · Windsurf · any MCP clientThe memory store is the product. The MCP server is one adapter over it, the CLI is another. If MCP disappears tomorrow, your data is still sitting in a folder — human-readable, diffable, and git-friendly. Sync it between your own machines with git or Dropbox; it is just files.
~/.memshare/
├── config.json # your settings
├── memories/
│ └── mem_<uuid>.json # one file per memory
├── suggestions.json # pending, not yet approved
└── bundles/
└── bundle_<id>.memshare.jsonHow memories get saved — three modes
These control what gets written down locally. What gets shared is a separate gate, covered below, and is never automatic.
Mode | What happens | Who decides |
| The AI saves what it learns as you work, choosing | The AI, locally |
| The AI calls | You, in batch |
| Nothing is saved unless you say "remember this". | You, every time |
auto is the default because an empty store is useless. The assistant picks a visibility for every memory — shareable for the project, the codebase and how the team works; private for anything about you personally, and whenever the call is arguable. Marking something shareable only makes it eligible: nothing leaves until you run an export and approve the preview. If you would rather approve every item, use suggest — and note that a direct memory_set is then queued as a suggestion rather than saved, so an over-eager model cannot skip the consent step.
memshare review # approve or reject, one by one
memshare review --yes # accept everything pending
memshare review --clear # reject everything pendingConsent, on both sides
You tag at creation time. Every item is
private(the default) orshareable. Private items are never exported, not even when their tags match.PII is blocked automatically. Before anything leaves your machine, memshare scans for emails, phone numbers, government IDs, payment cards, bank details, credentials, and health or financial language. Flagged items are held back; you decide per item whether to skip them, send a redacted version, or send them as-is.
You see the exact bundle first.
--previewruns the identical computation the real export does — there is no separate preview code path to drift out of sync.They choose too. The recipient previews every item and accepts or rejects individually. Bundles are content-hashed, so a file edited in transit is refused.
What --expires does, and does not do
memshare export --expires 30d sets a deadline that does two things: the recipient's memshare refuses to import the bundle after it passes, and any item they did import inherits that deadline — so it stops being recalled and is deleted by memshare prune.
It does not delete the bundle file, and it is cooperative, not enforced: the deadline lives in the bundle metadata, which is not covered by the content hash, so a determined recipient can edit it. Expiry protects against stale context, not against a hostile recipient. There is no central server, so there is nothing that could revoke a file someone already has.
How it compares
Cross-model portability | Self-hosted | User-to-user sharing | Consent flow | |
Claude / ChatGPT memory | ✗ | ✗ | ✗ | ✗ |
Mem0 | ✓ | ✓ | ✗ | ✗ |
OMP (Open Memory Protocol) | ✓ | ✓ | ✗ | ✗ |
Portable Memory (MacPaw) | ✓ | ✓ | ✗ | ✗ |
memshare | ✓ | ✓ | ✓ | ✓ |
MCP tools
The server exposes seven tools to any MCP client:
Tool | What it does |
| Save one durable fact, choosing |
| Recall memories by free text, tags, or most-recent. |
| Propose memories for the user to approve later. |
| Mark memories shareable or private, when the user asks. |
| Prepare a bundle to send someone. Previews first, writes only on confirmation. |
| Take in a bundle someone sent. Previews first, imports only on confirmation. |
| List every tag, so the model reuses tags instead of inventing near-duplicates. |
CLI reference
Command | |
| Create the store. |
| Add a memory. |
| Show the store. |
--from matches the MCP client that wrote the memory — the name it gives in the handshake, such as claude-code or cursor-vscode. Memories added by hand are cli.
| memshare recall | Print memories as plain text, to paste into any AI tool |
| memshare stats | Is it actually capturing? Counts per day, tool and tag. --days <n> |
| memshare tags | List all tags. --rename <from> --to <to> merges near-duplicates |
| memshare mark [ids...] | Promote memories to shareable, or pull them back. --tags, --query, --shareable, --private |
| memshare review | Approve or reject pending suggestions. --yes, --clear |
| memshare export | Write a bundle. --tags, --for, --expires, --note, --out, --preview, --redact-blocked, --include-private, --no-scan |
| memshare preview <file> | Inspect a bundle, import nothing |
| memshare import <file> | Import a bundle, item by item. --yes, --visibility, --tag-sender, --allow-duplicates |
| memshare forget <ids...> | Delete memories |
| memshare prune | Delete expired memories |
| memshare config | Show or change settings. --set key=value |
| memshare instructions | Print standing instructions for your assistant. --append <file> |
| memshare serve | Run the MCP server on stdio |
--dir <path> or MEMSHARE_DIR points any command at a different store — handy for keeping a separate memory profile per client, or for trying the sharing flow with yourself:
MEMSHARE_DIR=/tmp/bob memshare init
MEMSHARE_DIR=/tmp/bob memshare import bundle-a3f8c2d1.memshare.jsonWhere it can run
Your memories are the same JSON files in all four, so moving between them costs you nothing — no migration, no re-setup, nothing left behind:
Local (we suggest starting here) — files on your laptop, MCP as a local process. Sharing: export a file and send it.
Shared folder — Dropbox, Drive, or a git repo. Sharing: auto-sync through the folder.
Team server (planned) — Docker on your VPS. Sharing: by username.
Hosted (planned) — managed infra, same protocol, zero ops.
Roadmap
Shipped: CLI, MCP server, export/import bundles, PII guard, consent flow
Next: a ChatGPT route — only if people ask for one. Claude Code, Cursor, Copilot and Windsurf already work; they speak MCP and need no adapter.
Later: Docker deploy, remote MCP server, revocable sharing
Someday: discovery and live sync
Use as a library
import { MemoryStore, selectForExport, planImport } from "memshare-mcp";
const store = new MemoryStore();
await store.add({ content: "Team chose Postgres over MySQL", tags: ["db"] });
const { included, blocked } = await selectForExport(store, { tags: ["db"] });Every adapter — the CLI, the MCP server, and any you write — goes through these exports. See src/index.ts.
Why is the package called memshare-mcp?
Two reasons. memshare itself is unusable on npm — an unrelated project published it in February 2021 and unpublished it that November, and npm permanently reserves unpublished names, returning 409 for everyone including the original owner. And -mcp says what this actually is: an MCP server first, with a CLI for the decisions that should not be delegated to a model.
The installed command is still memshare. An earlier release used memshare-cli, which is now deprecated and points here.
Development
npm install
npm run build
npm test
npm run check:docs # docs and CLI must agreeContributions welcome — see CONTRIBUTING.md.
License
MIT © memshare contributors
This server cannot be deployed
Maintenance
Related MCP Connectors
- memoryOAuthcom.leapmemory
Long-term memory for AI assistants. Isolated per-user storage, recall across conversations.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
- JustOnceOAuthai.justonce
Persistent memory for AI assistants — one shared, OAuth-secured vault for every MCP client.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceProvides persistent local memory functionality for AI assistants, enabling them to store, retrieve, and search contextual information across conversations with SQLite-based full-text search. All data stays private on your machine while dramatically improving context retention and personalized assistance.3-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to store and retrieve persistent memories with a web management interface. Supports creating, searching, and managing memories through natural language commands or a visual web dashboard.11 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables persistent storage and retrieval of user preferences, context, and decisions across AI sessions using a structured JSON-based memory system. It provides tools for storing, searching, updating, and managing memories organized by namespaces and tags.6 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides AI assistants with persistent memory across sessions using local SQLite and keyword search, allowing storage and retrieval of user preferences, project context, and decisions.11 npm8MIT