Description
LeanKG is a local-first code knowledge graph for AI coding agents. It pre-indexes your repository, then serves precise subgraphs to agents such as Claude Code, Cursor, OpenCode and Gemini over MCP, so they get the parts of the code that matter instead of whole files. It combines keyword search, semantic search and ontology search in one query, and it can find code by intent rather than syntax. Impact analysis shows the blast radius of a change with confidence and severity ratings before you make it. The toolkit also includes call graphs, community detection and architecture visualisation. The MCP server offers more than 85 tools and, the site says, connects without configuration. Responses are token-aware, and the aim is fewer tool calls. Everything runs on your machine with no cloud and no external database. The site says it supports 12 languages, including Go, TypeScript, Python and Rust, and the source is on GitHub.…
Highlights
- Pre-indexed code graph served to agents over MCP
- Keyword, semantic and ontology search
- Impact analysis before changing code
- Call graphs and architecture visualisation
- Local-first with no cloud or external database
Ratings & Reviews
No ratings yet
Be the first to rate LeanKG.
People also visit
LeanKG FAQ
What does LeanKG do for an AI agent?
It gives the agent precise subgraphs of your codebase instead of whole files, so it uses fewer tokens and tool calls.
Which agents can connect?
The site lists Claude Code, Cursor, OpenCode, Gemini and Kilo over MCP, and says no configuration is needed to connect.
Does my code leave my machine?
No. The site says LeanKG runs 100% locally, with no cloud and no external database.
Which languages does it index?
The site says 12 languages, and lists Go, TypeScript, Python and Rust among them.
What are the best LeanKG alternatives?
Popular alternatives to LeanKG include basemind, CodeBurn and Ix. See all LeanKG alternatives

