Codemem
MCP server by kunickiaj Verified · npm:codemem
Codemem gives AI coding agents persistent memory of decisions, dead ends, and repository-specific traps across sessions. It brings relevant memories into later prompts and stores them in local SQLite. It is built for developers using OpenCode, Claude Code, Codex, or the Pi coding agent.
Install Codemem
Built from the published package, never by AI.
claude mcp add codemem -- npx -y codememRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"codemem": {
"args": [
"-y",
"codemem"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"codemem": {
"args": [
"-y",
"codemem"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"codemem": {
"args": [
"-y",
"codemem"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add codemem -- npx -y codemem{
"mcpServers": {
"codemem": {
"args": [
"-y",
"codemem"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add codemem npx -y codememGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the codemem block.
About
Codemem is persistent coding memory for AI coding agents. It captures decisions, dead ends, and repository-specific traps, then brings relevant memories into later prompts without the agent having to search. Memories are stored in SQLite on your machine, and retrieval combines FTS5 BM25 lexical search with sqlite-vec semantic search.
It works with OpenCode, Claude Code, Codex, and the Pi coding agent, which share one project-scoped store. Optional peer-to-peer sync can carry selected project memory across machines, and a built-in local viewer lets you browse memories, sessions, and observer output. It is aimed at developers who want project context to carry over between sessions, machines, and teammates.
Written from the project's README and checked against it.
Tools it gives your assistant
memory_session_searchSearches past session memory. Listed for the Pi coding agent, which needs no MCP.mem-statusShows Codemem status. Exposed on OpenCode 2.mem-recentLists recent memories. Exposed on OpenCode 2.mem-statsShows memory statistics. Exposed on OpenCode 2.
What you need
- Node.js 24.15 or newer, with npm or pnpm
- OpenCode 1.18.29 or newer if using the OpenCode plugin
- An observer model provider, which can incur costs or use plan usage
- macOS x64/arm64, Linux x64/arm64 (glibc 2.34+ or musl), or Windows x64
Try asking
- Search my codemem memories for the database migration decision.
- Show my recent codemem memories for this project.
- Show codemem statistics for this project.
Good to know
- The OpenCode 2 integration is beta.
- Intel Macs fall back to FTS5 keyword retrieval when semantic runtime initialization fails.
- Observer processing sends captured context to the configured model and can incur charges.
- 32-bit targets, including Linux armv7, are not supported.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Codemem
All alternatives →Connects a Zotero research library to AI assistants such as Claude and ChatGPT through the Model Context Protocol. It lets the assistant search, read, annotate and add papers, in local mode or through the web API. Built for researchers who want their references available in chat.
AgentDB is a vector memory database for AI agents. It stores embeddings, indexes and learning state in one file and exposes 41 MCP tools to clients such as Claude Code, Cursor and Cline.
Genkitx MCP is listed as a Genkit plugin for Model Context Protocol interoperability. The source is the main Genkit framework README and does not describe this plugin, so its features cannot be confirmed.
The **Model Context Protocol (MCP) client** for the [AI SDK](https://ai-sdk.dev/docs) lets you connect to MCP servers and use their tools with AI SDK functions like `generateText` and `streamText`.
QMD is an on-device search engine for markdown notes, meeting transcripts and documentation. It combines BM25 keyword search, vector search and LLM reranking, and exposes an MCP server for AI assistants.
RuVector is a Rust native vector database that gives AI agents persistent memory and local semantic retrieval. Its npm package includes an MCP server for MCP compatible clients, and it suits developers building agent memory in Node.js, Python, or Rust.
Compare with Zotero MCP, Agentdb or Genkitx MCP
Codemem: common questions
Does Codemem keep my memories on my machine?
Memories are stored in SQLite on your machine. The source notes that observer processing still sends captured context to your configured model provider.
Which coding agents can share Codemem memory?
OpenCode, Claude Code, Codex, and the Pi coding agent share one project-scoped store, according to the source.
Can I sync memories across machines?
Optional peer-to-peer sync can carry selected project memory across machines. The source describes this as optional.
How do I install Codemem?
In Claude Code run claude mcp add codemem -- npx -y codemem. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Codemem the official server?
Codemem is published by npm:codemem from its verified domain in the official MCP Registry.
Is Codemem free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Codemem safe to use?
It scores 86 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Codemem?
Similar MCP servers: Zotero MCP, Agentdb, Genkitx MCP, AI Sdk MCP.
Does Codemem work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
