AI News
All projects
Plugin

MegaMemory: a persistent project knowledge graph for coding agents

An MCP server that lets coding agents build and query a graph of project concepts, architecture and decisions so they can remember across sessions.

MegaMemory by 0xK3vin · 742 GitHub stars when we found it · added

MegaMemory is an MCP server that gives a coding agent a persistent graph of a project's concepts, architecture and decisions, so the agent can recall them in later sessions. According to the README, the LLM does the indexing: there is no AST parsing or static analysis, and the agent writes concepts in its own words. The graph holds features, modules, patterns and decisions rather than code symbols. It installs with npm install -g megamemory and requires Node.js 18 or later.

The author describes a loop in which the agent calls list_roots at session start, runs understand before a task, and calls create_concept or update_concept afterward. Everything is stored in a SQLite database at .megamemory/knowledge.db in each project. Search is brute-force cosine similarity over embeddings from all-MiniLM-L6-v2, run in-process through ONNX. The README says the model is about 23MB, downloads on first use, and needs no API keys. By its account, search is fast enough for graphs under 10k nodes.

The megamemory install command configures opencode, Claude Code, Antigravity or Codex, and other MCP clients can add it as a stdio server. megamemory serve starts a browser graph explorer, on port 4321 by default. Merge commands combine two knowledge.db files that diverge across branches, and an agent can resolve conflicts through resolve_conflict. The project is MIT licensed.

In the author's words

The LLM is the indexer. No AST parsing. No static analysis. Your agent reads code, writes concepts in its own words, and queries them before future tasks.

From the README or the author's post. We checked that the sentence is there, not that it is true.

When to reach for it

A reader whose coding agent keeps relearning the same codebase every session may find this useful. The agent records concepts and decisions after each task and queries them before the next one, instead of rereading everything.

Works with

opencodeClaude CodeAntigravityCodex

See it

AI wrote this entry from the project's own README or its author's post. What the project does, and that AI built it where the entry says so, are the author's statements, quoted here. Nobody at IKANGAI ran or tested it. How this list is made