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
MCP server

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
All reasons and checks

oleksiijko/pmb

Install

Manual install

pip install pmb-ai

The 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 review

Extended 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 lessons

MCP

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.

loci turns notes and agent memories into one knowledge base with hybrid search and answers cited down to a file section.

MCP serverExtended access101Repository stars

A local wiki memory built from what you read: a shared knowledge folder for agents through an MCP bridge and my-curator.

MCP serverExtended access103Repository stars

A Claude Code skill collects product context in Markdown and links decisions to interviews, documents and hypotheses

SkillExtended access964Repository stars

compound-memory turns your AI chats into memory about you each night and injects it into new Claude Code and Codex sessions

PluginBroad access113Repository stars

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

CLIExtended access207Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
PMB (this card)nonot required287
MCP Memory Servicenonot required2,117a self-hosted service with a knowledge graph and semantic search, without automatic hooks in Claude Code and Codex
Basic Memorynonot required4,566memory 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.

README badge

Report a problem