| Filename | Latest commit message | Latest commit date |
|---|---|---|
Bumps `mcp-kotlin` from 0.11.1 to 0.12.0. Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.11.1 to 0.12.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/modelcontextprotocol/kotlin-sdk/releases">io.modelcontextprotocol:kotlin-sdk-client's releases</a>.</em></p> <blockquote> <h2>0.12.0</h2> <h2>Description</h2> <p>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 <code>CancellationException</code>.</p> <h3>Breaking Changes</h3> <p><strong>Sampling messages can carry tool calls and results (SEP-1577)</strong> by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/718">#718</a></p> <p><code>SamplingMessage.content</code> is now typed as a new <code>SamplingMessageContent</code> supertype, with <code>MediaContent</code> (text/image/audio), <code>ToolUseContent</code>, and <code>ToolResultContent</code> as variants. <code>MediaContent</code> still exists and now extends <code>SamplingMessageContent</code>, so most source code that constructs sampling messages compiles unchanged — but the binary signatures of <code>SamplingMessage</code>, <code>CreateMessageResult</code>, and related types have changed. <code>ClientCapabilities.sampling</code> is also now a typed <code>Sampling</code> object instead of a raw <code>JsonObject</code>. Recompilation is required; consumers reading <code>sampling</code> as <code>JsonObject</code> must migrate to the typed accessors.</p> <p><strong><code>watchosX64</code> and <code>tvosX64</code> Kotlin/Native targets removed</strong> by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/727">#727</a></p> <p>These targets have been deprecated upstream. Migrate to the corresponding ARM/simulator targets (<code>watchosArm64</code>, <code>watchosSimulatorArm64</code>, <code>tvosArm64</code>, <code>tvosSimulatorArm64</code>).</p> <h3>Features</h3> <ul> <li>Add <code>$schema</code> field to <code>ToolSchema</code>, declaring JSON Schema 2020-12 as the default dialect (SEP-1613) by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/696">#696</a></li> <li>Validate tool names at registration time on the server, following the MCP tool naming standard (SEP-986) by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/695">#695</a></li> <li>Add <code>extensions</code> field to <code>ClientCapabilities</code> and <code>ServerCapabilities</code> for advertising supported MCP extensions during the initialize handshake by <a href="https://github.com/eritscher"><code>@eritscher</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/678">#678</a></li> </ul> <h3>Fixed</h3> <ul> <li>Validate the <code>mcp-protocol-version</code> HTTP header on initialization requests and correct <code>DEFAULT_NEGOTIATED_PROTOCOL_VERSION</code> to match the spec by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/697">#697</a></li> <li>Propagate <code>CancellationException</code> instead of logging it as an error by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/706">#706</a></li> <li>Evict stale GET SSE stream mapping on reconnect so a new GET on the same session is no longer silently rejected by the leftover entry from the previous stream by <a href="https://github.com/amr"><code>@amr</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/716">#716</a></li> </ul> <h3>Maintenance</h3> <ul> <li>Add <code>kotlinlang</code> MCP server sample with <code>search</code> and <code>get_page</code> tools by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/713">#713</a></li> <li>Migrate detekt to a <code>buildSrc</code> convention plugin with a fully explicit, version-locked YAML config by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/729">#729</a></li> <li>Add Streamable HTTP integration tests for pagination, bad-request handling, and logging by <a href="https://github.com/jskjw157"><code>@jskjw157</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/613">#613</a></li> <li>Remove unused OpenAPI Generator plugin and configuration by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/683">#683</a></li> <li>Remove Codecov configuration in favor of kover by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/691">#691</a></li> <li>Remove redundant JUnit XML report configuration by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/728">#728</a></li> <li>Remove IDEA files tied to the incompatible detekt IDE plugin by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/714">#714</a></li> <li>Add Node.js setup to the release workflow so TypeScript integration tests run on macOS runners by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/684">#684</a></li> </ul> <h3>Dependencies</h3> <ul> <li>Kotlin to v2.3.21 in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/704">#704</a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/723">#723</a></li> <li>kotlinx.serialization-json to v1.11.0 in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/687">#687</a></li> </ul> <h3>New Contributors</h3> <ul> <li><a href="https://github.com/eritscher"><code>@eritscher</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/678">#678</a></li> <li><a href="https://github.com/amr"><code>@amr</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/716">#716</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.11.1...0.12.0">https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.11.1...0.12.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
| .. | ||
| kotlin-mcp-client | ||
| kotlin-mcp-server | ||
| kotlinlang-mcp-server | ||
| notebooks | ||
| simple-streamable-server | ||
| weather-stdio-server | ||
| README.md | ||
Kotlin MCP SDK Samples
Runnable projects demonstrating MCP server and client implementations with the Kotlin MCP SDK. For background on the protocol itself, see the MCP documentation.
Overview
| Sample | Type | Transport | MCP Features |
|---|---|---|---|
| simple-streamable-server | Server | Streamable HTTP | Tools, Resources, Prompts, Logging |
| kotlinlang-mcp-server | Server | Streamable HTTP | Tools |
| kotlin-mcp-server | Server | STDIO, SSE | Tools, Resources, Prompts |
| weather-stdio-server | Server | STDIO | Tools |
| kotlin-mcp-client | Client | STDIO | Tool discovery & invocation |
| notebooks | Client (Notebook) | Streamable HTTP | Tool discovery & invocation |
Getting Started
- Building a server? Start with simple-streamable-server — it uses the recommended Streamable HTTP transport and covers tools, resources, prompts, and logging.
- Building a client? Open the notebooks sample for a step-by-step walkthrough, or see kotlin-mcp-client for a full CLI client with Anthropic API integration.
Samples
Simple Streamable HTTP Server
A minimal Streamable HTTP server with optional Bearer token authentication. Demonstrates tools
(greet, multi-greet), a prompt template, a resource, and server-to-client logging notifications.
Read more →
Kotlinlang MCP Server
A Streamable HTTP server that exposes the official Kotlin documentation (kotlinlang.org) to LLM clients — full-text search via Algolia and page retrieval in markdown. Demonstrates wrapping a real external API in an MCP server with in-memory caching. Read more →
Kotlin MCP Server
A multi-transport server supporting STDIO, SSE (plain), and SSE (Ktor plugin). Useful for exploring different transport modes side by side. Read more →
Weather STDIO Server
A focused STDIO server that exposes weather forecast and alert tools backed by the weather.gov API. Includes Claude Desktop integration instructions. Read more →
Kotlin MCP Client
An interactive CLI client that connects to any MCP server over STDIO and routes queries through Anthropic's Claude API, bridging MCP tools with LLM conversations. Read more →
MCP Client Notebook
A Kotlin notebook that connects to a remote MCP server via Streamable HTTP and demonstrates ping, tool listing, and tool invocation — all in an interactive cell-by-cell format. Read more →