Exposes the public API, KDoc and sources of Maven-published Kotlin/Java libraries to MCP clients
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Kotlin Lib MCP.
fetch_libraryDownload + analyze + cache; returns a summary. Idempotent. Version may be omitted or `latest
list_packagesPackages with declaration counts and KMP targets; paged
list_declarationsDeclarations with signatures; filter by `package` and `visibility`; paged
get_api_signatureResolved signature of one declaration by FQ name
get_kdocKDoc (summary, description, tags) of one declaration
get_sourceRaw source of a file (`path`) or one declaration (`fqName`); paged by line
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.
Eleven tools β fetch_library Β· list_packages Β· list_declarations Β·
get_api_signature Β· get_kdoc Β· get_source Β· search_source Β· diff_versions Β·
get_dependencies Β· list_versions Β· get_latest_version β plus MCP resources and a prompt.
Those install the Docker image. For Claude Code, IntelliJ IDEA, or to run the release zip without Docker, see Quick start.


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:
get_api_signature returns real, type-resolved
signatures (with graceful best-effort fallback when transitive dependencies are missing)..module Gradle metadata, and every symbol is tagged with its targets.group/artifact/version; no re-downloads, no drift between the docs and the
version you actually depend on.get_source and bounded search_source let the agent
read the actual implementation, not just the API.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 Docker:
See plugin/README.md for what it bundles.
Option 2 β release zip. Download the latest release, unzip (needs a Java 21+ runtime), then:
Option 3 β Docker.
Option 4 β IntelliJ IDEA / Android Studio. JetBrains IDEs are MCP clients too β which is where most Kotlin gets written. Open Settings | Tools | AI Assistant | Model Context Protocol (MCP), click Add, pick the stdio transport and paste:
Choose global or project level, Apply, and the tools appear in the AI Assistant chat. Junie
takes the same JSON in its own MCP settings. Swap command/args for the release-zip launcher
(bin/server --transport stdio) if you'd rather not use Docker.
Option 5 β MCP Registry. The server is published to the
official MCP registry as
io.github.aoreshkov/kotlin-lib-mcp, and listed in the
GitHub MCP Registry; registry-aware clients can
install it from there.
Or in .mcp.json / Claude Desktop config:
For remote use, run the http transport (--transport http --port 3000) and point the client
at http://127.0.0.1:3000/mcp β DNS-rebinding protection admits localhost hosts by default;
--allowed-host/--allowed-origin extend the allowlist for non-localhost deployments.
CLI flags: --transport stdio|http, --port <int> (default 3000), --allowed-host <host> /
--allowed-origin <url> (repeatable; extend the http transport's localhost-only defaults),
--cache-dir <path>, --repo <url> (repeatable; Maven Central is the default),
--forward-logs-to-client (opt into mirroring logs to the client; off by default, stderr-only),
--otel (opt into OTLP/HTTP trace export; off by default β see Telemetry), --help.
All tools take a Maven coordinate (group:artifact:version). Call fetch_library first β
it downloads, extracts and analyzes the sources once; every other tool answers from the cached
index. fetch_library, list_versions and get_latest_version also accept group:artifact, and
fetch_library accepts group:artifact:latest to resolve the latest stable release.
| Tool | Purpose |
|---|---|
fetch_library | Download + analyze + cache; returns a summary. Idempotent. Version may be omitted or latest |
list_packages | Packages with declaration counts and KMP targets; paged |
list_declarations | Declarations with signatures; filter by package and visibility; paged |
get_api_signature | Resolved signature of one declaration by FQ name |
get_kdoc | KDoc (summary, description, tags) of one declaration |
get_source | Raw source of a file (path) or one declaration (fqName); paged by line |
search_source | Substring/regex search; bounded, returns file:line snippets |
diff_versions | Unified diff between two fetched versions; summary-first, paged, path-filtered |
get_dependencies | Dependency tree from .pom/.module; bounded depth and maxNodes |
list_versions | Published versions from maven-metadata.xml, newest-first; paged |
get_latest_version | Latest stable release (and newest overall) from maven-metadata.xml |
Every tool ships the metadata the MCP spec encourages clients to use: a display title,
behavior annotations (readOnlyHint: true everywhere except fetch_library, which is
additive-only β destructiveHint: false, idempotentHint: true; tools that reach Maven
repositories set openWorldHint: true, cache-only tools false), a typed outputSchema
derived from the response DTO's serializer, and an icon. Results carry both pretty-printed JSON
text and the matching structuredContent object, so structured-output clients and plain-text
clients see the same payload.
fetch_library also reports progress notifications (download β analyze β cache) when the
client sends a progressToken. Logs go to stderr by default (which the spec blesses for all
stdio logging); the deprecated MCP logging capability β mirroring logs to clients as
notifications/message (respecting logging/setLevel) β is opt-in via --forward-logs-to-client,
for stdio clients that surface MCP log messages but drop stderr.
When fetch_library is called without a version (io.ktor:ktor-client-core, or β¦:latest) it has
to guess. If the client advertised the elicitation capability, it asks instead: an
elicitation/create form-mode request carrying a single-select version picker β the titled
oneOf shape from SEP-1330, with the latest stable release pre-selected as the schema default.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/kotlin-lib-mcp)<a href="https://allmcps.com/mcp/kotlin-lib-mcp"><img src="https://allmcps.com/api/badge/kotlin-lib-mcp?style=directory" alt="Kotlin Lib MCP on AllMCPs" /></a>