Labsco
MCP SERVER

Knowledge Graph

by hilyfux

Git-native project memory built from bash and jq — no database, no service — served to Codex, Cursor and any MCP client while Claude Code gets hooks.

Agent Memory
Summary
Every rule traces to a commit, and the whole store is greppable.

The design decision that pays off is storing knowledge as files in the repo: it versions, it reviews, it shares by push, and you can read it without the tool. Co-change prediction is the part that does something a plain file store cannot — it surfaces the implicit dependency between two directories that nobody documented. The published token budget for each component is a good sign about where the author's attention went.

What it is

A memory layer that lives inside your repository as plain files. It turns file operations and git history into evidence-backed knowledge nodes stored next to the code they describe, so rules trace to a commit hash or a recorded error rather than to something the model inferred. Claude Code gets automatic tracking through hooks; every other agent reads the same state through the bundled MCP stdio server.

What you get
  • Coverage, pending events, blind-spot count, hot zones and recent failures in one status read — `kg_status`
  • Full-text search across every canonical knowledge node, returning `path:line:excerpt` so a claim points at a line — `kg_query`
  • The complete knowledge node for a specific module — `kg_read_node`
  • A current work snapshot: active modules, uncommitted changes and recent commits, so the agent knows what is still in progress and not only what was committed — `kg_recent_work`
  • The modules a file path tends to change alongside, from real co-change history — `kg_predict`
  • The top co-change directory pairs, which surface dependencies nobody wrote down — `kg_cochange`
  • Modules with activity but no knowledge node, so gaps in coverage are visible — `kg_blind_spots`
  • 7 tools and 22 resources exposed to any MCP client, alongside the Claude Code hook path
  • A snapshot that survives `clear` and `compact`, and a Read size-guard that warns before a large read hits its ceiling so the agent greps instead
Requirements

`jq`, and that is the dependency list — no Docker, no Neo4j, no Python, no vector store, no daemon. Install with one bash line against your project directory on macOS, Linux or WSL, or the PowerShell installer on Windows. Then restart Claude Code so the hooks activate, or point an MCP-aware agent at the `.mcp.json` the installer wrote. `KG_PROJECT_DIR` is what the Codex-facing `AGENTS.md` section points at. Everything it stores is plain files in your repo, so sharing with a team is `git push` and inspecting it is opening a file.

Setup effort

Build from source — clone the repository and build it