kotlin-lib-mcp

Give your AI agent the real sources of any Maven-published Kotlin/Java library.
An MCP server that, on request, downloads the sources of a
library (e.g. io.ktor:ktor-client-core:3.5.1), parses them with the Kotlin Analysis API
(standalone K2/FIR mode), and exposes structured information — public API surface, KDoc,
dependencies/metadata, raw source + search — to MCP clients: Claude Code, Claude Desktop,
IntelliJ IDEA (AI Assistant / Junie), VS Code and GitHub Copilot. An optional Compose Desktop
dashboard runs the same server in-process.
Tools — fetch_library · list_packages · list_declarations ·
get_api_signature · get_kdoc · get_source · search_source · diff_versions · diff_api ·
get_dependencies · list_versions · get_latest_version — plus MCP resources and a prompt.

Those install the Docker image. For the Claude Code plugin (which runs on your JDK), IntelliJ IDEA,
or to run the release zip without Docker, see Quick start.

Compose Desktop dashboard

Why this and not a docs-lookup server?
Most documentation MCP servers scrape rendered doc sites or feed the model pre-digested
summaries. This one works from the published sources jar — the ground truth:
- Resolved signatures, not regex guesses. Declarations are analyzed with the same
Analysis API that powers the Kotlin IDE, so
get_api_signature returns real, type-resolved
signatures (with graceful best-effort fallback when transitive dependencies are missing).
- KMP-aware. Kotlin Multiplatform libraries publish per-target sources jars; these are
resolved properly via
.module Gradle metadata, and every symbol is tagged with its targets.
- KDoc as data. Summaries, descriptions and tags are extracted per declaration — not
whole HTML pages.
- Exact version you asked for, offline after the first fetch. Everything is cached on
disk keyed by
group/artifact/version; no re-downloads, no drift between the docs and the
version you actually depend on.
- Raw source when you need it.
get_source and bounded search_source let the agent
read the actual implementation, not just the API.
Quick start (no build required)
Option 1 — Claude Code plugin. The server plus skills that make Claude reach for it, two
commands (/kotlin-lib:api, /kotlin-lib:migrate) and a setup helper. Needs a JDK 25+ — the one on
your PATH, or any other set by path in the plugin's java option; no Docker. It downloads the
release zip on first use:
/plugin marketplace add aoreshkov/kotlin-lib-mcp
/plugin install kotlin-lib@kotlin-lib-mcp
See plugin/README.md for what it bundles.
Option 2 — release zip. Download the latest
release, unzip (needs a
Java 25+ runtime), then: