Update module github.com/modelcontextprotocol/go-sdk to v1.8.0 - #295
Merged
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/github.com-modelcontextprotocol-go-sdk-1.x
branch
from
September 15, 2026 18:56
9a9ee2c to
cdf7e3e
Compare
samuv
approved these changes
Sep 16, 2026
samuv
deleted the
renovate/github.com-modelcontextprotocol-go-sdk-1.x
branch
September 16, 2026 09:06
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:
v1.7.0→v1.8.0Release Notes
modelcontextprotocol/go-sdk (github.com/modelcontextprotocol/go-sdk)
v1.8.0Compare Source
This release is equivalent to v1.8.0-pre.2. Thank you to those who tested the pre-release.
In this release we introduce several fixes and improvements on top of v1.7.0. It adds no new protocol revision: the supported set is unchanged, and
2026-07-28remains the newest version the SDK negotiates.The bulk of the work is hardening the transports against resource exhaustion, closing session leaks, deadlocks and teardown hangs found by users running the new protocol at scale, and giving servers explicit control over which protocol versions they advertise.
Two behavior changes are guarded by new
MCPGODEBUGflags; see the section below.Hardening against resource exhaustion
Every decoding path that buffers incoming input is now bounded. JSON payloads are rejected past 1000 levels of nesting, before the parser recurses. Both SSE readers cap the bytes buffered for a single event via
MaxEventSizeonSSEClientTransportandStreamableClientTransport, and the stdio transport caps a single JSON-RPC frame viaStdioTransport.MaxLineLength.On the OAuth side, dynamic client registration responses are bounded to 1 MB, and the discovery code now validates metadata documents rather than trusting them.
Restricting the protocol versions a server supports
ServerOptions.SupportedProtocolVersionslets a server narrow the set of versions it advertises and negotiates. The list can only narrow, never widen; naming a version the SDK does not implement panics at construction.Relatedly, a stateful streamable handler receiving a
2026-07-28request now returns that same JSON-RPC error instead of a plain-text 400, so the client can renegotiate down instead of losing the connection.Per-request cache control
ServerOptions.SetCacheableis a new hook that decides thettlMsandcacheScopefields of every result carrying them:server/discover, the four list methods, andresources/read. It runs once per result, after the handler returns, with the values that handler produced, so it can set a policy globally while still letting an individual handler override it. Anything left unset falls back to the protocol default ofpublic.Behavior changes guarded by MCPGODEBUG
Two new escape-hatch flags restore the previous behavior of the changes above. Both will be removed in v1.9.0.
plaintextstatefulrejection=1— restore the plain-texthttp.Error400 body a statefulStreamableHTTPHandlerpreviously returned for a request carrying per-request metadata. The default is now a JSON-RPC-32022 CodeUnsupportedProtocolVersionerror with anUnsupportedProtocolVersionDatapayload advertising the legacy versions the server supports. Introduced by #1143.blockingcancelnotify=1— restore the previous behavior where a cancelled call waits synchronously fornotifications/cancelledto be delivered (up to 5s) before returning, joining any delivery error into the caller's error. The default now retires the call immediately and sends the notification asynchronously. Introduced by #1151.Options below were removed, according to plan:
seterroroverwriteenableoriginverificationdisablecontenttypecheckdisablelocalhostprotectionOther Changes to the SDK
go getleaves the module unbuildable by @tonydzi (#1148)actions/setup-nodefrom 6.0.0 to 7.0.0 by @dependabot (#1123)actions/setup-pythonfrom 6.3.0 to 7.0.0 by @dependabot (#1124)actions/setup-gofrom 6.5.0 to 7.0.0 by @dependabot (#1125)actions/checkoutfrom 7.0.0 to 7.0.1 by @dependabot (#1126)golang/govulncheck-actionfrom 1.0.4 to 1.1.0 by @dependabot (#1218)ossf/scorecard-actionfrom 2.4.3 to 2.4.4 by @dependabot (#1217)New Contributors
Full Changelog: modelcontextprotocol/go-sdk@v1.7.0...v1.8.0-pre.1
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.