LeanKG for
<h2>Local knowledge graph for private AI-assisted code context</h2>
- Free
- 4.8
- V v0.19.33
<h2>Local knowledge graph for private AI-assisted code context</h2>
LeanKG, from FreePeak, is a local-first knowledge graph built to supply AI coding assistants with structured project context. It indexes source files into a queryable graph so language models receive targeted code context instead of raw file dumps, improving the relevance of generated code suggestions and analysis. The tool emphasizes privacy and local indexing while connecting to AI clients via the Model Context Protocol. Engineers and architects on large repositories gain private, contextual assistance in IDE workflows.
What tasks can you actually use it for?
The tool transforms codebases into a navigable graph so AI assistants can pull precise context for code generation, reviews, and impact analysis. It parses popular languages and exposes graph objects via API, for example:
- TypeScript
- JavaScript
- Python
How accurate are its context selections for AI models?
Graph-driven selections reduce irrelevant context sent to models by using token usage optimization to supply only pertinent code fragments to the language model. Community feedback highlights that graph context captures inter-file and dependency relationships that simple vector searches miss, which improves relevance for structural questions. Generated suggestions still require developer review for design correctness or complex logic verification.
What file formats and environments does it accept?
LeanKG runs locally on Node.js and exposes an MCP server and REST API, and it installs via npm or from source. The server is compatible with Windows, macOS, and Linux environments, and indexing happens on the local machine without cloud uploads, so an internet connection is not required for the core indexing step.
Does it fit into existing IDE and CI workflows?
Integration targets MCP-compatible assistants and IDEs via its REST API, allowing tools like Claude Desktop or Cursor to query graph context. The design avoids heavyweight graph databases for local use, provides microservice call graph visualization, and applies community clustering (Leiden algorithm) for readable groupings. A one-line install is cited by users, which eases trial integration into developer workflows.
Practical choice for teams needing private, structural code context
LeanKG is a pragmatic option for developers who need local, structural context for AI-assisted coding and who use MCP-compatible assistants; its value is strongest when projects rely on TypeScript, JavaScript, or Python parsing. Parser coverage and ongoing language support determine how broadly the tool applies, so teams should confirm required language support before adopting it as a primary context provider.
Pros
- Local-first indexing preserves source code on the user machine
- MCP server integration connects to Claude Desktop and similar clients
- Dependency and call-graph visualizations clarify cross-module interactions
- REST API enables programmatic querying and IDE integration
Cons
- Utility depends on current language parser coverage and updates
- Graph visualizations require familiarity for very large repositories
- Installation requires a Node.js environment
LeanKG for
- Free
- 4.8
- V v0.19.33
Top downloads
memory-graph
Local graph memory for MCP clients, aimed at developer workflows
docsiq
docsiq: MCP server for semantic documentation retrieval
healthcare-mcp-public
MCP server that connects LLMs to live healthcare sources
octobrain
Octobrain: Local semantic search server for MCP-connected AI assistants
Arxiv Mcp Server
Arxiv MCP Server connects MCP agents to arXiv for programmatic research
Discover more programs
devrag
- 4
- Free
Efficient RAG System for Developers
Context Harness
- 4.9
- Free
Context Harness: Ingestion and retrieval for MCP-connected LLMs
hister
- 4.4
- Free
obsidian-mcp-plugin
- 4.1
- Free
Enhance Your Obsidian Vault with AI Connectivity
graphrag-toolkit
- 4.3
- Free
codesearch
- 4.9
- Free
Local, AST-aware semantic code search for MCP environments
Search Cli
- 4.5
- Free
Fast MCP Search CLI for Agent-Driven Web Retrieval and Integration
open-ontologies
- 4.1
- Free
High-performance MCP server and desktop suite for ontology engineering
subcog
- 4.5
- Free
Efficient AI Memory Management Tool
anilist-mcp
- 4.7
- Free
Comprehensive AniList MCP Server Overview
gsearch-mcp
- 4.3
- Free
gsearch-mcp: Local MCP server providing live web citations