Claude Code
Give Claude Code persistent, encrypted memory across projects and machines with ownmem's remote MCP server. One command, OAuth sign-in, no API key, no local server.
By songth1ef · Published · Last updated
Short answer: run one command, authenticate once, and Claude Code can search, read and update your ownmem (ownmem.ai) memory in every project. The memory is the same one your ChatGPT, Codex and Cursor setups use, and it stays encrypted in your vault.
claude mcp add --transport http --scope user ownmem https://mcp.ownmem.ai/mcpSetup
-
Create an ownmem account at ownmem.ai/chat and save your recovery phrase (Getting started).
-
Add the server in a terminal:
claude mcp add --transport http --scope user ownmem https://mcp.ownmem.ai/mcp--scope usermakes it available in every project, not just the current folder. -
Sign in: in Claude Code, type
/mcp, select ownmem and choose Authenticate. Your browser opens the ownmem consent page; check that it names the app you are connecting and click Allow. -
Keep ownmem.ai/chat open and unlocked while Claude Code works. Tool calls run in that tab (why).
-
Tell Claude Code when to use it. Paste the prompt for your agent once; it asks Claude Code to add the standing instructions to your
CLAUDE.md: search memory at the start of a task, prefer what it finds, and save durable facts and decisions (never secrets) at the end.
The same command and prompt are in the app under Settings (⚙️) → Agents (MCP).
What Claude Code can do with it
| Tool | What it does |
|---|---|
memory_search | Full-text search over your memory files; returns matching files (5 by default, up to 20) with up to 3 matching lines each |
memory_view | Opens a file (up to 400 lines per call) or lists a folder |
memory_create | Creates a new Markdown file |
memory_str_replace | Replaces one exact, unique piece of text in a file |
memory_insert | Inserts text after a given line |
vault_status | Shows whether your vault is reachable |
There is no delete or rename over MCP. Calls cost no credits; limits are 60 calls per minute and 3,000 per day per account. Full reference: Connect AI agents (MCP).
ownmem and CLAUDE.md
They do different jobs and work well together:
CLAUDE.mdholds instructions for a project or your personal workflow, and Claude Code reads it at the start of every session (Anthropic's memory docs).- ownmem holds facts, preferences and decisions you want everywhere: in other projects, on other computers, and in other AIs such as ChatGPT, Codex and Cursor. Claude Code looks things up when it needs them instead of loading everything.
A good split: keep build commands and code conventions in CLAUDE.md; keep "who I am, what I decided and why" in ownmem.
How it reaches your memory
Your vault is encrypted in your browser, so by default the request is relayed to your open, unlocked ownmem tab, the tool runs there, and only the result (search snippets or the file Claude Code opened) goes back. The server never holds your keys or a readable copy of your vault. If you want Claude Code to read memory while your browser is closed, you can turn on Agent share for selected folders; that copy is read-only for agents and not zero-knowledge.
Troubleshooting
- "Open https://ownmem.ai/chat and unlock your vault…": no unlocked tab is connected. Open the app, unlock, and make sure Allow agents (MCP) on this device is on in Settings → Agents (MCP).
- Authentication didn't finish: run
/mcpagain, select ownmem and choose Authenticate; make sure you are logged in to ownmem in the same browser. - Remove it:
claude mcp remove ownmem(add--scope userif you added it that way), and revoke the client in Settings → Agents (MCP).
FAQ
Does Claude Code see my whole vault?
No. It only receives what it asks for in a session: search snippets and the files it opens.
Can Claude Code and Codex share the same memory?
Yes. Add the same URL to Codex; both read and write the same vault.
Do I need to self-host anything?
No. The server is hosted at https://mcp.ownmem.ai/mcp; you only add the URL.
What does it cost?
MCP calls are free. Free accounts store up to 2 MB; see Limits.
Connect AI agents (MCP)
Give Claude Code, Claude, ChatGPT, Codex and other MCP clients access to your ownmem memory through the remote MCP server at https://mcp.ownmem.ai/mcp, with OAuth sign-in.
Codex
Connect Codex CLI to ownmem's remote MCP server and share one encrypted memory between Codex, Claude Code, ChatGPT and Cursor. Two commands, OAuth sign-in, no API key.