🧩 Plugin & Tiện ích mở rộng•Mã nguồn mở•

Codebase Memory MCP

MCP server viết bằng C, index codebase thành knowledge graph qua tree-sitter AST, hỗ trợ 66 ngôn ngữ, truy vấn sub-ms, 14 MCP tools, zero dependencies.

#codebase-memory-mcp
Danh mục
🧩 Plugin & Tiện ích mở rộng
Giá
Mã nguồn mở
GitHub Stars
⭐ 45,675
Ngôn ngữ
C
License
MIT
Ngày thêm
2026-03-27
Tóm tắt từ README GitHub
codebase-memory-mcp The fastest and most efficient code intelligence engine for AI coding agents. Full-indexes an average repository in milliseconds, the Linux kernel (28M LOC, 75K files) in 3 minutes. Answers structural queries in under 1ms. Ships as a native executable with a small verified runtime-asset set for macOS, Linux, and Windows — download, run , done. High-quality parsing through tree-sitter AST analysis across all 162 languages, enhanced with Hybrid LSP semantic type resolution for Python, TypeScript / JavaScript / JSX / TSX, PHP, C#, Go, C, C++, Java, Kotlin, Rust, and Perl — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 17 MCP tools. No language runtime, hosted service, or API key. Plug and play across 45 supported automatic/conditional client surfaces. Research — The design and benchmarks behind this project are described in the preprint Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP (arXiv:2603.27277). Evaluated across 31 real-world repositories: 83% answer quality, 10× fewer tokens, 2.1× fewer tool calls vs. file-by-file exploration. Security & Trust — This
Xem thêm từ README.md

Đánh giá chi tiết

Tổng quan

codebase-memory-mcp là một code intelligence engine viết hoàn toàn bằng C, chạy dưới dạng MCP server. Nó index repo thành knowledge graph gồm functions, classes, call chains, HTTP routes và cross-service links bằng tree-sitter AST analysis. Index Linux kernel (28M LOC, 75K files) mất 3 phút.

Tính năng chính

  • 14 MCP tools cho structural queries trên codebase
  • 66 ngôn ngữ lập trình (tree-sitter grammars compiled vào binary)
  • LSP-style hybrid type resolution cho Go, C, C++ (thêm ngôn ngữ dần)
  • Infrastructure-as-code indexing: Dockerfiles, K8s manifests, Kustomize
  • Built-in 3D graph visualization tại localhost:9749 (UI variant)
  • Auto-detect và config cho 10 agents: Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw

Stack kỹ thuật

Pure C, zero runtime dependencies. SQLite in-memory pipeline, LZ4 compression, fused Aho-Corasick pattern matching. Vendored tree-sitter grammars. Static binary cho macOS (arm64/amd64), Linux (arm64/amd64), Windows (amd64). Graph UI dùng React + Three.js.

Điểm mạnh

  • Tốc độ index rất nhanh: repo trung bình xong trong milliseconds
  • 120x ít token hơn: 5 structural queries dùng khoảng 3,400 tokens thay vì khoảng 412,000 qua file-by-file search
  • Single static binary, không Docker, không runtime, không API key
  • 2,586 tests passing, có CI (dry-run, CodeQL, nightly soak, scorecard)
  • OpenSSF Scorecard badge, có SECURITY.md và CONTRIBUTING.md

Hạn chế

  • Viết bằng C nên contribute code khó hơn Go/TS/Python projects
  • LSP-style type resolution mới có cho Go, C, C++ (các ngôn ngữ khác chưa có)
  • Graph UI là variant riêng, không đi kèm binary mặc định

Phù hợp khi nào

Khi bạn làm việc trên repo lớn và muốn coding agents truy vấn cấu trúc code thay vì đọc từng file. Đặc biệt hữu ích nếu repo có nhiều ngôn ngữ hoặc cross-service dependencies.

Codebase Memory MCP | Atlas for AI