kotlin-sdk/samples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] b009352356
chore(deps): bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.10.0 to 1.11.0 in /samples/kotlinlang-mcp-server (#746)
Bumps
[org.jetbrains.kotlinx:kotlinx-serialization-json](https://github.com/Kotlin/kotlinx.serialization)
from 1.10.0 to 1.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Kotlin/kotlinx.serialization/releases">org.jetbrains.kotlinx:kotlinx-serialization-json's
releases</a>.</em></p>
<blockquote>
<h2>1.11.0</h2>
<p>This release is based on Kotlin 2.3.20 and provides a new Json
exceptions API and some bugfixes and improvements.</p>
<h2>Expose Json exceptions structure</h2>
<p>To make working with exceptions easier and providing proper error
codes in e.g., REST APIs,
classes <code>JsonException</code>, <code>JsonDecodingException</code>,
and <code>JsonEncodingException</code> are now public.
They have relevant public properties, such as <code>shortMessage</code>,
<code>path</code>, <code>offset</code>, and others.
This API is currently experimental, and we're going to improve it
further in the subsequent releases.
See the linked issues for the details: <a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/1930">#1930</a>,
<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/1877">#1877</a>.</p>
<h2>Ability to hide user input from exception messages for
security/privacy reasons.</h2>
<p>Historically, exception messages in kotlinx.serialization often
included the input Json itself for debuggability reason.
Such behavior may pose additional challenges for logging, analytics, and
other systems, since
a system is not always allowed to store user data due to
privacy/security reasons, which imposes additional sanitation logic.
To address this issue, a new property
<code>exceptionsWithDebugInfo</code> is added to
<code>JsonConfiguration</code>.
Disable it to hide user input from exception messages.
IMPORTANT: This behavior will be enabled by default when this property
becomes stable.
See <a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2590">#2590</a>
for more details.</p>
<h2>Bugfixes and improvements</h2>
<ul>
<li>CBOR: Relax value range check when decoding numbers (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3167">#3167</a>)</li>
<li>Use a specialized writeDecimalLong method for IO stream integrations
in Json (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3152">#3152</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md">org.jetbrains.kotlinx:kotlinx-serialization-json's
changelog</a>.</em></p>
<blockquote>
<h1>1.11.0 / 2026-04-10</h1>
<p>This release is based on Kotlin 2.3.20 and provides new Json
exceptions API and some bugfixes and improvements.</p>
<h2>Expose Json exceptions structure</h2>
<p>To make working with exceptions easier and providing proper error
codes in e.g., REST APIs,
classes <code>JsonException</code>, <code>JsonDecodingException</code>,
and <code>JsonEncodingException</code> are now public.
They have relevant public properties, such as <code>shortMessage</code>,
<code>path</code>, <code>offset</code>, and others.
This API is currently experimental, and we're going to improve it
further in the subsequent releases.
See the linked issues for the details: <a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/1930">#1930</a>,
<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/1877">#1877</a>.</p>
<h2>Ability to hide user input from exception messages for
security/privacy reasons.</h2>
<p>Historically, exception messages in kotlinx.serialization often
included the input Json itself for debuggability reason.
Such behavior may pose additional challenges for logging, analytics, and
other systems, since
a system is not always allowed to store user data due to
privacy/security reasons, which imposes additional sanitation logic.
To address this issue, a new property
<code>exceptionsWithDebugInfo</code> is added to
<code>JsonConfiguration</code>.
Disable it to hide user input from exception messages.
IMPORTANT: This behavior will be enabled by default when this property
becomes stable.
See <a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2590">#2590</a>
for more details.</p>
<h2>Bugfixes and improvements</h2>
<ul>
<li>CBOR: Relax value range check when decoding numbers (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3167">#3167</a>)</li>
<li>Use a specialized writeDecimalLong method for IO stream integrations
in Json (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3152">#3152</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6956af2e60"><code>6956af2</code></a>
Prepare 1.11 release</li>
<li><a
href="390d84c68a"><code>390d84c</code></a>
Merge remote-tracking branch 'origin/master' into dev</li>
<li><a
href="431fe2dc0a"><code>431fe2d</code></a>
Use local repo for publishing (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3171">#3171</a>)</li>
<li><a
href="05c12b60a6"><code>05c12b6</code></a>
Add usage attribute to &quot;testRepositories&quot; configuration</li>
<li><a
href="a4e1f082ef"><code>a4e1f08</code></a>
Bump Kover version to 0.9.8 release (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3174">#3174</a>)</li>
<li><a
href="304e858ccc"><code>304e858</code></a>
Expose Json exceptions structure (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3145">#3145</a>)</li>
<li><a
href="4a0338ef50"><code>4a0338e</code></a>
Included G Play SDK verification file for core-jvm (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3169">#3169</a>)</li>
<li><a
href="421f64c74f"><code>421f64c</code></a>
CBOR: Relax value range check when decoding numbers (<a
href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/3167">#3167</a>)</li>
<li><a
href="85a4f126ec"><code>85a4f12</code></a>
KT-84955: mark apple x64 tagets as deprecated error</li>
<li><a
href="bd38b0e49b"><code>bd38b0e</code></a>
Remove dead code</li>
<li>Additional commits viewable in <a
href="https://github.com/Kotlin/kotlinx.serialization/compare/v1.10.0...v1.11.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-05 15:04:13 +02:00
..
kotlin-mcp-client chore(deps): bump io.modelcontextprotocol:kotlin-sdk-client from 0.11.1 to 0.12.0 in /samples/kotlin-mcp-client (#743) 2026-05-05 11:53:25 +02:00
kotlin-mcp-server chore(deps): bump mcp-kotlin from 0.11.1 to 0.12.0 in /samples/kotlin-mcp-server (#744) 2026-05-05 10:13:00 +00:00
kotlinlang-mcp-server chore(deps): bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.10.0 to 1.11.0 in /samples/kotlinlang-mcp-server (#746) 2026-05-05 15:04:13 +02:00
notebooks samples: update mcp-kotlin to 0.10.0 across sample projects (#645) 2026-03-30 23:47:31 +03:00
simple-streamable-server chore(deps): bump kotlin from 2.2.21 to 2.3.21 in /samples/simple-streamable-server (#725) 2026-04-27 15:31:26 +00:00
weather-stdio-server chore(deps): bump mcp-kotlin from 0.11.1 to 0.12.0 in /samples/weather-stdio-server (#750) 2026-05-05 10:27:26 +00:00
README.md sample: kotlinlang mcp server (#713) 2026-04-27 15:07:03 +02: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
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 →