An AI agent in a big codebase greps a lot and still misses how the parts connect. knowledge-index gives it a map.
It reads several repositories at once (for example a Laravel API, two Vue frontends and a second backend) and builds one graph of the code. Calls, imports, Eloquent relations, SQL tables and docs become edges. The part I needed most is the links between repositories: a $api('v2/drivers') call in a Vue page is joined to the controller method that serves the route, and an HTTP call from one backend is joined to the controller of the other service.
The agent asks over MCP. contracts_search gives a route with its controller, middleware and every file that calls it. graph_routes finds several ways from one place to another and names the routes on the way, for example Drivers.vue → DELETE v2/drivers/{id} → DriverController.destroy() → ObjectDriver. graph_affected lists what breaks if you change a class, across repositories. search looks through docs and code by meaning.
The code graph comes from graphify (AST) and the doc search from qmd. Both run on your own machine without API keys. Paths are found with Dijkstra on priced edges: a call is cheap, a framework class is expensive. So a path through Illuminate\Http\Response costs too much to win, and the answer follows real calls.
Locally it is one MCP server for your own agent. On a shared server each developer signs in through the browser with their account of your API and sees only the projects their role allows. Answers take 0.01–0.3 s on a graph of 23,000 nodes, because graphify and the search model stay loaded in memory.
I use it at work on a Laravel API with two frontends and a support system. Open source, GPL-3.0. The repo has a demo on a made-up shop: make demo.
0 comments
No comments yet. Start the conversation!
Log in — to join the discussion.