v1.7.0 — MCP 2026-07-28
This release brings full support for protocol version 2026-07-28 as of https://github.com/modelcontextprotocol/modelcontextprotocol/tree/f817239f4d6b1efff2c4dfc2f7af85c985d73076.
Any change introduced after this commit, may not be implemented in this release.
The wire protocol is largely rewritten: a stateless model with per-request _meta, a new server/discover RPC replacing the initialize handshake, multi-round-trip requests (MRTR) replacing server-initiated calls, a unified subscriptions/listen stream 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-28 only when StreamableHTTPOptions.Stateless = true. If you want to expose the new protocol over HTTP, set Stateless = true; if you want to keep stateful sessions, your clients will negotiate down to 2025-11-25.
Backward compatibility with 2025-11-25 and 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.
Make MCP Stateless (SEP-2575) & Sessionless (SEP-2567)
The initialize/notifications/initialized handshake is removed in 2026-07-28. Each request now carries _meta.io.modelcontextprotocol/{protocolVersion,clientInfo,clientCapabilities} so the server can validate the peer without state. A new server/discover RPC lets clients learn the server's supported versions and capabilities up front; the SDK falls back to legacy initialize if discover fails. Resumability (Last-Event-ID, standalone GET) is removed; ping, logging/setLevel, resources/subscribe, resources/unsubscribe are also removed on this revision and rejected with MethodNotFound.
- mcp: Implement support for SEP-2575 on client side by @guglielmo-san (#975)
- mcp: Implement server-side support for discover method (SEP-2575) by @guglielmo-san (#987)
- mcp: Implement stateless server (SEP-2275 — typo in PR title, actually SEP-2575) by @guglielmo-san (#965)
- mcp: add support for logging level (SEP-2575) by @guglielmo-san (#997)
- mcp: Remove resumability and introduce
MissingRequiredClientCapabilityerror data by @guglielmo-san (#1005) - mcp: remove session header handling in stateless mode by @maciej-kisiel (#952)
- mcp: do not call DELETE for sessionless & doc adjustments by @maciej-kisiel (#960)
- mcp: Implement retry on advised supportedVersions in
UnsupportedProtocolVersionerror by @guglielmo-san (#989) - mcp: Enable legacy initialize fallback on any error by @guglielmo-san (#1014)
Subscriptions listen (SEP-2575)
The legacy free-floating notifications/tools/list_changed, prompts/list_changed, resources/list_changed, and resources/updated notifications are replaced by a single long-lived subscriptions/listen request whose response stream multiplexes every change notification the client opted into, each tagged with io.modelcontextprotocol/subscriptionId. The SDK opens this stream automatically on Client.Connect when the corresponding list-changed handler is set; servers route notifications only to subscribed sessions.
- mcp: Implement
subscriptions/listenrpc (SEP-2575) by @guglielmo-san (#1007) - mcp: refactor notification of subscribed sessions by @guglielmo-san (#1018)
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 InputRequiredResult whose inputRequests field carries the requests; the client fulfils each and retries the original call with inputResponses populated. 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.
- feat: multi-round-trip request implementation (SEP-2322) by @yarolegovich (#950)
Cacheable list results (SEP-2549)
tools/list, prompts/list, resources/list, resources/templates/list, resources/read, and server/discover results now carry ttlMs and cacheScope fields. Clients honour them as freshness hints to reduce polling; shared intermediaries use cacheScope to decide whether responses may be cached.
- mcp: add ttl for list results (SEP-2549) by @guglielmo-san (#1008)
- mcp: add Cacheable fields to DiscoverResult by @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 via x-mcp-header annotations on their input schema. Body↔header mismatches return -32020 HeaderMismatch.
- mcp: HTTP Header Standardization for
x-mcp-headerby @guglielmo-san (#915) - mcp: fix http-standardization (SEP-2243) by @guglielmo-san (#1010)
Authorization improvements
- mcp: align resource not found error code with SEP-2164 by @yarolegovich (#931)
- mcp: OIDC-Flavored Refresh Token Guidance (SEP-2207) by @guglielmo-san (#939)
- mcp: Add client-side scope accumulation (SEP-2350) by @guglielmo-san (#944)
- mcp: add optional issuer validator for pre-registered client validation (SEP-2352) by @guglielmo-san (#946)
- auth: issuer mix-up mitigation (SEP-2468) by @max-stytch (#859)
- Compare auth server metadata issuer ignoring trailing slash by @gainsley (#955)
- auth: bind refreshing token source to a background context, not the request ctx by @toabctl (#988)
- auth: add
ClockSkewoption toRequireBearerTokenOptionsby @BorisTyshkevich (#969) - auth: add
AllowMissingExpirationoption toRequireBearerTokenOptionsby @BorisTyshkevich (#971) - oauthex: add
MatchesResourcehelper (RFC 9728/8707 audience comparison) by @BorisTyshkevich (#970) - fix: handle
oauth2.RetrieveErrorduring token refresh by @smlx (#917)
Behavior Changes guarded by MCPGODEBUG
Five new escape-hatch flags were added to restore previous behavior. 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.
Other Changes to the SDK
- mcp: close HTTP response body from DELETE request in streamableClientConn.Close by @blackwell-systems (#929)
- build(deps): bump github/codeql-action from 4.35.1 to 4.35.2 by @dependabot (#922)
- build(deps): bump actions/cache from 5.0.4 to 5.0.5 by @dependabot (#923)
- build(deps): bump actions/setup-node from 6.3.0 to 6.4.0 by @dependabot (#921)
- build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 by @dependabot (#920)
- fix(mcp): prevent SIGSEGV in AddTool when schema is nil by @wucm667 (#918)
- mcp: use golang.org/x/time/rate for LoggingHandler rate limiting by @wucm667 (#927)
- mcp: write SSE comment on standalone stream so HTTP/2 reverse proxies flush HEADERS frame by @jchangx (#938)
- mcp: refactor streamable handler control flow by @maciej-kisiel (#949)
- fix: reject duplicate initialize requests by @he-yufeng (#962)
- fix: do not
omitemptyReadOnlyHintinToolAnnotationsby @pvlbzn (#908) - mcp: add configurable keepalive failure threshold by @tdabasinskas (#982)
- fix: add implementation description metadata by @he-yufeng (#981)
- build(deps): bump github/codeql-action from 4.35.2 to 4.36.0 by @dependabot (#986)
- mcp: remove outdated comment by @guglielmo-san (#1003)
- fix(jsonrpc2): decode requests when method key is present by @piyushbag (#1000)
- mcp:
tool.InputSchemaandtool.OutputSchemavalidation (SEP-2106) by @guglielmo-san (#1009) - fix: prevent duplicate in-flight request IDs by @guglielmo-san (#1011)
- mcp: add MCPGPDEBUG for opt-in Content-Type check by @guglielmo-san (#1012)
- mcp: bump protocol version from 2026-06-30 to 2026-07-28 by @guglielmo-san (#1015)
- mcp: update JSON-RPC error codes to align with updated MCP specification by @guglielmo-san (#1016)
- mcp: Deprecate roots, sampling and logging (SEP-2577) by @guglielmo-san (#1017)
- mcp: add documentation for new protocol version by @guglielmo-san (#1019)
- mcp: add
2026-07-28to the supported protocol versions by @guglielmo-san (#1020) - mcp: Upgrade conformance test to latest available deployoment by @guglielmo-san (#1021)
- mcp: update docs references by @guglielmo-san (#1023)
New Contributors
- @blackwell-systems made their first contribution in #929
- @smlx made their first contribution in #917
- @yarolegovich made their first contribution in #931
- @wucm667 made their first contribution in #918
- @jchangx made their first contribution in #938
- @gainsley made their first contribution in #955
- @he-yufeng made their first contribution in #962
- @pvlbzn made their first contribution in #908
- @max-stytch made their first contribution in #859
- @tdabasinskas made their first contribution in #982
- @BorisTyshkevich made their first contribution in #971
- @piyushbag made their first contribution in #1000
- @toabctl made their first contribution in #988
Full Changelog: v1.6.1...v1.7.0