kotlin-sdk/samples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] 7ed57f9fc7
chore(deps): bump mcp-kotlin from 0.9.0 to 0.10.0 in /samples/weather-stdio-server (#654)
Bumps `mcp-kotlin` from 0.9.0 to 0.10.0.
Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.9.0 to 0.10.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.10.0</h2>
<h2>Highlights</h2>
<p>This release adds MCP conformance testing infrastructure, SSE
reconnection support, Tasks protocol types, resource template matching,
and<br />
tool execution properties. It also completes a deprecation cycle —
removing all previously deprecated (error-level) symbols from
<code>io.modelcontextprotocol.kotlin.sdk</code> in favor of their
replacements in
<code>io.modelcontextprotocol.kotlin.sdk.types</code>.</p>
<h2>Breaking Changes</h2>
<ul>
<li><strong>Deprecation cycle completed</strong> — All symbols
deprecated at <code>ERROR</code> level in 0.9.0 have been removed by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/615">#615</a>).
This includes<br />
the entire <code>io.modelcontextprotocol.kotlin.sdk.types.kt</code>
compatibility file (type aliases such as <code>CallToolResult</code>,
<code>CancelledNotification</code>,
<code>ClientCapabilities</code>, <code>CompleteRequest</code>, etc.) and
the legacy <code>McpJson</code> in
<code>io.modelcontextprotocol.kotlin.sdk</code>. Migrate to the
equivalents
in <code>io.modelcontextprotocol.kotlin.sdk.types</code>.</li>
<li><strong>SSE/Streamable HTTP transport changes</strong> —
<code>StreamableHttpClientTransport</code> now accepts
<code>ReconnectionOptions</code> for configurable retry
behavior by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/585">#585</a>,
<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/596">#596</a>).
The previous constructor signatures remain available.</li>
</ul>
<h2>Features</h2>
<ul>
<li><strong>MCP conformance test infrastructure</strong> — Comprehensive
conformance test suite covering core protocol operations, tool calls,
elicitation,
resources, prompts, and 20 OAuth/auth scenarios. Includes CI workflow,
baseline tracking, and shell runner by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/585">#585</a>)</li>
<li><strong>SSE reconnection with retry support</strong> — Client
transports now support configurable reconnection with exponential
backoff via<br />
<code>ReconnectionOptions</code> (initial delay, max delay, multiplier,
max retries) by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/596">#596</a>)</li>
<li><strong>Tasks protocol types</strong> — Added <code>Task</code>,
<code>TaskStatus</code>, and related models per the MCP tasks
specification by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/566">#566</a>)</li>
<li><strong>Resource templates with basic template matcher</strong> —
Server-side support for URI template-based resource matching by <a
href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/502">#502</a>,
<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/606">#606</a>)</li>
<li><strong>Tool execution properties</strong> — <code>Tool</code> now
exposes execution properties for richer tool metadata by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/567">#567</a>)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li><strong>Notifications not delivered over Streamable HTTP</strong> —
Fixed server-side notification delivery for Streamable HTTP transport
sessions by
<a href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/587">#587</a>,
<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/599">#599</a>)</li>
<li><strong>Conformance: SEP-1330 enum schemas</strong> — Corrected
elicitation enum schemas in conformance tests by <a
href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/600">#600</a>)</li>
</ul>
<h2>Documentation</h2>
<ul>
<li>New Streamable HTTP server sample by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/595">#595</a>)</li>
<li>Updated client and server samples by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/598">#598</a>)</li>
<li>Added Context7 config file by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/605">#605</a>)</li>
<li>Updated AGENTS.md by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/612">#612</a>)</li>
<li>Added missing KDoc for public API members by <a
href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/621">#621</a>)</li>
</ul>
<h2>Maintenance</h2>
<ul>
<li>Simplified and cleaned up CI workflows by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/617">#617</a>)</li>
<li>Modernized TypeScript integration tests, renamed SSE references to
HTTP by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/618">#618</a>)</li>
<li>Bumped Gradle wrapper from 9.3.1 to 9.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/614">#614</a>)</li>
<li>Fix Kotlin language and api version to 2.1 by <a
href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/620">#620</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.9.0...0.10.0">https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.9.0...0.10.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5ad049240b"><code>5ad0492</code></a>
chore: bump project version to 0.10.0 in gradle.properties</li>
<li><a
href="bd4cf0c948"><code>bd4cf0c</code></a>
docs: add missing KDoc comments for public functions, properties, and
classes...</li>
<li><a
href="c77ebe0c00"><code>c77ebe0</code></a>
refactor(core): Fix Kotlin language and api version to 2.1 in build
config (#...</li>
<li><a
href="cd91eed35d"><code>cd91eed</code></a>
chore: simplify and clean up CI workflows (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/617">#617</a>)</li>
<li><a
href="435698a611"><code>435698a</code></a>
refactor(integration-test): modernize ts tests, update versions, rename
SSE -...</li>
<li><a
href="558399039c"><code>5583990</code></a>
chore: deprecation cycle (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/615">#615</a>)</li>
<li><a
href="55afb63c27"><code>55afb63</code></a>
chore(deps): bump gradle-wrapper from 9.3.1 to 9.4.1 (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/614">#614</a>)</li>
<li><a
href="fd3a8583b8"><code>fd3a858</code></a>
feat: add tasks models (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/566">#566</a>)</li>
<li><a
href="62e4e50c67"><code>62e4e50</code></a>
docs: update AGENTS.md (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/612">#612</a>)</li>
<li><a
href="ee6561c185"><code>ee6561c</code></a>
feat: <a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/502">#502</a>
resource templates with basic template matcher (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/606">#606</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.9.0...0.10.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `io.modelcontextprotocol:kotlin-sdk-server` from 0.9.0 to 0.10.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/modelcontextprotocol/kotlin-sdk/releases">io.modelcontextprotocol:kotlin-sdk-server's
releases</a>.</em></p>
<blockquote>
<h2>0.10.0</h2>
<h2>Highlights</h2>
<p>This release adds MCP conformance testing infrastructure, SSE
reconnection support, Tasks protocol types, resource template matching,
and<br />
tool execution properties. It also completes a deprecation cycle —
removing all previously deprecated (error-level) symbols from
<code>io.modelcontextprotocol.kotlin.sdk</code> in favor of their
replacements in
<code>io.modelcontextprotocol.kotlin.sdk.types</code>.</p>
<h2>Breaking Changes</h2>
<ul>
<li><strong>Deprecation cycle completed</strong> — All symbols
deprecated at <code>ERROR</code> level in 0.9.0 have been removed by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/615">#615</a>).
This includes<br />
the entire <code>io.modelcontextprotocol.kotlin.sdk.types.kt</code>
compatibility file (type aliases such as <code>CallToolResult</code>,
<code>CancelledNotification</code>,
<code>ClientCapabilities</code>, <code>CompleteRequest</code>, etc.) and
the legacy <code>McpJson</code> in
<code>io.modelcontextprotocol.kotlin.sdk</code>. Migrate to the
equivalents
in <code>io.modelcontextprotocol.kotlin.sdk.types</code>.</li>
<li><strong>SSE/Streamable HTTP transport changes</strong> —
<code>StreamableHttpClientTransport</code> now accepts
<code>ReconnectionOptions</code> for configurable retry
behavior by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/585">#585</a>,
<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/596">#596</a>).
The previous constructor signatures remain available.</li>
</ul>
<h2>Features</h2>
<ul>
<li><strong>MCP conformance test infrastructure</strong> — Comprehensive
conformance test suite covering core protocol operations, tool calls,
elicitation,
resources, prompts, and 20 OAuth/auth scenarios. Includes CI workflow,
baseline tracking, and shell runner by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/585">#585</a>)</li>
<li><strong>SSE reconnection with retry support</strong> — Client
transports now support configurable reconnection with exponential
backoff via<br />
<code>ReconnectionOptions</code> (initial delay, max delay, multiplier,
max retries) by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/596">#596</a>)</li>
<li><strong>Tasks protocol types</strong> — Added <code>Task</code>,
<code>TaskStatus</code>, and related models per the MCP tasks
specification by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/566">#566</a>)</li>
<li><strong>Resource templates with basic template matcher</strong> —
Server-side support for URI template-based resource matching by <a
href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/502">#502</a>,
<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/606">#606</a>)</li>
<li><strong>Tool execution properties</strong> — <code>Tool</code> now
exposes execution properties for richer tool metadata by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/567">#567</a>)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li><strong>Notifications not delivered over Streamable HTTP</strong> —
Fixed server-side notification delivery for Streamable HTTP transport
sessions by
<a href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/587">#587</a>,
<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/599">#599</a>)</li>
<li><strong>Conformance: SEP-1330 enum schemas</strong> — Corrected
elicitation enum schemas in conformance tests by <a
href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/600">#600</a>)</li>
</ul>
<h2>Documentation</h2>
<ul>
<li>New Streamable HTTP server sample by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/595">#595</a>)</li>
<li>Updated client and server samples by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/598">#598</a>)</li>
<li>Added Context7 config file by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/605">#605</a>)</li>
<li>Updated AGENTS.md by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/612">#612</a>)</li>
<li>Added missing KDoc for public API members by <a
href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/621">#621</a>)</li>
</ul>
<h2>Maintenance</h2>
<ul>
<li>Simplified and cleaned up CI workflows by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/617">#617</a>)</li>
<li>Modernized TypeScript integration tests, renamed SSE references to
HTTP by <a
href="https://github.com/devcrocod"><code>@​devcrocod</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/618">#618</a>)</li>
<li>Bumped Gradle wrapper from 9.3.1 to 9.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/614">#614</a>)</li>
<li>Fix Kotlin language and api version to 2.1 by <a
href="https://github.com/kpavlov"><code>@​kpavlov</code></a> (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/620">#620</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.9.0...0.10.0">https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.9.0...0.10.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5ad049240b"><code>5ad0492</code></a>
chore: bump project version to 0.10.0 in gradle.properties</li>
<li><a
href="bd4cf0c948"><code>bd4cf0c</code></a>
docs: add missing KDoc comments for public functions, properties, and
classes...</li>
<li><a
href="c77ebe0c00"><code>c77ebe0</code></a>
refactor(core): Fix Kotlin language and api version to 2.1 in build
config (#...</li>
<li><a
href="cd91eed35d"><code>cd91eed</code></a>
chore: simplify and clean up CI workflows (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/617">#617</a>)</li>
<li><a
href="435698a611"><code>435698a</code></a>
refactor(integration-test): modernize ts tests, update versions, rename
SSE -...</li>
<li><a
href="558399039c"><code>5583990</code></a>
chore: deprecation cycle (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/615">#615</a>)</li>
<li><a
href="55afb63c27"><code>55afb63</code></a>
chore(deps): bump gradle-wrapper from 9.3.1 to 9.4.1 (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/614">#614</a>)</li>
<li><a
href="fd3a8583b8"><code>fd3a858</code></a>
feat: add tasks models (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/566">#566</a>)</li>
<li><a
href="62e4e50c67"><code>62e4e50</code></a>
docs: update AGENTS.md (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/612">#612</a>)</li>
<li><a
href="ee6561c185"><code>ee6561c</code></a>
feat: <a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/502">#502</a>
resource templates with basic template matcher (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/606">#606</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.9.0...0.10.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 13:18:06 +03:00
..
kotlin-mcp-client chore(deps): bump the other-dependencies group across 4 directories with 4 updates (#634) 2026-03-27 00:58:15 +00:00
kotlin-mcp-server chore(deps): bump mcp-kotlin from 0.8.1 to 0.9.0 in /samples/kotlin-mcp-server (#638) 2026-03-27 05:59:26 +00:00
notebooks docs: streamable server sample (#595) 2026-03-10 12:45:21 +01:00
simple-streamable-server chore(deps): bump the other-dependencies group across 4 directories with 4 updates (#634) 2026-03-27 00:58:15 +00:00
weather-stdio-server chore(deps): bump mcp-kotlin from 0.9.0 to 0.10.0 in /samples/weather-stdio-server (#654) 2026-03-30 13:18:06 +03:00
README.md docs: streamable server sample (#595) 2026-03-10 12:45:21 +01:00

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 →