Repository navigation
Conversation
…ecation levels, standardize parameter naming for consistency (`inputStream` to `input`, `outputStream` to `output`), and remove obsolete APIs.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The scoped API changes and migrated usages match the documented deprecation plan, with no unresolved blocking findings.
No open issues 🎉
What changed in this PR
Advances the Kotlin SDK’s deprecation cycle and migrates internal usages and examples to supported APIs.
Changes:
- Raises legacy APIs to
ERRORand hides the old stdio constructor. - Removes the deprecated stateless HTTP overload and updates API snapshots.
- Updates examples, DSL construction, and compatibility-test suppression.
| File | Description |
|---|---|
| samples/weather-stdio-server/src/main/kotlin/io/modelcontextprotocol/sample/server/McpWeatherServer.kt | Uses current stdio argument names. |
| samples/kotlin-mcp-server/src/main/kotlin/io/modelcontextprotocol/sample/server/server.kt | Migrates stdio constructor arguments. |
| README.md | Updates stdio and sampling examples. |
| kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransport.kt | Escalates legacy API deprecations. |
| kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StdioServerTransport.kt | Hides the legacy constructor. |
| kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt | Removes the deprecated stateless overload. |
| kotlin-sdk-server/api/kotlin-sdk-server.klib.api | Records the removed overload. |
| kotlin-sdk-server/api/kotlin-sdk-server.api | Records JVM API changes. |
| kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/ElicitationTest.kt | Updates compatibility-test suppression. |
| kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/elicitation.kt | Escalates legacy elicitation deprecations. |
| kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/elicitation.dsl.kt | Uses the supported form-parameters constructor. |
| kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/capabilities.kt | Escalates the legacy capabilities constructor deprecation. |
| kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StreamableHttpMcpKtorClientExtensions.kt | Escalates legacy reconnection overload deprecations. |
| kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StreamableHttpClientTransport.kt | Escalates the legacy transport constructor deprecation. |
Review effort: Balanced
There was a problem hiding this comment.
Looks good — the deprecation cycle is consistent and everything checks out, happy to approve!
Produced by Air Automations. Name: Code review / Run: https://air.jetbrains.cloud/org/05cf1a7f-6ab5-713b-abd3-29d0c8a05e2d/automations/409567ec-d3a7-40ac-ba95-8518ec577ac2?run=f8e7b782-8ea4-4dfc-b1d8-7b34d38ea1f3
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raises the level of APIs deprecated in 0.9.0–0.13.0 and removes the
mcpStatelessStreamableHttpoverload that has beenERRORsince 0.15.0.ERROR:StreamableHttpServerTransport(),StreamableHttpServerTransport(enableJsonResponse, …)StreamableHttpClientTransport,mcpStreamableHttpTransport,mcpStreamableHttpwithreconnectionTimeElicitRequest.requestedSchema,ElicitRequestParams(message, requestedSchema, meta)ClientCapabilities(sampling: JsonObject?, …)Configuration.enableDnsRebindingProtection,allowedHosts,allowedOriginsHIDDEN:StdioServerTransport(inputStream, outputStream). WithERROR, a positionalStdioServerTransport(input, output)would resolve to it and stop compiling.LegacyTitledEnumSchemastays atWARNINGwhile the spec still lists it.How Has This Been Tested?
JVM compilation of all modules with tests;
ElicitationTest,ElicitationDslTest,StreamableHttpServerTransportTest; README (knit) and samples compile; ktlint, detekt,checkKotlinAbi.Breaking Changes
ERRORAPIs no longer compiles; existing binaries keep working.StdioServerTransport(inputStream = …, outputStream = …): rename the arguments toinputandoutput.mcpStatelessStreamableHttp: binaries built against 0.14.0 or earlier fail withNoSuchMethodError; recompile.Types of changes
Checklist