# Kotlin & Java Library Sources

This MCP server gives agents parsed Kotlin and Java library sources, API details, and KDoc from Maven. Use it to inspect dependencies or trace library behavior.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: aoreshkov
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/aoreshkov/kotlin-lib-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/kotlin-java-library-sources

## What it does

The server fetches a Maven library when asked and analyzes its sources with Kotlin Analysis API in standalone K2/FIR mode. An agent can inspect public declarations, resolved signatures, KDoc, dependency metadata, raw source, and source search.

Its tools cover package and declaration browsing, version and API comparisons, dependency lookup, and library retrieval. Cached data is keyed by `group/artifact/version`, while Kotlin Multiplatform source variants are resolved through Gradle `.module` metadata. Missing transitive dependencies trigger a best-effort fallback for signature analysis.

The installation command below requires Docker. The server can connect to Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and the other listed MCP clients.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add kotlin-java-library-sources -- docker run -i --rm ghcr.io/aoreshkov/kotlin-lib-mcp:0.9.0
```

### Codex

**Platform CLI**
```bash
codex mcp add kotlin-java-library-sources -- docker run -i --rm ghcr.io/aoreshkov/kotlin-lib-mcp:0.9.0
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "kotlin-java-library-sources": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/aoreshkov/kotlin-lib-mcp:0.9.0"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "kotlin-java-library-sources": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/aoreshkov/kotlin-lib-mcp:0.9.0"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add kotlin-java-library-sources docker run -i --rm ghcr.io/aoreshkov/kotlin-lib-mcp:0.9.0
```

## When to use it
- inspect a Kotlin class signature
- read KDoc for a library declaration
- trace an implementation in published sources
- compare APIs across library versions
- check Maven artifact dependencies

## Example prompts
- Show the public API for `io.ktor:ktor-client-core:3.5.1`.
- Find the declaration for this class and explain its KDoc.
- Compare two versions of this Maven library and list the API changes.

## Similar
- [intellij-java-kotlin](https://affpapa.org/en/nevibecode/rules/intellij-java-kotlin.md) — rule · ★ 40451
- [kotlin-tooling-java-to-kotlin](https://affpapa.org/en/nevibecode/skills/kotlin-tooling-java-to-kotlin.md) — skill · 2000 installs
- [release-kotlin-library](https://affpapa.org/en/nevibecode/skills/release-kotlin-library.md) — skill · 340 installs
- [java-migration](https://affpapa.org/en/nevibecode/skills/java-migration.md) — skill · 321 installs
- [114-java-maven-search](https://affpapa.org/en/nevibecode/skills/114-java-maven-search.md) — skill · 315 installs
- [java-mcp-server-generator](https://affpapa.org/en/nevibecode/skills/java-mcp-server-generator.md) — skill · 8800 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
