fix(deps): update module github.com/modelcontextprotocol/go-sdk to v1.8.0 - #51
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
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Due to Go's usage of Minimal Version Selection (MVS), these packages have been updated to the minimum version available, so will still abide by Details:
|
renovate-bot
force-pushed
the
renovate/go-dependencies
branch
from
September 28, 2026 21:42
2675450 to
1b164ae
Compare
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.4.1→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
v1.7.0Compare Source
This release brings full support for protocol version
2026-07-28.The wire protocol is largely rewritten: a stateless model with per-request
_meta, a newserver/discoverRPC replacing theinitializehandshake, multi-round-trip requests (MRTR) replacing server-initiated calls, a unifiedsubscriptions/listenstream replacing free-floating change notifications, standardised HTTP headers, and the formal deprecation of the roots, sampling, and logging features.The streamable HTTP transport accepts requests at protocol version
2026-07-28only whenStreamableHTTPOptions.Stateless = true. If you want to expose the new protocol over HTTP, setStateless = true; if you want to keep stateful sessions, your clients will negotiate down to2025-11-25.Backward compatibility with
2025-11-25and earlier is preserved on every endpoint. The SDK negotiates the highest mutually-supported version at connect time. The new protocol is enabled by default for new clients; existing legacy clients and servers continue to work unchanged.This release consolidates everything shipped in
v1.7.0-pre.1,v1.7.0-pre.2, andv1.7.0-pre.3. Thank you to everyone who exercised the pre-releases and filed feedback.v1.7.0-pre.3is already successfully used by GitHub, serving more than half a million users.Make MCP Stateless (SEP-2575) & Sessionless (SEP-2567)
The
initialize/notifications/initializedhandshake is removed in2026-07-28. Each request now carries_meta.io.modelcontextprotocol/{protocolVersion,clientInfo,clientCapabilities}so the server can validate the peer without state. A newserver/discoverRPC lets clients learn the server's supported versions and capabilities up front; the SDK falls back to legacyinitializeif discover fails. Resumability (Last-Event-ID, standalone GET) is removed;ping,logging/setLevel,resources/subscribe, andresources/unsubscribeare also removed on this revision and rejected withMethodNotFound.MissingRequiredClientCapabilityerror data by @guglielmo-san (#1005)UnsupportedProtocolVersionerror by @guglielmo-san (#989)Subscriptions listen (SEP-2575)
The legacy
tools/list_changed,prompts/list_changed,resources/list_changed, andresources/updatednotifications are replaced by a single long-livedsubscriptions/listenrequest whose response stream multiplexes every change notification the client opted into, each tagged withio.modelcontextprotocol/subscriptionId. The SDK opens this stream automatically onClient.Connectwhen the corresponding list-changed handler is set; servers route notifications only to subscribed sessions.subscriptions/listenrpc (SEP-2575) by @guglielmo-san (#1007)Multi Round-Trip Requests (SEP-2322)
Server-to-client requests for elicitation, sampling, and roots are no longer issued as fresh JSON-RPC requests. Instead a tool/prompt/resource handler returns an
InputRequiredResultwhoseinputRequestsfield carries the requests; the client fulfils each and retries the original call withinputResponsespopulated. The SDK ships client- and server-side middleware that handles this transparently in both directions, including a server-side compatibility shim that lets MRTR handlers also work against legacy clients.Cacheable list results (SEP-2549)
tools/list,prompts/list,resources/list,resources/templates/list,resources/read, andserver/discoverresults now carryttlMsandcacheScopefields. Clients honour them as freshness hints to reduce polling; shared intermediaries usecacheScopeto decide whether responses may be cached.DiscoverResultby @guglielmo-san (#1022)HTTP standardization (SEP-2243)
The streamable HTTP transport now mirrors selected fields from the JSON-RPC body into HTTP headers (
Mcp-Method,Mcp-Name,Mcp-Protocol-Version,Mcp-Param-*) so network intermediaries can route and observe MCP traffic without deep packet inspection. Tools can declare per-parameter passthrough viax-mcp-headerannotations on their input schema. Body↔header mismatches return-32020 HeaderMismatch.x-mcp-headerby @guglielmo-san (#915)Deprecation of roots, sampling, and logging (SEP-2577)
Roots, sampling, and logging are formally deprecated on the
2026-07-28revision. The SDK continues to expose the corresponding Go types for backward compatibility with older peers, but new servers should not rely on them.Behavior changes guarded by MCPGODEBUG
Seven escape-hatch flags are added in this release to restore behavior that changed as part of spec-compliance fixes. All will be removed in v1.9.0.
customresnotfounderrcode=1— restore the old-32002code forResourceNotFoundError.hintomitempty=1— restoreomitemptyonToolAnnotations.ReadOnlyHintandIdempotentHint. The default now always serializes these fields because the Go types are barebool(not*bool), so omittingfalsemade it indistinguishable from "unset".allowsessionsinstateless=1— restore session-id handling on stateless streamable HTTP servers (read/writeMcp-Session-Id, acceptDELETE). The default behavior is now what the spec requires: stateless servers ignore session IDs entirely and return405 Method Not AllowedforDELETE.nomethodnotfoundcodeinerror=1— restore the previous STDIO behavior where the JSON-RPCMethodNotFound(-32601) code is omitted from the error response for unhandled methods. The default now includes the code.noprotocolerrorbody=1— restore the previous streamable HTTP client behavior of not decoding the JSON-RPC error body of a non-2xx HTTP response. The default now surfaces the underlying JSON-RPC error.nowrapinvalidparams=1— restore the previous behavior of returning rawunmarshalParamserrors from receiving handlers instead of wrapping them as a JSON-RPC-32602 Invalid paramserror. Introduced by #1087.disablecompleteparamsvalidation=1— restore the previous behavior of acceptingcompletion/completeresponses without validating the presence of thecompletionparams object. Introduced by #1080.Other Changes to the SDK
Streamable HTTP transport:
streamableClientConn.Closeby @blackwell-systems (#929)Custom methods and MCPGODEBUG-guarded fixes:
unmarshalParamswith jsonrpc error by @guglielmo-san (#1087)CompleteResultby @guglielmo-san (#1080)Additional spec-compliance fixes:
DiscoverResult(SEP-2575) by @guglielmo-san (#1097)subscriptions/listenby @guglielmo-san (#1088)server/discoverfor<2026-07-28requests by @guglielmo-san (#1084)resultTypeon new-protocol responses by @ychampion (#1060)ElicitParamsby @guglielmo-san (#1078)ApplyDefaultwhenres.Content == nilby @guglielmo-san (#1069)InitializeParamsin Meta by @guglielmo-san (#1049)protocolVersionin legacy initialize toprotocolVersion20251125by @guglielmo-san (#1051)NotificationSubscriptionsa mandatory field by @guglielmo-san (#1050)omitemptyReadOnlyHintinToolAnnotationsby @pvlbzn (#908)AddToolwhen schema is nil by @wucm667 (#918)tool.InputSchemaandtool.OutputSchemavalidation (SEP-2106) by @guglielmo-san (#1009)2026-06-30to2026-07-28by @guglielmo-san (#1015)2026-07-28to the supported protocol versions by @guglielmo-san (#1020)Auth and OAuth:
ClockSkewoption toRequireBearerTokenOptionsby @BorisTyshkevich (#969)AllowMissingExpirationoption toRequireBearerTokenOptionsby @BorisTyshkevich (#971)MatchesResourcehelper (RFC 9728/8707 audience comparison) by @BorisTyshkevich (#970)oauth2.RetrieveErrorduring token refresh by @smlx (#917)Session, keepalive and misc:
golang.org/x/time/rateforLoggingHandlerrate limiting by @wucm667 (#927)Conformance tests, documentation and CI:
troubleshoot.mdto includeresultTypeby @guglielmo-san (#1081)github/codeql-actionfrom 4.35.1 to 4.35.2 by @dependabot (#922)github/codeql-actionfrom 4.35.2 to 4.36.0 by @dependabot (#986)actions/cachefrom 5.0.4 to 5.0.5 by @dependabot (#923)actions/cachefrom 5.0.5 to 6.1.0 by @dependabot (#1065)actions/setup-nodefrom 6.3.0 to 6.4.0 by @dependabot (#921)actions/upload-artifactfrom 7.0.0 to 7.0.1 by @dependabot (#920)actions/checkoutfrom 6.0.2 to 7.0.0 by @dependabot (#1040)actions/setup-pythonfrom 6.2.0 to 6.3.0 by @dependabot (#1038)actions/setup-gofrom 6.4.0 to 6.5.0 by @dependabot (#1066)github/codeql-action/upload-sariffrom 4.36.0 to 4.36.2 by @dependabot (#1039)New Contributors
Full Changelog: modelcontextprotocol/go-sdk@v1.6.0...v1.7.0
v1.6.1Compare Source
This release adds an MCPGODEBUG flag to opt out of the Content-Type check on POST requests.
Behavior Changes
Prior to v1.6.0 (v1.4.0...v1.5.0), the Content-Type check on POST requests was gated by the same
disablecrossoriginprotectionMCPGODEBUG flag as the cross-origin protection. In v1.6.0, the cross-origin protection was disabled by default (replaced by the opt-inenableoriginverificationflag), but the Content-Type check was kept on unconditionally, leaving no way to disable it.This release restores an escape hatch for both the Streamable HTTP and SSE transports: setting
MCPGODEBUG=disablecontenttypecheck=1skips theContent-Type: application/jsonvalidation on POST requests.See #957.
What's Changed
Full Changelog: modelcontextprotocol/go-sdk@v1.6.0...v1.6.1
v1.6.0Compare Source
This release is equivalent to v1.6.0-pre.1. Thank you to those who tested the pre-release.
In this release we introduce several smaller fixes and improvements, and we started working for release 2026-06-30. The main new feature is the introduction of
ClientCredentialsHandlerfor OAuth client credentials grant.Add
ClientCredentialsHandlerfor OAuth client credentials grantAdded
ClientCredentialsHandlerimplementingauth.OAuthHandlerusing the OAuth 2.0 Client Credentials grant (RFC 6749 Section 4.4) for service-to-service authentication with pre-registered credentials.2026-06-30 Release related PRs
feat: add automatic application_type inference by @guglielmo-san in #904
New
application_typefield is added to theClientRegistrationMetadatafor DynamicClientRegistration. If not specified, theapplication_typewill be inferred from the RedirectURIs. This implements SEP-837.feat: HTTP Header Standardization for method and name by @guglielmo-san in #907
By mirroring key fields from the JSON-RPC payload into HTTP headers, network intermediaries such as load balancers, proxies, and observability tools can route and process MCP traffic without deep packet inspection, reducing latency and computational overhead. This partially implements SEP-2243.
Behavior Changes
SetErrorBehavior ChangePreviously the
SetErrormethod onCallToolResultalways overwrote theContentfield with the error text. NowSetErrorpreserves the existing value if it has already been populated. You can restore the previous behavior by setting the environment variableseterroroverwrite=1.Cross-Origin Protection Default Change
Previously (v1.4.1-v1.5.0) default (zero-value) cross-origin protection was applied when
CrossOriginProtectioninStreamableHTTPOptionswasnil. Now cross-origin protection is not enabled by default whenCrossOriginProtectionis nil.You can restore the previous behavior (enable by default) by setting
enableoriginverification=1.disablecrossoriginprotectionwas replaced byenableoriginverificationafter the default was changed to not enable cross-origin protection.jsonescapingoption was removed, according to plan.Other Changes to the SDK
ServerSession.startKeepaliveby @begelundmuller in #856New Contributors
Full Changelog: modelcontextprotocol/go-sdk@v1.5.0...v1.6.0-pre.1
[
v1.5.0](https://redirect.github.com/modelConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, 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.