PMB MCP
Local memory for Claude Code, Cursor and Codex in one SQLite file that feeds past decisions and lessons into the agent's context
- 287 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- Hooks inject the local memory's content into context before every model response
- Keeps decisions, project facts and structure in one SQLite file, reachable over MCP by any connected agent
Install
- Works in
Manual install
pip install pmb-aiThe CLI command after install is pmb (alias pmb-ai). Via npm, npx pmb-ai setup is available and installs the Python package first.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Hooks inject the local memory's content into context before every model response
- Keeps decisions, project facts and structure in one SQLite file, reachable over MCP by any connected agent
This is third-party code. Review the repository files before installing.
What it does
PMB is local memory for AI agents. It stores decisions, lessons, project facts and structure in one SQLite file on disk. After `pip install pmb-ai`, `pmb setup` finds your installed agent and wires the MCP connection itself. In Claude Code and Codex PMB works through hooks: before the model answers, a hook calls prepare() itself and injects matching events, lessons, decisions and open project goals into context. The agent never has to remember to call a memory tool. In Cursor, Windsurf, Zed, VS Code and other clients PMB connects as a plain MCP server via `pmb connect`. Memory search is multilingual: the embedding model covers more than 50 languages, so a Russian query finds a fact recorded in English. `pmb dashboard` opens a local web UI at 127.0.0.1:8765 with an entity relationship graph and a chronological journal of entries. `pmb export` dumps the whole memory to Markdown or JSON.
Who it is for. For developers who work on one project in Claude Code, Cursor or Codex across many sessions in a row.
Good fit when
- The agent should recall past decisions and lessons on its own before it answers
- The project runs in several agents, say Claude Code and Cursor, and memory must be shared
- You want to search memory from the terminal without the agent, for example `pmb recall "auth decision"`
- You want to see which lessons and facts actually changed the agent's answers
- Queries come in different languages, and a Russian question must find a fact recorded in English
Not a fit when
- You need team memory shared live across several developers: PMB keeps a single local SQLite file on the user's machine
- The agent does not support MCP: PMB cannot connect to it
- You want to keep secrets and credentials in the agent's memory: PMB is built for decisions, lessons and project facts
Example request
Recall what decision we made about the retry policy last week, and show me the related lessonsMCP
- Transport
- stdio
- Authentication
- not required
Limitations
- The hooks that inject memory before the model answers work only in Claude Code and Codex. In Cursor, Windsurf and other clients the agent decides on its own when to call the memory tool.
- Semantic search works only with a local embedding model that has to be downloaded to the machine.
- The package comes from PyPI. The npm route (`npx pmb-ai setup`) still installs the Python package first.
- The web dashboard does not start with the MCP server; you launch it with a separate command.
How to disable. Remove PMB's MCP entry from the agent's configuration (`pmb setup` shows where it was added) and uninstall the package with `pip uninstall pmb-ai`. The local memory file can be deleted by hand from PMB's working folder.
FAQ
How does PMB connect to both Claude Code and Cursor?
`pmb setup` wires an MCP connection for each detected agent separately, and they all work with one memory file.
Does PMB need an API key or subscription?
No. PMB runs locally: SQLite holds the memory, rebuildable search indexes sit beside it, and reading makes no LLM call.
How do I see what PMB has stored?
`pmb stats` shows a summary of what memory holds. For terminal search there is `pmb recall "query"`.
Why can the first PMB memory call be slow?
If the embedding model wasn't preloaded ahead of time, the first memory call waits on it to load. `pmb warmup` preloads the model right after install, and memory search is fast after that.
Can I manually edit or delete an entry from PMB's memory?
Yes. The whole memory lives in one SQLite file on your disk, and the project has instructions for deleting specific entries.
Discussion
No questions or reviews yet.
Related
MCP serversloci turns notes and agent memories into one knowledge base with hybrid search and answers cited down to a file section.
A local wiki memory built from what you read: a shared knowledge folder for agents through an MCP bridge and my-curator.
ChatCrystal: notes from agent conversations
ChatCrystal
A local knowledge base: imports Claude Code, Cursor and Codex chats into notes, semantic search and MCP memory
A Claude Code skill collects product context in Markdown and links decisions to interviews, documents and hypotheses
compound-memory turns your AI chats into memory about you each night and injects it into new Claude Code and Codex sessions
A project tracker on SQLite in a single binary: CLI, web UI and a /pad skill through which an agent manages tasks, plans and ideas
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| PMB (this card) | no | not required | 287 | |
| MCP Memory Service | no | not required | 2,117 | a self-hosted service with a knowledge graph and semantic search, without automatic hooks in Claude Code and Codex |
| Basic Memory | no | not required | 4,566 | memory kept in local Markdown files with a link graph, without a 50-plus-language embedding model |
README in short
The author starts with the problem of agent forgetfulness and a seven-step quickstart, from install to a check with `pmb doctor`. A demo scenario compares the agent with and without memory.