SM

saaj376/mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars 0 forks Качество 71 Тренд 4MIT

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

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)

Открыть полный README на GitHub

Установка

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" } } } }