| Filename | Latest commit message | Latest commit date |
|---|---|---|
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=" |
||
| .. | ||
| 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. |