by 0xK3vin
Persistent project knowledge graph for coding agents. MCP server with semantic search, in-process embeddings, and web explorer.
# Add to your Claude Code skills
git clone https://github.com/0xK3vin/MegaMemoryLast scanned: 5/30/2026
{
"issues": [
{
"type": "npm-audit",
"message": "@hono/node-server: @hono/node-server has authorization bypass for protected static paths via encoded slashes in Serve Static Middleware",
"severity": "high"
},
{
"type": "npm-audit",
"message": "@protobufjs/utf8: protobufjs has overlong UTF-8 decoding",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@xenova/transformers: Vulnerability found",
"severity": "high"
},
{
"type": "npm-audit",
"message": "ajv: ajv has ReDoS when using `$data` option",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "express-rate-limit: express-rate-limit: IPv4-mapped IPv6 addresses bypass per-client rate limiting on servers with dual-stack network",
"severity": "high"
},
{
"type": "npm-audit",
"message": "fast-uri: fast-uri vulnerable to path traversal via percent-encoded dot segments",
"severity": "high"
},
{
"type": "npm-audit",
"message": "hono: Hono added timing comparison hardening in basicAuth and bearerAuth",
"severity": "high"
},
{
"type": "npm-audit",
"message": "ip-address: ip-address has XSS in Address6 HTML-emitting methods",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "onnx-proto: Vulnerability found",
"severity": "high"
},
{
"type": "npm-audit",
"message": "onnxruntime-web: Vulnerability found",
"severity": "high"
},
{
"type": "npm-audit",
"message": "path-to-regexp: path-to-regexp vulnerable to Denial of Service via sequential optional groups",
"severity": "high"
},
{
"type": "npm-audit",
"message": "picomatch: Picomatch: Method Injection in POSIX Character Classes causes incorrect Glob Matching",
"severity": "high"
},
{
"type": "npm-audit",
"message": "postcss: PostCSS has XSS via Unescaped </style> in its CSS Stringify Output",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "protobufjs: Arbitrary code execution in protobufjs",
"severity": "critical"
},
{
"type": "npm-audit",
"message": "qs: qs's arrayLimit bypass in comma parsing allows denial of service",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "rollup: Rollup 4 has Arbitrary File Write via Path Traversal",
"severity": "high"
},
{
"type": "npm-audit",
"message": "vite: Vite Vulnerable to Path Traversal in Optimized Deps `.map` Handling",
"severity": "high"
}
],
"status": "FAILED",
"scannedAt": "2026-05-30T15:53:41.664Z",
"npmAuditRan": true,
"pipAuditRan": true
}MegaMemory is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by 0xK3vin. Persistent project knowledge graph for coding agents. MCP server with semantic search, in-process embeddings, and web explorer. It has 177 GitHub stars.
MegaMemory failed SkillsLLM's automated security scan, which flagged one or more high-severity issues. Review the Security Report section carefully before using it.
Clone the repository with "git clone https://github.com/0xK3vin/MegaMemory" and add it to your Claude Code skills directory (see the Installation section above).
MegaMemory is primarily written in TypeScript. It is open-source under 0xK3vin on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh MegaMemory against similar tools.
No comments yet. Be the first to share your thoughts!
Requires a passing catalog security scan. Resolve the flagged issues and resubmit to enable featuring.
An MCP server that lets your coding agent build and query a graph of concepts, architecture, and decisions — so it remembers across sessions.
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. The graph stores concepts — features, modules, patterns, decisions — not code symbols.
understand → work → update
list_roots to orient itselfunderstand with a natural language query (or get_concept for exact ID lookup)create_concept or update_concept to record what it builtEverything persists in a per-project SQLite database at .megamemory/knowledge.db.
npm install -g megamemory
[!NOTE] Requires Node.js >= 18. The embedding model (~23MB) downloads automatically on first use.
megamemory install
Run the interactive installer and choose your editor:
[!NOTE] The installer only updates config files after a successful read/merge, and it will not overwrite existing plugin/command files unless they are already marked as MegaMemory-managed.
megamemory install --target opencode
One command configures:
~/.config/opencode/opencode.json~/.config/opencode/AGENTS.md~/.config/opencode/tool/megamemory.ts/user:bootstrap-memory for initial graph population/user:save-memory to persist session knowledgeRestart opencode after running install.
megamemory install --target claudecode
Configures:
~/.claude.json~/.claude/CLAUDE.md~/.claude/commands/megamemory install --target antigravity
Configures:
./mcp_config.json (workspace-level)megamemory install --target codex
Configures:
~/.codex/config.toml~/.codex/AGENTS.mdAdd megamemory as a stdio MCP server. The command is just megamemory (no arguments). It reads/writes .megamemory/knowledge.db relative to the working directory, or set MEGAMEMORY_DB_PATH to override.
{
"megamemory": {
"type": "local",
"command": ["megamemory"],
"enabled": true
}
}
| Tool | Description |
|---|---|
understand |
Semantic search over the knowledge graph. Returns matched concepts with children, edges, and parent context. |
get_concept |
Look up a concept by its exact ID. Returns full context including children, edges, incoming edges, and parent. |
create_concept |
Add a new concept with optional edges and file references. |
update_concept |
Update fields on an existing concept. Regenerates embeddings automatically. |
link |
Create a typed relationship between two concepts. |
remove_concept |
Soft-delete a concept with a reason. History preserved. |
list_roots |
List all top-level concepts with direct children. |
list_conflicts |
List unresolved merge conflicts grouped by merge group. |
resolve_conflict |
Resolve a merge conflict by providing verified, correct content based on the current codebase. |
Concept kinds: feature · module · pattern · config · decision · component
Relationship types: connects_to · depends_on · implements · calls · configured_by
Visualize the knowledge graph in your browser:
megamemory serve
4321 is taken, you'll be prompted to pick anothermegamemory serve --port 8080 # custom port
src/
index.ts CLI entry + MCP server (9 tools)
tools.ts Tool handlers (understand, get_concept, create, update, link, remove, list_conflicts, resolve_conflict)
db.ts SQLite persistence (libsql, WAL mode, schema v3)
embeddings.ts In-process embeddings (all-MiniLM-L6-v2, 384 dims)
merge.ts Two-way merge engine for knowledge.db files
merge-cli.ts CLI handlers for merge, conflicts, resolve commands
types.ts TypeScript types
cli-utils.ts Colored output + interactive prompts
install.ts multi-target installer (opencode, Claude Code, Antigravity, Codex)
web.ts HTTP server for graph explorer
plugin/
megamemory.ts Opencode skill tool plugin
commands/
bootstrap-memory.md /user command for initial population
save-memory.md /user command to save session knowledge
web/
index.html Single-file graph visualization (d3-force + Canvas)
| Command | Description |
|---|---|
megamemory |
Start the MCP stdio server |
megamemory install |
Configure editor/agent integration |
megamemory serve |
Launch the web graph explorer |
megamemory merge |
Merge two knowledge.db files |
megamemory conflicts |
List unresolved merge conflicts |
megamemory resolve |
Resolve a merge conflict |
megamemory --help |
Show help |
megamemory --version |
Show version |
When branches diverge, each may update .megamemory/knowledge.db independently. Since SQLite files cannot be auto-merged by git, megamemory provides dedicated merge commands.
megamemory merge main.db feature.db --into merged.db
Concepts are compared by ID: identical nodes are deduplicated, and conflicting nodes are kept as ::left/::right variants under one merge group UUID. Use --left-label and --right-label to replace default side labels with branch names.
megamemory merge main.db feature.db --into merged.db --left-label main --right-label feature-xyz
megamemory conflicts # human-readable summary
megamemory conflicts --json # machine-readable output
megamemory conflicts --db path # specify database path
megamemory resolve <merge-group-uuid> --keep left # keep the left version
megamemory resolve <merge-group-uuid> --keep right # keep the right version
megamemory resolve <merge-group-uuid> --keep both # keep both as separate concepts
When an AI agent runs /merge, it calls list_conflicts, verifies both versions against current source files, then calls resolve_conflict with resolved: {summary, why?, file_refs?} plus a verification reason. It does not pick a side blindly; it resolves to what the codebase currently reflects.