AI Coding / MCP
codebase-memory-mcp:給 Claude Code、Cursor、Codex 的本地 codebase 記憶層,避免 AI 每次重讀整個專案
Threads 推薦 codebase-memory-mcp:一個本地 code intelligence MCP server,先把專案索引成 persistent knowledge graph,讓 AI coding agent 查結構時不用每次從頭讀檔。GitHub repo 驗證為 MIT License,README 主張支援 158 種語言、single static binary、zero dependencies、local-only processing,並可接 Claude Code、Cursor、Codex CLI 等工具。
2026年6月30日2 分鐘閱讀👁 8
AI Coding × MCP × Local Code Intelligence
codebase-memory-mcp:給 Claude Code、Cursor、Codex 的本地 codebase 記憶層,避免 AI 每次重讀整個專案
AI coding agent 最浪費時間與 token 的地方之一,是每次改一個小功能都像失憶一樣重新掃整個專案。
codebase-memory-mcp 的思路是先把 codebase 建成可查詢的本地 knowledge graph,讓 agent 用 MCP 查函式、類別、routes、call chains 與跨檔案關係。原文重點
- AI 寫程式常需要重讀整個專案,慢、耗 token,也容易漏關聯。
codebase-memory-mcp先幫專案建立索引,讓 AI 查 codebase 結構時不用每次從頭翻。- 原文提到支援 158 種程式語言、大型專案索引快、節省 token、全程本機執行。
- 支援 Claude Code、Cursor、Codex 等常見 AI coding 工具。
GitHub / README 快速核對
| 項目 | 核對結果 |
|---|---|
| Repo | DeusData/codebase-memory-mcp |
| License | MIT License。 |
| 定位 | High-performance code intelligence MCP server。 |
| 核心資料結構 | Persistent knowledge graph,包含 functions、classes、call chains、HTTP routes、cross-service links。 |
| 語言支援 | README 宣稱 158 languages;以 Tree-sitter AST 為主,另有 Hybrid LSP semantic type resolution。 |
| 部署型態 | Single static binary,macOS / Linux / Windows;README 稱 zero dependencies。 |
| 隱私 | README 強調 all processing happens 100% locally,code never leaves your machine。 |
它解的不是「搜尋」問題,而是 agent 記憶問題
一般 grep / ripgrep 很適合找文字,但 coding agent 需要的是「這個 route 會呼叫哪些 service」、「這個 class 被哪些地方引用」、「某個 controller 到 DB 的鏈路在哪裡」。這些問題如果每次都靠讀檔拼上下文,token 成本會很高,也容易漏掉跨檔案關係。