| Filename | Latest commit message | Latest commit date |
|---|---|---|
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). Bumps the other-dependencies group with 1 update in the /samples/simple-streamable-server directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework). Bumps the other-dependencies group with 1 update in the /samples/weather-stdio-server directory: [io.github.oshai:kotlin-logging-jvm](https://github.com/oshai/kotlin-logging). Updates `com.anthropic:anthropic-java` from 2.32.0 to 2.34.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.34.0</h2> <h2>2.34.0 (2026-05-21)</h2> <p>Full Changelog: <a href="https://github.com/anthropics/anthropic-sdk-java/compare/v2.33.0...v2.34.0">v2.33.0...v2.34.0</a></p> <h3>Features</h3> <ul> <li><strong>api:</strong> Add support for thinking-token-count beta for estimated tokens in thinking block deltas when streaming (<a href=" |
||
| .. | ||
| gradle | ||
| src | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
Weather STDIO Server
A minimal MCP server that exposes weather forecast and alert tools using the National Weather Service API over STDIO transport.
Overview
This sample shows how to build a STDIO-based MCP server in Kotlin. It registers two tools that query the weather.gov API — one for weather forecasts by latitude/longitude and one for active alerts by US state. Because it uses STDIO, the server is launched as a subprocess by an MCP client or a desktop application like Claude Desktop.
Prerequisites
- JDK 17+
- Internet access (the server calls the weather.gov API at runtime)
Build & Run
Run the server (it communicates via stdin/stdout):
./gradlew run
MCP Inspector
Build the fat JAR first, then connect with the MCP Inspector:
./gradlew build
npx @modelcontextprotocol/inspector -- java -jar samples/weather-stdio-server/build/libs/weather-stdio-server-0.1.0-all.jar
Claude Desktop integration
Add the following to your Claude Desktop configuration:
{
"mcpServers": {
"weather": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/samples/weather-stdio-server/build/libs/weather-stdio-server-0.1.0-all.jar"
]
}
}
}
MCP Capabilities
Tools
| Name | Description |
|---|---|
get_alerts |
Returns active weather alerts for a two-letter US state code (e.g. CA, NY). |
get_forecast |
Returns weather forecast for a given latitude / longitude using the weather.gov API. |