Kotlin Lib MCP logo

Kotlin Lib MCP

Inspect published Kotlin/Java library APIs, KDoc, sources, dependencies, versions, and changes through MCP tools.

Install Kotlin Lib MCP

Run the project’s own setup commands, in order.

Setup steps from the project

kotlin-lib-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Add to Claude Code
    claude mcp add kotlin-lib -- /path/to/kotlin-lib-mcp-server-<version>/bin/server --transport stdio
    
  2. 2. Add to Claude Code
    claude mcp add kotlin-lib -- docker run -i --rm -v kotlin-lib-mcp-cache:/home/mcp/.cache ghcr.io/aoreshkov/kotlin-lib-mcp
    
  3. 3. Start the server
    docker run --rm -p 127.0.0.1:3000:3000 -v kotlin-lib-mcp-cache:/home/mcp/.cache \
      ghcr.io/aoreshkov/kotlin-lib-mcp --transport http --host 0.0.0.0 --port 3000
    
  4. 4. Start the server
    ./gradlew :server:run --args="--transport stdio"   # local MCP over stdio (default)
    
  5. 5. Start the server
    ./gradlew :server:run --args="--transport http --port 3000"   # Streamable HTTP at /mcp
    
  6. 6. Install
    ./gradlew :server:installDist                      # standalone launcher in server/build/install/server/bin
    

Overview

kotlin-lib-mcp MCP server downloads published Kotlin or Java libraries from Maven repositories, analyzes their source jars, and exposes structured API and documentation data to MCP clients. Its tools cover resolved signatures, KDoc, raw source, source search, dependencies, version lookup, and API or file diffs. Kotlin Multiplatform metadata is handled through published Gradle module information, with symbols tagged by supported targets. Use it when an agent needs version-specific library details or implementation source rather than scraped documentation.

Use cases

  • Inspect a library's resolved public API before adopting a dependency
  • Read KDoc and implementation source for an exact library version
  • Compare public API and source changes across library releases
  • Trace published Maven or Kotlin Multiplatform dependencies
  • Find declarations and usages with bounded source searches

Key features

  • Resolved Kotlin and Java API signatures
  • Kotlin Multiplatform target-aware indexing
  • Declaration-level KDoc and raw source access
  • Version and public-API diffing
  • Paged searches, listings, and dependency trees
  • Local disk caching of fetched libraries

Tools12

What Kotlin Lib MCP lets your agent do. Expand a tool for its parameters.

Self-reported~282 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/19 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars15Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.
Tools exposed12Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Kotlin Lib MCP works

What kotlin-lib-mcp does

kotlin-lib-mcp gives MCP clients access to the published source artifacts of Maven-hosted Kotlin and Java libraries. It works from a Maven coordinate such as group:artifact:version, then downloads the matching metadata and sources jar, analyzes the contents, and builds a local index. The result includes public declarations, resolved signatures, KDoc, source files, dependencies, and version information.

The server is particularly suited to Kotlin Multiplatform libraries. Published .module metadata is used to resolve per-target source artifacts, and indexed symbols include their available targets. Kotlin declarations are analyzed with the Kotlin Analysis API in standalone K2/FIR mode. When a transitive type cannot be resolved, signature results can fall back to a best-effort PSI representation instead of failing outright.

How it works

Call fetch_library before querying a library. The operation is idempotent: after the initial download and analysis, subsequent tool calls read from the disk cache keyed by group, artifact, and version. A version can be supplied explicitly, omitted where supported, or set to latest for fetch_library.

Queries return compact JSON text together with structured content and typed output schemas. Large results are paged or bounded. Version and API comparisons require the relevant versions to have been fetched, while dependency trees accept depth and node limits. Source searches can use either substring or regular-expression matching and return bounded file:line snippets.

Only requested Maven metadata and artifacts are downloaded. The server reads downloaded library sources, not a project’s own code, and stores the cache locally. Maven Central is used by default; additional repositories can be configured, or Central can be disabled.

Setup and configuration

The server can run from a release zip with a Java 25 or newer runtime, or from the published Docker image. The Docker setup mounts a volume at /home/mcp/.cache so fetched libraries persist between container runs. Claude Code can install the bundled plugin, which downloads the release zip on first use and requires JDK 25 or newer. Claude Code can also register either the executable or Docker command as a stdio MCP server.

A Compose Desktop dashboard is available as an optional in-process interface. Command-line configuration includes streamable HTTP transport, custom cache locations, repository selection, and OpenTelemetry tracing with --otel. Task records are stored under a tasks subdirectory when task support is enabled.

Tools and capabilities

  • fetch_library downloads, analyzes, and caches a coordinate.
  • list_packages reports packages, declaration counts, and Kotlin Multiplatform targets.
  • list_declarations lists declarations with signatures and deprecation information, with package, visibility, and deprecation filters.
  • get_api_signature resolves one declaration by fully qualified name and includes ReplaceWith data when present.
  • get_kdoc returns a declaration’s summary, description, and tags.
  • get_source reads a file or declaration, while search_source finds bounded substring or regex matches.
  • diff_versions produces a paged unified source diff; diff_api reports added, removed, changed, or deprecated public API entries.
  • get_dependencies reads dependency trees from POM or Gradle module metadata.
  • list_versions and get_latest_version inspect Maven metadata for published releases.

Limitations and notes

Results depend on the source jars and Maven metadata published for the requested coordinate. API signatures may be marked best-effort when required transitive dependencies are unavailable. Cached artifacts remain on the local disk until removed. Outbound requests are limited to the configured Maven repositories, Docker image hosting, and release downloads used by the installation method; there is no account, analytics, or remote storage.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Kotlin Lib MCP

kotlin-lib-mcp is an MCP server that connects AI clients to Maven-published Kotlin and Java libraries. Its main tools fetch and cache source jars, list packages and declarations, resolve API signatures, read KDoc, inspect raw source, search files, compare versions, and examine dependencies and published versions.

Install it with the Claude Code plugin, a release zip, or Docker. The plugin and release zip require Java 25 or newer; Docker runs the published image. Claude Code can register the executable or Docker command as a stdio MCP server.

Call `fetch_library` with the library’s Maven coordinate, such as `group:artifact:version`, before using the inspection tools. The server downloads and analyzes the source once, then serves signatures, KDoc, source, dependencies, and other results from its local cache.

Yes. `diff_versions` returns a paged unified source diff, while `diff_api` identifies added, removed, changed, and deprecated public declarations. The versions must be fetched before comparison, and both tools support filtering for larger results.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewKotlin Lib MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/kotlin-lib-mcp?style=directory)](https://allmcps.com/mcp/kotlin-lib-mcp)
HTML Embed
<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>