OwnMemory — Claude Code MCP server: what it does, how to install
Stores Claude's cross-session memory in encrypted files inside your personal Cloudflare infrastructure. Useful when you want persistent context without sharing raw data with third-party servers.
Open on GitHubWhat OwnMemory does
The service runs as a Cloudflare Worker that connects to either a D1 database or a Google Drive folder. Each record is protected with AES-256-GCM encryption before saving under a randomized filename. Your master passphrase stays strictly in the local browser session. The storage backend only ever holds ciphertext.
Natural language lookup relies on Cloudflare Workers AI embeddings inside the same account. If you want to prevent text analysis by AI models, set the SEMANTIC_SEARCH secret to off to force pure keyword matching. Built-in filters automatically block credit card numbers, passwords, and API credentials from entering storage.
Anthropic and your Worker briefly inspect unencrypted payload during an active tool call, because Claude communicates in plaintext. You can inspect or purge records via the /memories dashboard, or export them into Markdown for local decryption.
What it helps with
- preserve agent context across chats while keeping storage self-hosted
- protect saved facts with client-side AES-256-GCM encryption
- stop API keys and passwords from being stored in memory files
- export records as Markdown for offline browser-based recovery
Example prompts for the agent
- Save into OwnMemory that our team uses Cloudflare Workers for backend tasks
- Search your memory for our previous discussion about database schemas
- Update my project profile and remove the retired staging server details
How to install OwnMemory
1Template address
The server address is a template: replace {…} or […] with your own values
2Platform CLI: remote server
claude mcp add --transport http ownmemory https://{server_address}/mcp1Template address
The server address is a template: replace {…} or […] with your own values
2Platform CLI: remote server
codex mcp add ownmemory --url https://{server_address}/mcp1Template address
The server address is a template: replace {…} or […] with your own values
2Config file
{
"mcpServers": {
"ownmemory": {
"url": "https://{server_address}/mcp"
}
}
}1Template address
The server address is a template: replace {…} or […] with your own values
2Config file
{
"servers": {
"ownmemory": {
"type": "http",
"url": "https://{server_address}/mcp"
}
}
}1Template address
The server address is a template: replace {…} or […] with your own values
2Platform CLI: remote server
gemini mcp add -t http ownmemory https://{server_address}/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about OwnMemory
How do I install OwnMemory in Claude Code?
Set up your server on Cloudflare first, then run claude mcp add --transport http ownmemory https://{server_address}/mcp. Replace {server_address} with the host URL of your deployed Worker.
What does OwnMemory do?
It provides Claude with persistent cross-chat memory that is encrypted with a private key. The encrypted records stay in your Cloudflare D1 database or Google Drive.
Can I turn off semantic search?
Yes, set the SEMANTIC_SEARCH environment secret to off. The server then switches to keyword matching without passing memory text through Workers AI.