🧩 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
⭐ 48,732
Ngôn ngữ
C
License
MIT
Ngày thêm
2026-03-27
Tóm tắt từ README GitHub
codebase-memory-mcp: local code intelligence for AI agents via MCP Understand your repository, from source code to the systems around it. codebase-memory-mcp is an MCP server that connects code, documentation, configuration, and infrastructure in a persistent local knowledge graph. Use it to find an unfamiliar feature, follow a call across services, trace a deployment back to its source, or assess which parts of a project a change could affect. Give your coding agent structural context through Model Context Protocol (MCP), or query the graph directly from the CLI. The MCP server is the core of the project. Its optional visual companion, CBM Lens, is in open beta (v0.0.1) , with a source reader, architecture maps, the Galaxy graph, coverage diagnostics, architecture decisions, and local code chat. The native C backend exposes 17 MCP tools , parses languages and file formats with vendored grammars, and adds Hybrid LSP type resolution for supported languages. The installer supports 46 automatic or conditional client integrations , including client configuration, skills, agent profiles, and applicable hooks. Indexing and graph queries need no hosted service or API key. Focused graph
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