
saaj376/mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
A persistent, queryable of a codebase, exposed over the Model Context Protocol. It gives a CI gate, an AI code‑review step, and a runtime feedback loop of the code instead of each re-deriving repo...
概要
A persistent, queryable of a codebase, exposed over the Model Context Protocol. It gives a CI gate, an AI code‑review step, and a runtime feedback loop of the code instead of each re-deriving repo structure from grep and file reads on every run. The graph is a single SQLite file under .codebase-memory/graph.db (and a compressed, committable graph.db.zst snapshot), so every agent session — a mentor's, a student's, and CI's headless review — reads the same structural facts. This implements the Combined Code Quality Strategy design doc: a shared code knowledge graph sitting underneath three enforcement layers (CI gate → AI review → canary runtime). Each MCP tool below maps to a specific role that document assigns to the graph. All five phases of the design are implemented, tested, and dogfooded on this repository. All figures below are , not estimated — from the test suite and from indexing this repository itself (7 source modules + 4 test modules = 11 Python files).
README
以下は原文 README の抜粋です。原文を見る。
codebase-memory-mcp
A persistent, queryable structural knowledge graph of a codebase, exposed over the Model Context Protocol. It gives a CI gate, an AI code‑review step, and a runtime feedback loop one shared picture of the code instead of each re-deriving repo structure from grep and file reads on every run.
The graph is a single SQLite file under .codebase-memory/graph.db (and a
compressed, committable graph.db.zst snapshot), so every agent session — a
mentor’s, a student’s, and CI’s headless review — reads the same structural
facts.
Provenance. This implements the Combined Code Quality Strategy design doc: a shared code knowledge graph sitting underneath three enforcement layers (CI gate → AI review → canary runtime). Each MCP tool below maps to a specific role that document assigns to the graph.
Contents
- Status
- At a glance (metrics)
- Tool-call routing evaluation
- How it works
- The graph model
- MCP tools
- Governance (Phase 5)
- Call-resolution semantics
- Risk classification
- Install
- Usage
- Persistence & schema
- Testing
- Limitations & deliberate scope choices
- Project layout
Status
All five phases of the design are implemented, tested, and dogfooded on this repository.
| Phase | Scope | State |
|---|---|---|
| 0 | Package scaffold, MCP server, graph store | ✅ |
| 1 | Python indexer → module / class / function nodes + CONTAINS / IMPORTS / CALLS edges |
✅ |
| 2 | Read tools: search_graph, get_architecture, trace_path, dead-code query |
✅ |
| 3 | detect_changes — git diff → blast radius + risk classification |
✅ |
| 4 | ingest_traces — runtime HTTP_CALLS validation + .zst snapshot |
✅ |
| 5 | Governance: required status checks, branch protection, org rulesets, static/security analysis | ✅ |
How the tools map to the doc’s three layers
| Layer (design doc) | What it does | Tools |
|---|---|---|
| L1 — CI gate | deterministic pass/fail structural gates | audit_governance, scaffold_ci, apply_branch_protection, apply_org_ruleset, run_quality_checks, detect_changes (blast radius + gate_should_block), search_graph (dead code) |
| L2 — AI review | ground review in the graph, cite real callers | trace_path, get_architecture, search_graph |
| L3 — runtime | validate/correct the graph from canary traffic | ingest_traces |
| Shared substrate | one committed structural index for every session | save_snapshot / load_snapshot (graph.db.zst) |
At a glance (measured)
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"codebase-memory": {
"command": "codebase-memory-mcp",
"env": { "CODEBASE_MEMORY_ROOT": "/path/to/project" }
}
}
}