| Filename | Latest commit message | Latest commit date |
|---|---|---|
Bumps `mcp-kotlin` from 0.11.0 to 0.11.1. Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.11.0 to 0.11.1 <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.11.1</h2> <h3>Description</h3> <p>Fixes an SSE stream crash on Netty when clients connect to the Streamable HTTP GET endpoint.</p> <h3>Fixed</h3> <ul> <li>Fixed GET SSE stream crash on Netty in Streamable HTTP where <code>appendSseHeaders()</code> was called after response headers were already committed, causing <code>UnsupportedOperationException</code> and client retry loops by <a href="https://github.com/devcrocod"><code>@devcrocod</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/681">#681</a></li> </ul> <h3>Dependencies</h3> <ul> <li>mcp-kotlin to v0.11.0 in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/672">#672</a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/673">#673</a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/675">#675</a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/676">#676</a></li> <li>Ktor BOM to v3.3.3 in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/650">#650</a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/653">#653</a>, <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/656">#656</a></li> <li>Kotest assertions to v6.1.11 in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/674">#674</a></li> <li>anthropic-java to v2.19.0 in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/671">#671</a></li> <li><code>@modelcontextprotocol/sdk</code> to v1.29.0, <code>@types/node</code> update in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/677">#677</a></li> <li>hono to v4.12.12 in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/680">#680</a></li> <li><code>@hono/node-server</code> to v1.19.13 in <a href="https://redirect.github.com/modelcontextprotocol/kotlin-sdk/pull/679">#679</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.11.0...0.11.1">https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.11.0...0.11.1</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. |