Description
Adds sampling-with-tools per SEP-1577, JSON Schema dialect declaration on tool schemas, server-side tool name validation, and capability extensions; fixes SSE reconnect on the same session and stops swallowing CancellationException.
Breaking Changes
Sampling messages can carry tool calls and results (SEP-1577) by @devcrocod in #718
SamplingMessage.content is now typed as a new SamplingMessageContent supertype, with MediaContent (text/image/audio), ToolUseContent, and ToolResultContent as variants. MediaContent still exists and now extends SamplingMessageContent, so most source code that constructs sampling messages compiles unchanged — but the binary signatures of SamplingMessage, CreateMessageResult, and related types have changed. ClientCapabilities.sampling is also now a typed Sampling object instead of a raw JsonObject. Recompilation is required; consumers reading sampling as JsonObject must migrate to the typed accessors.
watchosX64 and tvosX64 Kotlin/Native targets removed by @devcrocod in #727
These targets have been deprecated upstream. Migrate to the corresponding ARM/simulator targets (watchosArm64, watchosSimulatorArm64, tvosArm64, tvosSimulatorArm64).
Features
- Add
$schemafield toToolSchema, declaring JSON Schema 2020-12 as the default dialect (SEP-1613) by @devcrocod in #696 - Validate tool names at registration time on the server, following the MCP tool naming standard (SEP-986) by @devcrocod in #695
- Add
extensionsfield toClientCapabilitiesandServerCapabilitiesfor advertising supported MCP extensions during the initialize handshake by @eritscher in #678
Fixed
- Validate the
mcp-protocol-versionHTTP header on initialization requests and correctDEFAULT_NEGOTIATED_PROTOCOL_VERSIONto match the spec by @devcrocod in #697 - Propagate
CancellationExceptioninstead of logging it as an error by @devcrocod in #706 - Evict stale GET SSE stream mapping on reconnect so a new GET on the same session is no longer silently rejected by the leftover entry from the previous stream by @amr in #716
Maintenance
- Add
kotlinlangMCP server sample withsearchandget_pagetools by @devcrocod in #713 - Migrate detekt to a
buildSrcconvention plugin with a fully explicit, version-locked YAML config by @devcrocod in #729 - Add Streamable HTTP integration tests for pagination, bad-request handling, and logging by @jskjw157 in #613
- Remove unused OpenAPI Generator plugin and configuration by @devcrocod in #683
- Remove Codecov configuration in favor of kover by @devcrocod in #691
- Remove redundant JUnit XML report configuration by @devcrocod in #728
- Remove IDEA files tied to the incompatible detekt IDE plugin by @devcrocod in #714
- Add Node.js setup to the release workflow so TypeScript integration tests run on macOS runners by @devcrocod in #684
Dependencies
New Contributors
- @eritscher made their first contribution in #678
- @amr made their first contribution in #716
Full Changelog: 0.11.1...0.12.0