chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.7.0 - #129
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.7.0#129renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/github.com-modelcontextprotocol-go-sdk-1.x
branch
from
July 28, 2026 15:44
83ec8e1 to
d7fc884
Compare
4 tasks
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.6.0→v1.7.0Release Notes
modelcontextprotocol/go-sdk (github.com/modelcontextprotocol/go-sdk)
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
Configuration
📅 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.