Skip to content

refactor!: deprecation cycle - #1128

Open
devcrocod wants to merge 1 commit into
mainfrom
devcrocod/raise-deprecation-levels
Open

devcrocod wants to merge 1 commit into
mainfrom
devcrocod/raise-deprecation-levels

Conversation

@devcrocod

Copy link
Copy Markdown
Contributor

Raises the level of APIs deprecated in 0.9.0–0.13.0 and removes the mcpStatelessStreamableHttp overload that has been ERROR since 0.15.0.

ERROR:

  • StreamableHttpServerTransport(), StreamableHttpServerTransport(enableJsonResponse, …)
  • StreamableHttpClientTransport, mcpStreamableHttpTransport, mcpStreamableHttp with reconnectionTime
  • ElicitRequest.requestedSchema, ElicitRequestParams(message, requestedSchema, meta)
  • ClientCapabilities(sampling: JsonObject?, …)
  • Configuration.enableDnsRebindingProtection, allowedHosts, allowedOrigins

HIDDEN: StdioServerTransport(inputStream, outputStream). With ERROR, a positional StdioServerTransport(input, output) would resolve to it and stop compiling.

LegacyTitledEnumSchema stays at WARNING while 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

  • Code using the ERROR APIs no longer compiles; existing binaries keep working.
  • StdioServerTransport(inputStream = …, outputStream = …): rename the arguments to input and output.
  • mcpStatelessStreamableHttp: binaries built against 0.14.0 or earlier fail with NoSuchMethodError; recompile.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

…ecation levels, standardize parameter naming for consistency (`inputStream` to `input`, `outputStream` to `output`), and remove obsolete APIs.
Copilot AI balanced review requested due to automatic review settings October 19, 2026 19:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 ERROR and 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

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@devcrocod
devcrocod requested a review from e5l October 19, 2026 20:35

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants