Back to Apps

LeanKG
Supports UIby FreePeak
Lightweight local knowledge graph for AI coding tools to reduce token usage and provide accurate codebase context.
0 stars
Works in:CursorCodexGemini CLI
Exposes:ToolsResources
What it does
LeanKG connects AI coding assistants to a local-first knowledge graph of your codebase. It indexes code, builds dependency graphs, and allows AI tools to query targeted subgraphs instead of scanning entire files, significantly reducing token consumption and increasing accuracy.
Tools
index: Indexes the codebase to build the knowledge graph.impact: Calculates the blast radius of changes.trace: Shows feature-to-code traceability.detect-clusters: Identifies functional code communities.export: Exports the graph as Mermaid, DOT, or JSON.metrics: Tracks token savings and indexing efficiency.
Installation
{
"mcpServers": {
"leankg": {
"command": "leankg",
"args": ["mcp"]
}
}
}
Supported hosts
Claude Desktop, Cursor, OpenCode, Kilo Code, Gemini CLI, Google Antigravity, Codex.
Quick install
curl -fsSL https://raw.githubusercontent.com/FreePeak/LeanKG/main/scripts/install.sh | bash -s -- cursorInformation
- Pricing
- free
- Published
- 4/27/2026
- stars
- 0
Categories
Choose your AI client and follow the steps below.
Codex
Run the install script with `--target codex` and add to AGENTS.md.Cursor
Install via the provided install script: `curl -fsSL https://raw.githubusercontent.com/FreePeak/LeanKG/main/scripts/install.sh | bash -s -- cursor`Claude Desktop
Add `leankg` to your `claude_desktop_config.json` using the `mcp` command.





