# kotlin-sdk

> The official Kotlin SDK for Model Context Protocol servers and clients. Maintained in collaboration with JetBrains

- **URL**: https://www.freshcrate.ai/projects/kotlin-sdk
- **Author**: modelcontextprotocol
- **Category**: MCP Servers
- **Latest version**: `0.13.0` (2026-06-02)
- **License**: NOASSERTION
- **Source**: https://github.com/modelcontextprotocol/kotlin-sdk
- **Homepage**: https://modelcontextprotocol.github.io/kotlin-sdk/
- **Language**: Kotlin
- **GitHub**: 1,341 stars, 206 forks
- **Registry**: github
- **Tags**: `kotlin`, `kotlin-multiplatform`, `mcp`

## Description

The official Kotlin SDK for Model Context Protocol servers and clients. Maintained in collaboration with JetBrains

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `0.13.0` | 2026-06-02 | High | ## Description  Adds a `tasks` capability and a typed `elicitation` capability, hardens transport lifecycle, dispatchers, and back-pressure, and enables DNS rebinding protection by default.  ### Breaking Changes  **Typed `elicitation` capability and new `tasks` capability** by @devcrocod in [#732](https://github.com/modelcontextprotocol/kotlin-sdk/pull/732)  `ClientCapabilities.elicitation` is now a typed `ClientCapabilities.Elicitation` (`form`, `url`) instead of a raw `JsonObject?`, an |
| `0.12.0` | 2026-04-29 | High | ## Description  Adds sampling-with-tools per SEP-1577, JSON Schema dialect declaration on tool schemas, server-side tool name validation, and capability extensions; fixes SSE reconnect on the same session and stops swallowing `CancellationException`.  ### Breaking Changes  **Sampling messages can carry tool calls and results (SEP-1577)** by @devcrocod in [#718](https://github.com/modelcontextprotocol/kotlin-sdk/pull/718)  `SamplingMessage.content` is now typed as a new `SamplingMessageCo |
| `0.11.1` | 2026-04-10 | High | ### Description  Fixes an SSE stream crash on Netty when clients connect to the Streamable HTTP GET endpoint.  ### Fixed  - Fixed GET SSE stream crash on Netty in Streamable HTTP where `appendSseHeaders()` was called after response headers were already committed, causing `UnsupportedOperationException` and client retry loops by @devcrocod in [#681](https://github.com/modelcontextprotocol/kotlin-sdk/pull/681)  ### Dependencies  - mcp-kotlin to v0.11.0 in [#672](https://github.com/modelc |
| `0.11.0` | 2026-04-02 | High | Adds URL-mode elicitation with typed schema definitions, configurable server payload size limits, and upgrades core dependencies to Kotlin 2.3.  ## Breaking Changes  **`ElicitRequestParams` is now a sealed interface** by @devcrocod in [#660](https://github.com/modelcontextprotocol/kotlin-sdk/pull/660)  Restructured to support both form-based and URL-based elicitation modes per the MCP specification. `ElicitRequestParams` changed from a `data class` to a `sealed interface` with two variants |
| `0.10.0` | 2026-03-26 | Medium | ## Highlights    This release adds MCP conformance testing infrastructure, SSE reconnection support, Tasks protocol types, resource template matching, and      tool execution properties. It also completes a deprecation cycle — removing all previously deprecated (error-level) symbols from   `io.modelcontextprotocol.kotlin.sdk` in favor of their replacements in `io.modelcontextprotocol.kotlin.sdk.types`.                                                        ## Breaking Changes    - **Depr |
| `0.9.0` | 2026-03-05 | Low | ## What's Changed  ### Breaking Changes    - **Server call handlers now receive a `RequestContext`** — handler lambdas for tools, prompts, and resources have a new `context` parameter providing access to request metadata (#515) by @rnett   - **Ktor extension functions moved from `Routing` to `Route`** — update call sites: `routing { mcpSse() }` → `route("/mcp") { mcpSse() }` or use directly in any `Route` block (#531) by @kpavlov   - **`StdioServerTransport` rethrows `CancellationException |
| `0.8.4` | 2026-02-17 | Low | ## Changes  - feat: Ktor extensions for streamable http (#504) by @devcrocod  - fix: Add $defs to ToolSchema and tests (#526) by @i1bro  **Full Changelog**: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.8.3...0.8.4 |
| `0.8.3` | 2026-01-21 | Low | # What's Changed  ## Bugfixes  - **breaking change!:** `StdioClientTransport.send(...)` and `StreamableHttpClientTransport.send(...)` now throw `McpException` when not ready (#487) by @kpavlov  - #450 Properly check content type (#451) by @nerzhulart - Fix flaky StdioClientTransportErrorHandlingTest (#457) by @kpavlov - Fix tests for notifications (#446) by @tiginamaria  - Fix kotlin-mcp-server sample (#459) by @devcrocod - Fix GitHub Actions build workflow (#474) by @kpavlov - Fix con |
| `0.8.1` | 2025-12-04 | Low | ## What's Changed  - fix(stdio-client): Monitor STDERR and refactor `StdioClientTransport` to use flows. Fixes #107 by @kpavlov  - fix(sse-client): Skip SSE in StreamableHttpClientTransport when data is empty (#433) by @kpavlov  - Server feature list changed and resource updated notifications (#441) by @tiginamaria - Add MCP conformance test coverage  (#435) by @skarpovdev   ### Chores - Update samples to use new schema (#443) by @kpavlov  - Bump org.jetbrains.kotlinx:kotlinx-io-core fr |
| `0.8.0` | 2025-11-20 | Low | ## 🚨 Breaking changes  #### MCP schema types refactor (#386)  The MCP schema implementation has been updated to the latest MCP spec and reorganized into dedicated packages: - All MCP types moved to `io.modelcontextprotocol.kotlin.sdk.types` package - Many schema types have new fields and updated constructor signatures - Request/response types now use nested `params` objects  **Migration:**  ```kotlin // Before: import io.modelcontextprotocol.kotlin.sdk.InitializeRequest import io. |

## Citation

- HTML: https://www.freshcrate.ai/projects/kotlin-sdk
- Markdown: https://www.freshcrate.ai/projects/kotlin-sdk.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/kotlin-sdk/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
