How does LeanKG reduce token usage?
It uses Graph RAG to extract precise function signatures, dependencies, and variables instead of sending entire files or repositories.
@FreePeak
基本信息
A local, Rust-based Knowledge Graph MCP server. Cuts AI coding token usage by up to 98% by intelligently querying your codebase instead of sending full files.
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"leankg": {
"command": "leankg",
"args": [
"start",
"--mcp"
]
}
}
}工具列表暂未提供
当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
LeanKG is a local Knowledge Graph powered by Rust and Tree-sitter that indexes your codebase and uses the Model Context Protocol (MCP) to feed your AI assistant only the exact structural context it needs. It is built for developers who want to drastically reduce token usage (up to 98% drop) and avoid sending entire files or repositories to cloud-based AI tools.
Visit the LeanKG GitHub repository for full installation instructions, benchmarks, and supported languages. After installation, the MCP server exposes tools that your AI assistant can invoke — no additional configuration steps beyond connecting it to an MCP-compatible host (e.g., Claude Desktop, Cursor, Windsurf, OpenCode).
analyze_dependencies and extract_signatures.It uses Graph RAG to extract precise function signatures, dependencies, and variables instead of sending entire files or repositories.
No. LeanKG runs entirely on your local machine; your repository is never blindly uploaded.
LeanKG supports any MCP-compatible host, including Claude Desktop, Cursor, Windsurf, and OpenCode.
A curated list of references for MLOps

Model Context Protocol Servers
🚀 The fast, Pythonic way to build MCP servers and clients.
A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
评论