kotlin-sdk/samples/kotlinlang-mcp-server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] b20eec587b
chore(deps): bump mcp-kotlin from 0.11.1 to 0.12.0 in /samples/kotlinlang-mcp-server (#745)
Bumps `mcp-kotlin` from 0.11.1 to 0.12.0.
Updates `io.modelcontextprotocol:kotlin-sdk-server` 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-server'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="c339d8cb86"><code>c339d8c</code></a>
release: bump version to 0.12.0 (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/731">#731</a>)</li>
<li><a
href="64804a05c2"><code>64804a0</code></a>
refactor: explicit locked detekt config (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/729">#729</a>)</li>
<li><a
href="a238fc0a2e"><code>a238fc0</code></a>
fix(server): evict stale GET SSE stream mapping on reconnect (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/716">#716</a>)</li>
<li><a
href="66d9efb599"><code>66d9efb</code></a>
test(streamable-http): add missing integration tests for pagination, bad
requ...</li>
<li><a
href="f434fcaff1"><code>f434fca</code></a>
feat!: SEP-1577 sampling with tools (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/718">#718</a>)</li>
<li><a
href="7474a33c56"><code>7474a33</code></a>
chore: drop deprecated watchosX64 and tvosX64 targets (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/727">#727</a>)</li>
<li><a
href="12ace760cb"><code>12ace76</code></a>
chore: remove redundant JUnit XML report configuration (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/728">#728</a>)</li>
<li><a
href="ec606dbc24"><code>ec606db</code></a>
chore(deps): bump kotlin from 2.2.21 to 2.3.21 in
/samples/weather-stdio-serv...</li>
<li><a
href="1d9304264e"><code>1d93042</code></a>
chore(deps): bump kotlin from 2.2.21 to 2.3.21 in
/samples/kotlin-mcp-server ...</li>
<li><a
href="9817b174f9"><code>9817b17</code></a>
chore(deps): bump org.jetbrains.kotlin.jvm from 2.2.21 to 2.3.21 in
/samples/...</li>
<li>Additional commits viewable in <a
href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.11.1...0.12.0">compare
view</a></li>
</ul>
</details>
<br />

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="c339d8cb86"><code>c339d8c</code></a>
release: bump version to 0.12.0 (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/731">#731</a>)</li>
<li><a
href="64804a05c2"><code>64804a0</code></a>
refactor: explicit locked detekt config (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/729">#729</a>)</li>
<li><a
href="a238fc0a2e"><code>a238fc0</code></a>
fix(server): evict stale GET SSE stream mapping on reconnect (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/716">#716</a>)</li>
<li><a
href="66d9efb599"><code>66d9efb</code></a>
test(streamable-http): add missing integration tests for pagination, bad
requ...</li>
<li><a
href="f434fcaff1"><code>f434fca</code></a>
feat!: SEP-1577 sampling with tools (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/718">#718</a>)</li>
<li><a
href="7474a33c56"><code>7474a33</code></a>
chore: drop deprecated watchosX64 and tvosX64 targets (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/727">#727</a>)</li>
<li><a
href="12ace760cb"><code>12ace76</code></a>
chore: remove redundant JUnit XML report configuration (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/728">#728</a>)</li>
<li><a
href="ec606dbc24"><code>ec606db</code></a>
chore(deps): bump kotlin from 2.2.21 to 2.3.21 in
/samples/weather-stdio-serv...</li>
<li><a
href="1d9304264e"><code>1d93042</code></a>
chore(deps): bump kotlin from 2.2.21 to 2.3.21 in
/samples/kotlin-mcp-server ...</li>
<li><a
href="9817b174f9"><code>9817b17</code></a>
chore(deps): bump org.jetbrains.kotlin.jvm from 2.2.21 to 2.3.21 in
/samples/...</li>
<li>Additional commits viewable in <a
href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.11.1...0.12.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `io.modelcontextprotocol:kotlin-sdk-testing` 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-testing'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="c339d8cb86"><code>c339d8c</code></a>
release: bump version to 0.12.0 (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/731">#731</a>)</li>
<li><a
href="64804a05c2"><code>64804a0</code></a>
refactor: explicit locked detekt config (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/729">#729</a>)</li>
<li><a
href="a238fc0a2e"><code>a238fc0</code></a>
fix(server): evict stale GET SSE stream mapping on reconnect (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/716">#716</a>)</li>
<li><a
href="66d9efb599"><code>66d9efb</code></a>
test(streamable-http): add missing integration tests for pagination, bad
requ...</li>
<li><a
href="f434fcaff1"><code>f434fca</code></a>
feat!: SEP-1577 sampling with tools (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/718">#718</a>)</li>
<li><a
href="7474a33c56"><code>7474a33</code></a>
chore: drop deprecated watchosX64 and tvosX64 targets (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/727">#727</a>)</li>
<li><a
href="12ace760cb"><code>12ace76</code></a>
chore: remove redundant JUnit XML report configuration (<a
href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/issues/728">#728</a>)</li>
<li><a
href="ec606dbc24"><code>ec606db</code></a>
chore(deps): bump kotlin from 2.2.21 to 2.3.21 in
/samples/weather-stdio-serv...</li>
<li><a
href="1d9304264e"><code>1d93042</code></a>
chore(deps): bump kotlin from 2.2.21 to 2.3.21 in
/samples/kotlin-mcp-server ...</li>
<li><a
href="9817b174f9"><code>9817b17</code></a>
chore(deps): bump org.jetbrains.kotlin.jvm from 2.2.21 to 2.3.21 in
/samples/...</li>
<li>Additional commits viewable in <a
href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.11.1...0.12.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-06 07:50:37 +00:00
..
gradle chore(deps): bump mcp-kotlin from 0.11.1 to 0.12.0 in /samples/kotlinlang-mcp-server (#745) 2026-05-06 07:50:37 +00:00
src sample: kotlinlang mcp server (#713) 2026-04-27 15:07:03 +02:00
build.gradle.kts sample: kotlinlang mcp server (#713) 2026-04-27 15:07:03 +02:00
Dockerfile sample: kotlinlang mcp server (#713) 2026-04-27 15:07:03 +02:00
gradle.properties sample: kotlinlang mcp server (#713) 2026-04-27 15:07:03 +02:00
gradlew chore(deps): bump the other-dependencies group across 5 directories with 3 updates (#753) 2026-05-05 16:03:42 +02:00
gradlew.bat chore(deps): bump the other-dependencies group across 5 directories with 3 updates (#753) 2026-05-05 16:03:42 +02:00
README.md sample: kotlinlang mcp server (#713) 2026-04-27 15:07:03 +02:00
settings.gradle.kts sample: kotlinlang mcp server (#713) 2026-04-27 15:07:03 +02:00

Kotlinlang MCP Server

A Streamable HTTP MCP server that exposes the official Kotlin documentation to LLM clients — full-text search via Algolia plus page retrieval in markdown through kotlinlang.org's _llms endpoints.

Overview

This sample demonstrates an MCP server that wraps a real external documentation source. It uses the recommended Streamable HTTP transport, supports multiple concurrent client sessions, and caches responses in memory to reduce upstream load. The server is intentionally read-only — it exposes two tools, no prompts, no resources.

Prerequisites

  • JDK 21+
  • Algolia credentials for kotlinlang.org (exported as environment variables, see Configuration)

Build & Run

export ALGOLIA_APP_ID=...
export ALGOLIA_API_KEY=...
export ALGOLIA_INDEX_NAME=...

./gradlew run

The server starts on http://localhost:8080/mcp by default.

Connect with the MCP Inspector:

npx @modelcontextprotocol/inspector

In the Inspector UI, select Streamable HTTP transport and enter http://localhost:8080/mcp.

MCP Capabilities

Tools

Name Description
search_kotlinlang Full-text search across Kotlin documentation. Returns up to 5 results filtered to /docs/ pages. Responses cached for 10 minutes.
get_kotlinlang_page Fetches a documentation page as markdown via kotlinlang.org's _llms endpoint. Accepts a path relative to /docs/. Cached for 1 hour.

Example paths accepted by get_kotlinlang_page: coroutines-overview, multiplatform/compose-multiplatform-and-jetpack-compose. Leading/trailing slashes and an optional .html suffix are normalized before resolution.

Configuration

Variable Required Default Description
ALGOLIA_APP_ID yes — Algolia application ID
ALGOLIA_API_KEY yes — Algolia search API key
ALGOLIA_INDEX_NAME yes — Algolia index name
SERVER_PORT no 8080 HTTP server port
SERVER_HOST no 0.0.0.0 HTTP server bind address

The server does not provide fallback values for ALGOLIA_*. Startup fails if any of those variables are missing.

Docker

Multi-stage build with Alpine-based images. Runs as a non-root user.

docker build -t kotlinlang-mcp-server .

docker run \
  -p 8080:8080 \
  -e ALGOLIA_APP_ID=... \
  -e ALGOLIA_API_KEY=... \
  -e ALGOLIA_INDEX_NAME=... \
  kotlinlang-mcp-server

Connecting an MCP client

Any MCP client that supports Streamable HTTP transport can connect:

{
  "mcpServers": {
    "kotlinlang": {
      "url": "http://localhost:8080/mcp"
    }
  }
}

Limitations

This sample is intended for demonstration only. Before production use, consider:

  • In-memory cache only — cached data is lost on server restart.
  • No authentication or authorization — run behind a trusted proxy or restrict network access.
  • No rate limiting on outgoing requests to Algolia and kotlinlang.org.
  • Permissive CORS (anyHost()) — restrict to specific origins for any non-local deployment.
  • Streamable HTTP only — no STDIO transport for local-only usage.
  • Tools only — no MCP resources or prompts are exposed.