Repository navigation
Update dependency io.modelcontextprotocol:kotlin-sdk-server to v0.16.0 - #138
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
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.
This PR contains the following updates:
0.15.0→0.16.0Release Notes
modelcontextprotocol/kotlin-sdk (io.modelcontextprotocol:kotlin-sdk-server)
v0.16.0Compare Source
Description
This release closes memory-exhaustion holes in the WebSocket and Streamable HTTP servers, deprecates the SSE transport in favor of Streamable HTTP, moves APIs deprecated in 0.9.0–0.13.0 to
ERROR, and adds experimental SEP-2575 discovery types.Breaking Changes
Streamable HTTP sessions expire when idle and are capped by @devcrocod in #1032
mcpStreamableHttpkept every session until the client sentDELETE, so aninitializeflood could exhaust server memory.sessionIdleTimeoutwithout requests (default 30 minutes; an openGETstream does not count), and its id then answers404 Not Found.Duration.INFINITEdisables expiry.maxSessionssessions are open at once (default 10,000); a new session beyond that gets503 Service Unavailable.GETwithout anMcp-Session-Idheader returns400 Bad Request.StreamableHttpClientTransportreports a404on itsGETstream throughonError. It does not start a new session by itself; the application has to.mcpStreamableHttpchanged; recompile code built against earlier versions.application.mcpStreamableHttp( path = "/mcp", sessionIdleTimeout = 10.minutes, maxSessions = 1_000, ) { server }Deprecated APIs moved to
ERRORby @devcrocod in #1128APIs deprecated in 0.9.0–0.13.0 no longer compile; existing binaries keep working.
StreamableHttpServerTransport()andStreamableHttpServerTransport(enableJsonResponse, …)→StreamableHttpServerTransport(Configuration(...))StreamableHttpClientTransport,HttpClient.mcpStreamableHttpTransportandHttpClient.mcpStreamableHttpwithreconnectionTime→ the overloads takingReconnectionOptions(initialReconnectionDelay = ...)ElicitRequest.requestedSchema→(params as ElicitRequestFormParams).requestedSchemaElicitRequestParams(message, requestedSchema, meta)→ElicitRequestFormParams(...)ClientCapabilities(sampling: JsonObject?, …)→ the constructor with typedClientCapabilities.SamplingandClientCapabilities.ElicitationStreamableHttpServerTransport.Configuration.enableDnsRebindingProtection,allowedHostsandallowedOrigins→install(DnsRebindingProtection)on the Ktor routeStdioServerTransport(inputStream, outputStream)is now hidden: rename the named arguments toinputandoutput. Positional calls keep compiling.The
mcpStatelessStreamableHttpoverload witheventStore, atERRORsince 0.15.0, is removed. Binaries built against 0.14.0 or earlier that call it fail withNoSuchMethodErroruntil recompiled.server/discovertypes extend sealed hierarchies by @Yusufihsangorgel in #893DiscoverRequestis a newClientRequest,DiscoverResulta newServerResult, andMethod.DefinedgainsServerDiscover. Exhaustivewhenexpressions over these types need a new branch or anelse.Features
@ExperimentalMcpApi) SEP-2575 types: theserver/discoverrequest and result (DiscoverRequest,DiscoverResult,CacheScope), request-scoped metadata accessors onRequestMeta(protocolVersion,clientInfo,clientCapabilities,logLevel), andUnsupportedProtocolVersionDatafor the newUNSUPPORTED_PROTOCOL_VERSION(-32022) error code. These are types and codecs only; the client and server do not use them yet, by @Yusufihsangorgel in #893AbstractTransport.invokeOnErrorCallback, which swallows exceptions thrown by theonErrorcallback and lets cancellation propagate, by @devcrocod in #998Changed
Deprecated
SseClientTransport→StreamableHttpClientTransportHttpClient.mcpSseTransport→mcpStreamableHttpTransport;HttpClient.mcpSse→mcpStreamableHttpSseServerTransportandRoute.mcp→StreamableHttpServerTransportApplication.mcp→Application.mcpStreamableHttpSecurity
Application.mcpWebSocketnow caps inbound WebSocket messages at 16 MiB; before, a single large message could exhaust server memory. WithRoute.mcpWebSocket, setmaxFrameSizewhen you installWebSockets.WebSocketMcpTransportnow keeps reading after a message it cannot handle instead of stalling while frames pile up, and reports such messages and failed sessions throughonError, by @devcrocod in #1129mcpStreamableHttpexpires idle sessions and caps their number, so aninitializeflood can no longer exhaust server memory (see Breaking Changes), by @devcrocod in #1032SseClientTransportrefuses to start when the server'sendpointevent points to a different origin, so a malicious server can no longer redirect requests, and their auth headers, to another host, by @ez-lbz in #958Fixed
SseClientTransportresolves relativeendpointURLs per RFC 3986, so connecting to a server mounted under a sub-path such asmcp("/api/mcp/sse")no longer fails with404, by @gibkim in #1100Application.mcpandApplication.mcpStreamableHttpno longer fail withDuplicatePluginExceptionwhen the SSE plugin is already installed, so one application can host several Streamable HTTP endpoints, by @soulkeykim in #1092ServerSession.onInitializedcallbacks registered after the handshake now run immediately, and concurrent registrations are no longer lost; a duplicatenotifications/initializedno longer runs the callbacks again, by @taekop in #1019prompts/getfor an unknown prompt returnsINVALID_PARAMS(-32602) instead ofINTERNAL_ERROR(-32603), by @latent-9 in #955"ttl": null, as the schema requires, instead of omitting the key, by @devcrocod in #1089CancellationExceptionno longer reachesonErrorcallbacks or the log, by @devcrocod in #998Maintenance
checkKotlinAbi/updateKotlinAbi) instead of binary-compatibility-validator, and every module gains a klib ABI dump, by @devcrocod in #1027jvmTestrun went from about 40 s to 5 s, by @devcrocod in #1054ChannelTransportTest, by @devcrocod in #1028Dependencies
gradle/actions,actions/setup-javav6,actions/stalev11) in #932, #933, #934, #935, #937, #939, #940, #952, #954, #962, #963, #971, #975, #977, #978, #979, #983, #987, #990, #991, #1017, #1018, #1025, #1029, #1030, #1055, #1098, #1099, #1104, #1109, #1115, #1126, #1127, #1133, #1140, #1141New Contributors
Full Changelog: modelcontextprotocol/kotlin-sdk@0.15.0...0.16.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.