kotlin-sdk/samples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] fd8afcf27f
chore(deps): bump com.anthropic:anthropic-java from 2.35.0 to 2.40.1 in /samples/kotlin-mcp-client in the other-dependencies group across 1 directory (#818)
Bumps the other-dependencies group with 1 update in the
/samples/kotlin-mcp-client directory:
[com.anthropic:anthropic-java](https://github.com/anthropics/anthropic-sdk-java).

Updates `com.anthropic:anthropic-java` from 2.35.0 to 2.40.1
<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.40.1</h2>
<h2>2.40.1 (2026-06-09)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.40.0...v2.40.1">v2.40.0...v2.40.1</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api:</strong> add <code>frontier_llm</code> refusal category
(<a
href="1627fd3561">1627fd3</a>)</li>
</ul>
<h2>v2.40.0</h2>
<h2>2.40.0 (2026-06-09)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.39.0...v2.40.0">v2.39.0...v2.40.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add support for Managed Agents deployments and
environment variable credentials (<a
href="628720bcd5">628720b</a>)</li>
</ul>
<h2>v2.39.0</h2>
<h2>2.39.0 (2026-06-09)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.38.0...v2.39.0">v2.38.0...v2.39.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add support for claude-mythos-5 and
claude-fable-5, with support for server-side fallbacks on refusal (<a
href="835fb42473">835fb42</a>)</li>
<li><strong>client:</strong> adds client-side fallbacks middleware for
API providers that do not support server-side fallbacks (<a
href="835fb42473">835fb42</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>3p middleware ordering (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-java/issues/34">#34</a>)
(<a
href="d01da3a680">d01da3a</a>)</li>
<li><strong>streaming:</strong> merge message_delta usage without
dropping or rejecting iterations (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-java/issues/39">#39</a>)
(<a
href="e3af1188f3">e3af118</a>)</li>
</ul>
<h2>v2.38.0</h2>
<h2>2.38.0 (2026-06-06)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.37.0...v2.38.0">v2.37.0...v2.38.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> small updates to Managed Agents types (<a
href="c7b08d808e">c7b08d8</a>)</li>
</ul>
<h2>v2.37.0</h2>
<h2>2.37.0 (2026-06-05)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.36.0...v2.37.0">v2.36.0...v2.37.0</a></p>
<h3>Features</h3>
<!-- 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.40.1 (2026-06-09)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.40.0...v2.40.1">v2.40.0...v2.40.1</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api:</strong> add <code>frontier_llm</code> refusal category
(<a
href="1627fd3561">1627fd3</a>)</li>
</ul>
<h2>2.40.0 (2026-06-09)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.39.0...v2.40.0">v2.39.0...v2.40.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add support for Managed Agents deployments and
environment variable credentials (<a
href="628720bcd5">628720b</a>)</li>
</ul>
<h2>2.39.0 (2026-06-09)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.38.0...v2.39.0">v2.38.0...v2.39.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add support for claude-mythos-5 and
claude-fable-5, with support for server-side fallbacks on refusal (<a
href="835fb42473">835fb42</a>)</li>
<li><strong>client:</strong> adds client-side fallbacks middleware for
API providers that do not support server-side fallbacks (<a
href="835fb42473">835fb42</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>3p middleware ordering (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-java/issues/34">#34</a>)
(<a
href="d01da3a680">d01da3a</a>)</li>
<li><strong>streaming:</strong> merge message_delta usage without
dropping or rejecting iterations (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-java/issues/39">#39</a>)
(<a
href="e3af1188f3">e3af118</a>)</li>
</ul>
<h2>2.38.0 (2026-06-06)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.37.0...v2.38.0">v2.37.0...v2.38.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> small updates to Managed Agents types (<a
href="c7b08d808e">c7b08d8</a>)</li>
</ul>
<h2>2.37.0 (2026-06-05)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.36.0...v2.37.0">v2.36.0...v2.37.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> mark Claude Opus 4.1 as deprecated (<a
href="693cbb4cf1">693cbb4</a>)</li>
</ul>
<h2>2.36.0 (2026-06-04)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.35.0...v2.36.0">v2.35.0...v2.36.0</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="43b8020fa6"><code>43b8020</code></a>
release: 2.40.1 (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-java/issues/350">#350</a>)</li>
<li><a
href="8f3e69b64a"><code>8f3e69b</code></a>
release: 2.40.0</li>
<li><a
href="1540132272"><code>1540132</code></a>
feat(api): add support for Managed Agents deployments and environment
variabl...</li>
<li><a
href="a214f315bf"><code>a214f31</code></a>
release: 2.39.0</li>
<li><a
href="194e2f47eb"><code>194e2f4</code></a>
feat(api): add support for claude-mythos-5 and claude-fable-5, with
support f...</li>
<li><a
href="56a2a49ac1"><code>56a2a49</code></a>
fix(streaming): merge message_delta usage without dropping or rejecting
itera...</li>
<li><a
href="a8c6d0f9fb"><code>a8c6d0f</code></a>
fix: 3p middleware ordering (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-java/issues/34">#34</a>)</li>
<li><a
href="79e8568843"><code>79e8568</code></a>
release: 2.38.0</li>
<li><a
href="e7c8e6e519"><code>e7c8e6e</code></a>
feat(api): small updates to Managed Agents types</li>
<li><a
href="edc1ae0ba0"><code>edc1ae0</code></a>
release: 2.37.0</li>
<li>Additional commits viewable in <a
href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.35.0...v2.40.1">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-06-16 12:14:31 +02:00
..
kotlin-mcp-client chore(deps): bump com.anthropic:anthropic-java from 2.35.0 to 2.40.1 in /samples/kotlin-mcp-client in the other-dependencies group across 1 directory (#818) 2026-06-16 12:14:31 +02:00
kotlin-mcp-server chore(deps): bump the other-dependencies group across 5 directories with 4 updates (#789) 2026-06-02 13:59:56 +02:00
kotlinlang-mcp-server chore(deps): bump mcp-kotlin from 0.12.0 to 0.13.0 in /samples/kotlinlang-mcp-server (#824) 2026-06-16 11:39:50 +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 5 directories with 4 updates (#789) 2026-06-02 13:59:56 +02:00
weather-stdio-server chore(deps): bump the other-dependencies group across 5 directories with 4 updates (#789) 2026-06-02 13:59:56 +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 →