# Kotlin & Java Library Sources

> Kotlin & Java Library Sources is an open-source MCP server for developer tools. Real Kotlin and Java library sources, API signatures and KDoc from Maven sources jars. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, vscode, jetbrains
- **Repository:** https://github.com/aoreshkov/kotlin-lib-mcp
- **MCP Registry name:** io.github.aoreshkov/kotlin-lib-mcp
- **Categories:** developer tools
- **Listing updated:** 2026-11-15

## About

Instead of scraping documentation sites, this server downloads the published sources jar for a Maven coordinate such as io.ktor:ktor-client-core:3.5.1, parses it with the Kotlin Analysis API in standalone K2 mode, and answers from a cached index. The README argues this gives type-resolved signatures rather than regex guesses, falling back to best-effort signatures when transitive dependencies are missing.

It understands Kotlin Multiplatform libraries by reading per-target sources jars through Gradle .module metadata and tagging each symbol with its targets. Documentation is returned as structured KDoc summaries, descriptions and tags, and you can read raw source or search it with bounded results. Two diff tools compare versions, one as a unified diff and one as public API changes including deprecations with ReplaceWith.

After the first fetch, everything is cached on disk by group, artifact and version, so repeat queries work offline. The only outbound traffic is to the Maven repositories you point it at, plus GHCR or GitHub releases for installation; the README states there is no analytics or account. It runs as a Docker image, a release zip needing Java 25 or newer, or a Claude Code plugin.

## Features

- **Resolved API signatures:** Returns type-resolved signatures with deprecation and ReplaceWith details.
- **KDoc as data:** Extracts summaries, descriptions and tags per declaration.
- **Multiplatform aware:** Tags each symbol with its Kotlin Multiplatform targets.
- **Version diffs:** Compares two versions as a source diff or as public API changes.
- **Offline after first fetch:** Caches sources and index on disk per exact version.
- **No telemetry:** The README says nothing about you is collected or shared.

## Good for

- Check the exact signature of a library function before an agent calls it
- Find what changed in a dependency's public API between two versions
- Read the real implementation behind a library method
- Plan a migration by listing deprecations with their replacements

## Install

### Claude Code (Terminal)

```sh
claude mcp add kotlin-lib-mcp -- docker run -i --rm ghcr.io/aoreshkov/kotlin-lib-mcp:0.10.1
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "kotlin-lib-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aoreshkov/kotlin-lib-mcp:0.10.1"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "kotlin-lib-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aoreshkov/kotlin-lib-mcp:0.10.1"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "kotlin-lib-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aoreshkov/kotlin-lib-mcp:0.10.1"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "kotlin-lib-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aoreshkov/kotlin-lib-mcp:0.10.1"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "kotlin-lib-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aoreshkov/kotlin-lib-mcp:0.10.1"
      ]
    }
  }
}
```

## Tools

- `fetch_library`: Download, analyse and cache a library's sources.
- `list_packages`: List packages with declaration counts and KMP targets.
- `list_declarations`: List declarations with signatures and deprecations.
- `get_api_signature`: Resolved signature of one declaration.
- `get_kdoc`: KDoc of one declaration.
- `get_source`: Raw source of a file or declaration.
- `search_source`: Bounded substring or regex search of the sources.
- `diff_versions`: Unified diff between two fetched versions.
- `diff_api`: Public API changes between two versions.
- `get_dependencies`: Dependency tree from pom or module metadata.
- `list_versions`: Published versions from maven-metadata.xml.
- `get_latest_version`: Latest stable and newest release.

## FAQ

### Which libraries does it support?

Any Maven-published Kotlin or Java library, addressed by group:artifact:version.

### Which clients can use it?

Claude Code, Claude Desktop, IntelliJ IDEA with AI Assistant or Junie, VS Code and GitHub Copilot.

### What does it need to run?

Docker, or a Java 25 or newer runtime for the release zip and Claude Code plugin.

### Does it see my project code?

No. The README says it reads only downloaded library sources and has no access to your project.

### Is Kotlin & Java Library Sources free?

Yes. Kotlin & Java Library Sources is open source, so you can use and self-host it for free.

### How do I add Kotlin & Java Library Sources to Claude Code?

Run this command in your terminal: claude mcp add kotlin-lib-mcp -- docker run -i --rm ghcr.io/aoreshkov/kotlin-lib-mcp:0.10.1

### What are the best alternatives to Kotlin & Java Library Sources?

The closest alternatives to Kotlin & Java Library Sources are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/kotlin-and-java-library-sources
