| Filename | Latest commit message | Latest commit date |
|---|---|---|
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=" |
||
| .. | ||
| gradle | ||
| src | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| mcp-inspector-config.json | ||
| README.md | ||
| settings.gradle.kts | ||
Kotlin MCP Server
A sample MCP server demonstrating multiple transport modes: STDIO, SSE (plain), and SSE (Ktor plugin).
Note: The SSE transport modes are provided for backward compatibility. For new projects, consider using the simple-streamable-server sample, which uses the recommended Streamable HTTP transport.
Overview
This sample registers a prompt, a tool, and a resource, then lets you choose how to expose them.
STDIO mode is the default and is best for process-based clients. The two SSE modes show how to
serve MCP over HTTP using either a manual Ktor routing setup or the built-in mcp { } Ktor plugin.
Prerequisites
- JDK 17+
- MCP Inspector (optional, for testing)
Build & Run
STDIO mode (default)
./gradlew run
Or explicitly:
./gradlew run --args="--stdio"
Connect with the MCP Inspector:
npx @modelcontextprotocol/inspector --config samples/kotlin-mcp-server/mcp-inspector-config.json --server stdio-server
SSE with Ktor plugin
./gradlew run --args="--sse-server-ktor 3002"
Connect with the MCP Inspector:
npx @modelcontextprotocol/inspector --config samples/kotlin-mcp-server/mcp-inspector-config.json --server sse-ktor-server
SSE with plain configuration
Known issue: This mode may not work correctly at this time.
./gradlew run --args="--sse-server 3001"
Connect with the MCP Inspector:
npx @modelcontextprotocol/inspector --config samples/kotlin-mcp-server/mcp-inspector-config.json --server sse-server
MCP Capabilities
Tools
| Name | Description |
|---|---|
kotlin-sdk-tool |
A test tool that returns a "Hello, world!" greeting. |
Prompts
| Name | Description |
|---|---|
Kotlin Developer |
Generates a prompt to develop a small Kotlin application for a given project name. |
Resources
| Name | URI | Description |
|---|---|---|
Web Search |
https://search.com/ |
A placeholder resource demonstrating resource handling. |