Leankg MCP Server

<strong>Local-first code knowledge graph for AI coding agents</strong>

Local serverstdioPython

What is the Leankg MCP server?

Connect Leankg to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Local-first code knowledge graph for AI coding agents. The leankg mcp server is what makes that connection.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • MCP-native — 85+ tools for search, impact, call graphs, ontology, architecture, and team knowledge
  • Local — first storage** — SQLite by default; RocksDB for multi-project / team deploy
  • Token — aware payloads** — targeted subgraphs + TOON responses (~40% smaller MCP payloads)
  • Day — 2 / resume** — same env, no rebuild cost; vectors_existing becomes non-zero and embed_control(status) reports mode: partial_incremental
  • Target — What you get
  • cursor — Binary + MCP + skill + AGENTS.md + session hook
  • claude — Binary + MCP + plugin + skill + CLAUDE.md + hooks
  • opencode — Binary + MCP + plugin + skill + AGENTS.md
  • Metric — Result
  • Speedup2.50×
  • Operation — Throughput
  • Agent — Auto-setup

Credentials and setup notes

Configuration is passed through the environment: LEANKG_MMAP_SIZE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Rust 1.75+ (only when building from source) - macOS or Linux - Docker optional

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Where it fits

Plenty of database access servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Leankg's toolset — MCP-native, Local, Token and 11 more — is a fair guide to whether it matches your workflow. It is maintained by freepeak; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Leankg.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
MCP-native85+ tools for search, impact, call graphs, ontology, architecture, and team knowledge
Localfirst storage** — SQLite by default; RocksDB for multi-project / team deploy
Tokenaware payloads** — targeted subgraphs + TOON responses (~40% smaller MCP payloads)
Day2 / resume** — same env, no rebuild cost; vectors_existing becomes non-zero and embed_control(status) reports mode: partial_incremental.
TargetWhat you get
cursorBinary + MCP + skill + AGENTS.md + session hook
claudeBinary + MCP + plugin + skill + CLAUDE.md + hooks
opencodeBinary + MCP + plugin + skill + AGENTS.md
MetricResult
Speedup**2.50×**
OperationThroughput
AgentAuto-setup
CursorYes
OpenCodeYes

Configuration

  • Rust 1.75+ (only when building from source) - macOS or Linux - Docker optional
VariableDescriptionRequired
LEANKG_MMAP_SIZEConfiguration value read at startup.Optional

Example prompts to try

  • Use Leankg to MCP-native.
  • Use Leankg to Local.
  • Use Leankg to Token.

Frequently asked questions

It connects Leankg to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (MCP-native, Local, Token, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Leankg directly.