codebase-memory-mcp
把代码库索引成知识图谱的 MCP Server,供编码 agent 用图查询替代逐文件搜索
把代码库解析成持久化知识图谱的 MCP Server:用 tree-sitter 解析 158 种语言的 AST,对 Python、TypeScript/JS/TSX、PHP、C#、Go、C/C++、Java、Kotlin、Rust 这 9 种语言叠加 Hybrid LSP 做语义类型推导,生成函数、类、调用链、HTTP 路由与跨服务链接的图。AI 编码 agent 通过 14 个 MCP 工具查询这张图——搜索符号、追踪调用路径、检测死代码、分析变更影响、执行 Cypher 图查询——替代逐文件 grep/read 循环。单个静态 C 二进制,零运行时依赖,全部处理在本地完成。一条安装命令自动检测并配置 Claude Code、Codex CLI、Gemini CLI、OpenCode 等 11 个 agent。配套论文在 31 个仓库上作者自测:83% 回答质量,10× 更少 token,2.1× 更少工具调用(对比逐文件搜索)。
社区实测
实测 token 节省确实存在,但 99% 是最好情况而非平均;社区普遍认为需要与竞品做横向对比才能判断实际价值。
- 降低代码 agent 探索代码库的 token 消耗
- 以轻量独立二进制提供调用图与类型图
- 宣称的 99% token 减少仅为最佳情况,社区实测结果更温和
- 缺少与同类工具(GitNexus、jCodeMunch 等)的横向对比基准
- 功能聚焦于调用图和类型图,覆盖范围有限
codebase-memory-mcp Review: 99% Token Cut for Code Agentscodebase-memory-mcp: how it actually works under the hood + the token numbers I measured (not the README's)I actually measured the codebase-memory MCP's token savings with /context instead of trusting the "99%" claim. It's real but nuancedProbé el MCP "codebase memory" para que la IA no se lea tu proyecto entero y medí los tokens de verdad (el 99% es su mejor caso)I built an MCP server that gives Claude Code a knowledge graph of your codebase — in average 20x fewer tokens for code exploration
截至 2026-08-19
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui yay -S codebase-memory-mcp-bin