Engram
Gives coding agents a persistent, searchable project memory stored locally in SQLite
Local per-repo memory for coding agents that flags files where earlier fixes failed
By Ripon Chandra Malo (individual) Python Local · stdio Knowledge and memoryDeveloper tools
62 popularity score ★ 877 ↓ 1.3k/mo
Opens the app, which asks before it adds the server.
pip install -U projectmem
cd <PROJECT_DIR> && pjm initclaude mcp add projectmem -- python -m projectmem.mcp_server{
"mcpServers": {
"projectmem": {
"command": "python",
"args": [
"-m",
"projectmem.mcp_server"
]
}
}
}{
"mcpServers": {
"projectmem": {
"command": "python",
"args": [
"-m",
"projectmem.mcp_server"
]
}
}
}{
"servers": {
"projectmem": {
"type": "stdio",
"command": "python",
"args": [
"-m",
"projectmem.mcp_server"
]
}
}
}[mcp_servers.projectmem]
command = "python"
args = ["-m", "projectmem.mcp_server"]gemini mcp add --scope user projectmem python -- -m projectmem.mcp_serverPROJECTMEM_ROOT |
Optional: Pins the server to one repository instead of serving every registered project; same effect as passing --root <path>. |
|---|
projectmem keeps a running log of what happens while you build a project: bugs found, fixes tried and whether they worked, design decisions and notes. The log sits in a `.projectmem/` folder inside each repository, and the MCP server lets a coding agent read that history at the start of a session and add to it as it works, so it does not have to rediscover the project or retry an approach that already failed.
The server has 17 tools (12 that read, 5 that write), all registered in `projectmem/mcp_server.py`. Reading covers a distilled summary, a map of the repository, a `plan.md` file, single issues, a plain-text search over the log, a token-budgeted context block, a letter-grade score, and lessons carried over from other projects. `precheck_file` returns a file's failure history before the agent edits it. Writing appends typed events: issues, attempts marked worked, partial or failed, fixes, decisions and notes.
Since 0.3.0 one server entry serves every project registered with `pjm init` or `pjm project register`; each call can name a project, and otherwise goes to the active one set with `pjm project use`. If the server is started with `--root`, the `PROJECTMEM_ROOT` setting, or from inside a folder that has `.projectmem/`, it is pinned to that one repository and refuses writes to any other.
In the code at 0.3.4, `search_events` returns the 10 most recent matches by default, up to 100 with `limit`; `get_context` aims for about 2000 tokens by default (100 to 20000 with `tokens`); and `record_attempt` records the outcome as `failed` when none is given. The package also ships a `pjm` command line tool with git hooks, a file watcher and local HTML dashboards, which are separate from the MCP tools.
| Runtime | Python 3.10+ |
|---|
Python 3.10 or newer and `pip install projectmem`. Each repository needs `pjm init` run once (it creates `.projectmem/` and registers the project) before the server has anything to serve; older projects can be registered with `pjm doctor --fix`. Its docs tell you to give the client the absolute path to the Python interpreter that has the package installed, because clients such as Claude Desktop and Codex do not inherit your shell PATH. Works on macOS, Linux and Windows.
Search in `search_events` is a case-insensitive substring match on event summaries and notes, with no regex or boolean operators, and returns at most 100 results. Memory is per repository and is only as good as what the agent or the git hooks log; its docs recommend a kickoff prompt to make agents log consistently, and say Codex on low reasoning effort tends to skip `get_instructions`. Claude Desktop and Cursor ignore the `cwd` field, so for those clients pinning to one repository has to be done with `--root`. Importing memory from other tools (`pjm import`) is planned for 0.4.0 and is not in the released version. Releases before 0.3.0 failed at startup with mcp 2.0.
Suits developers who use Claude Code, Claude Desktop, Cursor, Codex or Antigravity on long-running repositories and want the agent to remember past bugs, failed fixes and decisions between sessions, with everything kept as plain files in the repo. Teams can share the distilled files through git, since they are committed by default. It is not a general memory or notes store: it records coding events tied to a repository, so for personal knowledge or chat memory across unrelated work a general memory server fits better. It needs a local Python install, so it does not suit setups that only allow hosted servers.
get_instructionsget_summaryget_project_mapget_planprecheck_fileget_issuesearch_eventsget_contextget_scoreget_global_gotchaslist_projectscurrent_projectlog_issuerecord_attemptrecord_fixadd_decisionadd_note