| Filename | Latest commit message | Latest commit date |
|---|---|---|
Bumps `mcp-kotlin` from 0.8.1 to 0.9.0. Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.8.1 to 0.9.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.9.0</h2> <h2>What's Changed</h2> <h3>Breaking Changes</h3> <ul> <li><strong>Server call handlers now receive a <code>RequestContext</code></strong> — handler lambdas for tools, prompts, and resources have a new <code>context</code> parameter providing access to request metadata (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/515">#515</a>) by <a href="https://github.com/rnett"><code>@rnett</code></a></li> <li><strong>Ktor extension functions moved from <code>Routing</code> to <code>Route</code></strong> — update call sites: <code>routing { mcpSse() }</code> → <code>route("/mcp") { mcpSse() }</code> or use directly in any <code>Route</code> block (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/531">#531</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> <li><strong><code>StdioServerTransport</code> rethrows <code>CancellationException</code></strong> — cancellation is no longer silently swallowed; <code>ReadBuffer</code> parsing was also fixed (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/571">#571</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> </ul> <h3>New Features</h3> <ul> <li><strong><code>kotlin-sdk-testing</code> module</strong> — new artifact providing an in-process, channel-based <code>TestClientTransport</code> / <code>TestServerTransport</code> for unit testing MCP servers and clients without network I/O (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/505">#505</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> <li><strong><code>StreamableHttpServerTransport.Configuration</code></strong> — configurable builder for the Streamable HTTP server transport (timeouts, session handling, etc.) (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/560">#560</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> <li><strong>Ktor extensions for Streamable HTTP</strong> — <code>mcpStreamableHttp()</code> Ktor plugin and routing DSL for mounting a Streamable HTTP MCP server (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/504">#504</a> by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/568">#568</a> by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a>)</li> <li><strong><code>$defs</code> support in <code>ToolSchema</code></strong> — JSON Schema <code>$defs</code> / definitions can now be expressed in tool input schemas (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/526">#526</a>) by <a href="https://github.com/i1bro"><code>@i1bro</code></a></li> </ul> <h3>Bug Fixes</h3> <ul> <li>Fixed SSE transport endpoint resolution for non-root mount paths (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/565">#565</a>) by <a href="https://github.com/Amaneusz"><code>@Amaneusz</code></a></li> <li>Fixed <code>StdioClientTransport</code> hanging indefinitely by adding proper read timeouts (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/528">#528</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> </ul> <h3>Improvements</h3> <ul> <li>Introduced <code>AbstractClientTransport</code> base class, simplifying client transport lifecycle management (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/516">#516</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> <li>Deprecation cycle started — annotated APIs scheduled for removal in a future release (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/498">#498</a>) by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a></li> <li>Detekt static analysis integrated into CI (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/493">#493</a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/507">#507</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> <li>Code coverage reporting added via Codecov (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/579">#579</a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/580">#580</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> <li>Flaky <code>StdioClientTransport</code> tests replaced with real stdin pipe–based tests (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/508">#508</a>) by <a href="https://github.com/kpavlov"><code>@kpavlov</code></a></li> </ul> <h3>Dependency Updates</h3> <ul> <li>Kotest 6.1.2, MockK 1.14.9, AtomicFU 0.31.0, Gradle 9.3.1, Kover 0.9.7</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/jskjw157"><code>@jskjw157</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/486">modelcontextprotocol/kotlin-sdk#486</a></li> <li><a href="https://github.com/i1bro"><code>@i1bro</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/526">modelcontextprotocol/kotlin-sdk#526</a></li> <li><a href="https://github.com/localden"><code>@localden</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/536">modelcontextprotocol/kotlin-sdk#536</a></li> <li><a href="https://github.com/aozherelyeva"><code>@aozherelyeva</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/551">modelcontextprotocol/kotlin-sdk#551</a></li> <li><a href="https://github.com/rnett"><code>@rnett</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/515">modelcontextprotocol/kotlin-sdk#515</a></li> <li><a href="https://github.com/Amaneusz"><code>@Amaneusz</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/565">modelcontextprotocol/kotlin-sdk#565</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.8.4...0.9.0">https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.8.4...0.9.0</a></p> <h2>0.8.4</h2> <h2>Changes</h2> <ul> <li>feat: Ktor extensions for streamable http (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/504">#504</a>) by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a></li> <li>fix: Add $defs to ToolSchema and tests (<a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/526">#526</a>) by <a href="https://github.com/i1bro"><code>@i1bro</code></a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
| .. | ||
| kotlin-mcp-client | ||
| kotlin-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 |
| 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 →
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 →