kotlin-sdk/samples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] e9b976198b
chore(deps): bump the other-dependencies group across 4 directories with 2 updates (#988)
Bumps the other-dependencies group with 2 updates in the
/samples/kotlin-mcp-client directory:
[com.anthropic:anthropic-java](https://github.com/anthropics/anthropic-sdk-java)
and org.slf4j:slf4j-simple.
Bumps the other-dependencies group with 1 update in the
/samples/kotlin-mcp-server directory: org.slf4j:slf4j-simple.
Bumps the other-dependencies group with 1 update in the
/samples/simple-streamable-server directory: org.slf4j:slf4j-simple.
Bumps the other-dependencies group with 1 update in the
/samples/weather-stdio-server directory: org.slf4j:slf4j-simple.

Updates `com.anthropic:anthropic-java` from 2.60.0 to 2.62.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/anthropics/anthropic-sdk-java/releases">com.anthropic:anthropic-java's
releases</a>.</em></p>
<blockquote>
<h2>v2.62.0</h2>
<h2>2.62.0 (2026-09-10)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.61.0...v2.62.0">v2.61.0...v2.62.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add auto mode tool permissions for Managed
Agents (<a
href="e373feae15">e373fea</a>)</li>
<li><strong>api:</strong> add content_too_large web_fetch tool error
code (<a
href="96451dee56">96451de</a>)</li>
<li><strong>api:</strong> add the user-profiles-2026-09-04 beta value
and external_user_details to user profiles (<a
href="eb8c5b8900">eb8c5b8</a>)</li>
<li><strong>api:</strong> support mounting public GitHub repositories
without an authorization_token in Managed Agents sessions (<a
href="2e1c9edbd4">2e1c9ed</a>)</li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li><strong>streaming:</strong> append tool input JSON in place (<a
href="d330f8bc51">d330f8b</a>)</li>
<li><strong>streaming:</strong> buffer text deltas instead of rebuilding
blocks per delta (<a
href="2bf8f70acd">2bf8f70</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> correct the environment scope field
description (<a
href="788877064e">7888770</a>)</li>
<li><strong>internal:</strong> cap formatter JVM heap at 1 GiB (<a
href="9b7b5a8b9a">9b7b5a8</a>)</li>
<li><strong>internal:</strong> restore package version (<a
href="28151f2eab">28151f2</a>)</li>
<li><strong>internal:</strong> restore package version (<a
href="6044d632e6">6044d63</a>)</li>
<li><strong>internal:</strong> stop stamping the package version into
generated files (<a
href="ee275adad3">ee275ad</a>)</li>
<li><strong>tests:</strong> restore empty test package marker files (<a
href="3e2284c0b3">3e2284c</a>)</li>
</ul>
<h2>v2.61.0</h2>
<h2>2.61.0 (2026-09-04)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.60.0...v2.61.0">v2.60.0...v2.61.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add Claude Tag category and user breakdowns to
usage reports (<a
href="7caaeb9fde">7caaeb9</a>)</li>
<li><strong>api:</strong> add named types for organization compliance
settings state (<a
href="9576c86dce">9576c86</a>)</li>
<li><strong>api:</strong> add workspace_id request option for
multi-workspace credentials (<a
href="cf7f13ccc1">cf7f13c</a>)</li>
<li><strong>api:</strong> raise Managed Agents vault refresh token limit
to 8192 chars (<a
href="d0c2286eda">d0c2286</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api:</strong> remove response text block maxLength
constraint (<a
href="b6225ce280">b6225ce</a>)</li>
<li><strong>client:</strong> read union common properties from raw JSON
for unknown variants (<a
href="3d2f38fe74">3d2f38f</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>api:</strong> accept anthropic-version on Claude Enterprise
admin endpoints (<a
href="165fa6b5aa">165fa6b</a>)</li>
<li><strong>api:</strong> declare specific error statuses instead of a
generic 4XX response (<a
href="e0dc35b2c5">e0dc35b</a>)</li>
<li><strong>api:</strong> update authentication parameters on spend
limit create and delete (<a
href="d054f6cfe4">d054f6c</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/anthropics/anthropic-sdk-java/blob/main/CHANGELOG.md">com.anthropic:anthropic-java's
changelog</a>.</em></p>
<blockquote>
<h2>2.62.0 (2026-09-10)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.61.0...v2.62.0">v2.61.0...v2.62.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add auto mode tool permissions for Managed
Agents (<a
href="e373feae15">e373fea</a>)</li>
<li><strong>api:</strong> add content_too_large web_fetch tool error
code (<a
href="96451dee56">96451de</a>)</li>
<li><strong>api:</strong> add the user-profiles-2026-09-04 beta value
and external_user_details to user profiles (<a
href="eb8c5b8900">eb8c5b8</a>)</li>
<li><strong>api:</strong> support mounting public GitHub repositories
without an authorization_token in Managed Agents sessions (<a
href="2e1c9edbd4">2e1c9ed</a>)</li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li><strong>streaming:</strong> append tool input JSON in place (<a
href="d330f8bc51">d330f8b</a>)</li>
<li><strong>streaming:</strong> buffer text deltas instead of rebuilding
blocks per delta (<a
href="2bf8f70acd">2bf8f70</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> correct the environment scope field
description (<a
href="788877064e">7888770</a>)</li>
<li><strong>internal:</strong> cap formatter JVM heap at 1 GiB (<a
href="9b7b5a8b9a">9b7b5a8</a>)</li>
<li><strong>internal:</strong> restore package version (<a
href="28151f2eab">28151f2</a>)</li>
<li><strong>internal:</strong> restore package version (<a
href="6044d632e6">6044d63</a>)</li>
<li><strong>internal:</strong> stop stamping the package version into
generated files (<a
href="ee275adad3">ee275ad</a>)</li>
<li><strong>tests:</strong> restore empty test package marker files (<a
href="3e2284c0b3">3e2284c</a>)</li>
</ul>
<h2>2.61.0 (2026-09-04)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.60.0...v2.61.0">v2.60.0...v2.61.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add Claude Tag category and user breakdowns to
usage reports (<a
href="7caaeb9fde">7caaeb9</a>)</li>
<li><strong>api:</strong> add named types for organization compliance
settings state (<a
href="9576c86dce">9576c86</a>)</li>
<li><strong>api:</strong> add workspace_id request option for
multi-workspace credentials (<a
href="cf7f13ccc1">cf7f13c</a>)</li>
<li><strong>api:</strong> raise Managed Agents vault refresh token limit
to 8192 chars (<a
href="d0c2286eda">d0c2286</a>)</li>
<li><strong>client:</strong> keep vault credential secrets out of
Terraform state with write-only arguments (<a
href="7556952191">7556952</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api:</strong> remove response text block maxLength
constraint (<a
href="b6225ce280">b6225ce</a>)</li>
<li><strong>client:</strong> raise a clear error when an httpx object is
passed instead of an httpx2 one (<a
href="130d7af1c6">130d7af</a>)</li>
<li><strong>client:</strong> read union common properties from raw JSON
for unknown variants (<a
href="3d2f38fe74">3d2f38f</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>api:</strong> accept anthropic-version on Claude Enterprise
admin endpoints (<a
href="165fa6b5aa">165fa6b</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="88a17532c5"><code>88a1753</code></a>
Merge pull request <a
href="https://redirect.github.com/anthropics/anthropic-sdk-java/issues/400">#400</a>
from anthropics/release-please--branches--main--chang...</li>
<li><a
href="6964f0722f"><code>6964f07</code></a>
release: 2.62.0</li>
<li><a
href="e373feae15"><code>e373fea</code></a>
feat(api): add auto mode tool permissions for Managed Agents</li>
<li><a
href="2e1c9edbd4"><code>2e1c9ed</code></a>
feat(api): support mounting public GitHub repositories without an
authorizati...</li>
<li><a
href="eb8c5b8900"><code>eb8c5b8</code></a>
feat(api): add the user-profiles-2026-09-04 beta value and
external_user_deta...</li>
<li><a
href="2bf8f70acd"><code>2bf8f70</code></a>
perf(streaming): buffer text deltas instead of rebuilding blocks per
delta</li>
<li><a
href="d330f8bc51"><code>d330f8b</code></a>
perf(streaming): append tool input JSON in place</li>
<li><a
href="788877064e"><code>7888770</code></a>
chore(docs): correct the environment scope field description</li>
<li><a
href="9b7b5a8b9a"><code>9b7b5a8</code></a>
chore(internal): cap formatter JVM heap at 1 GiB</li>
<li><a
href="96451dee56"><code>96451de</code></a>
feat(api): add content_too_large web_fetch tool error code</li>
<li>Additional commits viewable in <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.60.0...v2.62.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Updates `org.slf4j:slf4j-simple` from 2.0.18 to 2.0.19

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-17 16:34:29 +02:00
..
kotlin-mcp-client chore(deps): bump the other-dependencies group across 4 directories with 2 updates (#988) 2026-09-17 16:34:29 +02:00
kotlin-mcp-server chore(deps): bump the other-dependencies group across 4 directories with 2 updates (#988) 2026-09-17 16:34:29 +02:00
kotlinlang-mcp-server chore(deps): bump the other-dependencies group across 3 directories with 4 updates (#968) 2026-08-24 13:14:04 +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 the other-dependencies group across 4 directories with 2 updates (#988) 2026-09-17 16:34:29 +02:00
weather-stdio-server chore(deps): bump the other-dependencies group across 4 directories with 2 updates (#988) 2026-09-17 16:34:29 +02: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 →