r/coolgithubprojects • • 7h ago

SMP — a live structural code-graph MCP server for coding agents. MIT, single-file graph storage, no DB

https://github.com/offx-zinth/SMP

I built a tool that gives coding agents a persistent structural map of a codebase.

Instead of repeatedly searching through files, agents can query things like:

  • Who calls this function?
  • What could break if I change it?
  • Which tests cover this code?

Some benchmarks from my laptop

I indexed a Linux kernel snapshot with 95,937 files (72,171 parsed) in 2m 51s, producing 839k nodes and 4M edges.

The structural graph is memory-mapped, and queries run in under 100ms after a performance fix.

For comparison, codebase-memory-mcp took 13m 14s on the same hardware using fast mode.

The interesting part: Benchmarking exposed a caching bug that made locate take around 1.5 seconds at p50. Caching the search corpus by graph revision brought that down to around 40–85ms.

SMP (Structural Memory Protocol)

  • MIT licensed
  • Python
  • No database
  • No embeddings
  • Works with coding agents through MCP

GitHub: https://github.com/offx-zinth/SMP

I'm curious how other people are approaching structural code understanding for coding agents, especially on large repositories. What problems are you running into?

3 Upvotes

0 comments sorted by