chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.7.0 #8

Open
sa-renovate wants to merge 1 commit from renovate/github.com-modelcontextprotocol-go-sdk-1.x into main
Member

This PR contains the following updates:

Package Type Update Change
github.com/modelcontextprotocol/go-sdk require minor v1.4.1v1.7.0

Release Notes

modelcontextprotocol/go-sdk (github.com/modelcontextprotocol/go-sdk)

v1.7.0

Compare 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 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.

This release consolidates everything shipped in v1.7.0-pre.1, v1.7.0-pre.2, and v1.7.0-pre.3. Thank you to everyone who exercised the pre-releases and filed feedback.

v1.7.0-pre.3 is already successfully used by GitHub, serving more than half a million users.

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, and resources/unsubscribe are also removed on this revision and rejected with MethodNotFound.

Subscriptions listen (SEP-2575)

The legacy 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.

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.

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.

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.

Deprecation of roots, sampling, and logging (SEP-2577)

Roots, sampling, and logging are formally deprecated on the 2026-07-28 revision. 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 -32002 code for ResourceNotFoundError.
  • hintomitempty=1 — restore omitempty on ToolAnnotations.ReadOnlyHint and IdempotentHint. The default now always serializes these fields because the Go types are bare bool (not *bool), so omitting false made it indistinguishable from "unset".
  • allowsessionsinstateless=1 — restore session-id handling on stateless streamable HTTP servers (read/write Mcp-Session-Id, accept DELETE). The default behavior is now what the spec requires: stateless servers ignore session IDs entirely and return 405 Method Not Allowed for DELETE.
  • nomethodnotfoundcodeinerror=1 — restore the previous STDIO behavior where the JSON-RPC MethodNotFound (-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 raw unmarshalParams errors from receiving handlers instead of wrapping them as a JSON-RPC -32602 Invalid params error. Introduced by #​1087.
  • disablecompleteparamsvalidation=1 — restore the previous behavior of accepting completion/complete responses without validating the presence of the completion params object. Introduced by #​1080.

Other Changes to the SDK

Streamable HTTP transport:

Custom methods and MCPGODEBUG-guarded fixes:

Additional spec-compliance fixes:

Auth and OAuth:

Session, keepalive and misc:

Conformance tests, documentation and CI:

New Contributors

Full Changelog: https://github.com/modelcontextprotocol/go-sdk/compare/v1.6.0...v1.7.0

v1.6.1

Compare 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 disablecrossoriginprotection MCPGODEBUG flag as the cross-origin protection. In v1.6.0, the cross-origin protection was disabled by default (replaced by the opt-in enableoriginverification flag), 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=1 skips the Content-Type: application/json validation on POST requests.
See #​957.

What's Changed

Full Changelog: https://github.com/modelcontextprotocol/go-sdk/compare/v1.6.0...v1.6.1

v1.6.0

Compare 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 ClientCredentialsHandler for OAuth client credentials grant.

Add ClientCredentialsHandler for OAuth client credentials grant

Added ClientCredentialsHandler implementing auth.OAuthHandler using the OAuth 2.0 Client Credentials grant (RFC 6749 Section 4.4) for service-to-service authentication with pre-registered credentials.

  • extauth: add ClientCredentialsHandler for OAuth client credentials grant by @​ravyg in #​895
  • feat: add automatic application_type inference by @​guglielmo-san in #​904

    New application_type field is added to the ClientRegistrationMetadata for DynamicClientRegistration. If not specified, the application_type will 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

SetError Behavior Change

Previously the SetError method on CallToolResult always overwrote the Content field with the error text. Now SetError preserves the existing value if it has already been populated. You can restore the previous behavior by setting the environment variable seterroroverwrite=1.

Cross-Origin Protection Default Change

Previously (v1.4.1-v1.5.0) default (zero-value) cross-origin protection was applied when CrossOriginProtection in StreamableHTTPOptions was nil. Now cross-origin protection is not enabled by default when CrossOriginProtection is nil.
You can restore the previous behavior (enable by default) by setting enableoriginverification=1.

disablecrossoriginprotection was replaced by enableoriginverification after the default was changed to not enable cross-origin protection.

jsonescaping option was removed, according to plan.

Other Changes to the SDK

New Contributors

Full Changelog: https://github.com/modelcontextprotocol/go-sdk/compare/v1.5.0...v1.6.0-pre.1

v1.5.0

Compare Source

This release is equivalent to v1.5.0-pre.1. Thank you to those who tested the pre-release.

In this release we introduce important enhancements to the client-side OAuth flows. We also introduce several smaller fixes and improvements.

Stabilization of client-side OAuth APIs

As previously communicated, we're stabilizing the client-side OAuth APIs in v1.5.0. This means that the mcp_go_client_oauth build tag will no longer be required to compile the functionality and standard backward compatibility guarantees apply from now on.

Compared to the experimental support published in v1.4.0, we made some backwards incompatible changes:

  • auth.AuthorizationCodeHandlerConfig.AuthorizationCodeFetcher's type was changed from func(context.Context, *auth.AuthorizationArgs) (*auth.AuthorizationResult, error) to auth.AuthorizationCodeFetcher which is a reusable definition carrying the same underlying function type.
  • auth.AuthorizationCodeHandlerConfig.PreregisteredClientConfig was removed and replaced with auth.AuthorizationCodeHandlerConfig.PreregisteredClient which uses a newly introduced oauthex.ClientCredentials type. The type used previously (auth.PreregisteredClientConfig) has been removed.
  • Deprecated functionality has been removed from both auth and oauthex packages.

Enterprise Managed Authorization support added

Support for Enterprise Managed Authorization has been added to auth/extauth package. Huge thanks to @​radar07 for the implementation!

Note: this support is part of an official MCP extension and is not part of the core protocol. The support of this functionality is not covered by the principles defined in SDK tiers.

Other changes to the SDK

New Contributors

Full Changelog: https://github.com/modelcontextprotocol/go-sdk/compare/v1.4.1...v1.5.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/modelcontextprotocol/go-sdk](https://github.com/modelcontextprotocol/go-sdk) | require | minor | `v1.4.1` → `v1.7.0` | --- ### Release Notes <details> <summary>modelcontextprotocol/go-sdk (github.com/modelcontextprotocol/go-sdk)</summary> ### [`v1.7.0`](https://github.com/modelcontextprotocol/go-sdk/releases/tag/v1.7.0) [Compare Source](https://github.com/modelcontextprotocol/go-sdk/compare/v1.6.1...v1.7.0) 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 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. This release consolidates everything shipped in `v1.7.0-pre.1`, `v1.7.0-pre.2`, and `v1.7.0-pre.3`. Thank you to everyone who exercised the pre-releases and filed feedback. `v1.7.0-pre.3` is already [successfully used](https://github.blog/changelog/2026-07-23-github-mcp-server-supports-the-next-mcp-specification/) by GitHub, serving more than half a million users. #### Make MCP Stateless ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)) & Sessionless ([SEP-2567](https://modelcontextprotocol.io/seps/2567-sessionless-mcp)) 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`, and `resources/unsubscribe` are also removed on this revision and rejected with `MethodNotFound`. - mcp: Implement support for SEP-2575 on client side by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;975](https://github.com/modelcontextprotocol/go-sdk/pull/975)) - mcp: Implement server-side support for discover method (SEP-2575) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;987](https://github.com/modelcontextprotocol/go-sdk/pull/987)) - mcp: Implement stateless server (SEP-2575) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;965](https://github.com/modelcontextprotocol/go-sdk/pull/965)) - mcp: add support for logging level (SEP-2575) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;997](https://github.com/modelcontextprotocol/go-sdk/pull/997)) - mcp: Remove resumability and introduce `MissingRequiredClientCapability` error data by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1005](https://github.com/modelcontextprotocol/go-sdk/pull/1005)) - mcp: remove session header handling in stateless mode by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) ([#&#8203;952](https://github.com/modelcontextprotocol/go-sdk/pull/952)) - mcp: do not call DELETE for sessionless & doc adjustments by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) ([#&#8203;960](https://github.com/modelcontextprotocol/go-sdk/pull/960)) - mcp: Implement retry on advised supportedVersions in `UnsupportedProtocolVersion` error by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;989](https://github.com/modelcontextprotocol/go-sdk/pull/989)) - mcp: Enable legacy initialize fallback on any error by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1014](https://github.com/modelcontextprotocol/go-sdk/pull/1014)) #### Subscriptions listen ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)) The legacy `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/listen` rpc (SEP-2575) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1007](https://github.com/modelcontextprotocol/go-sdk/pull/1007)) - mcp: refactor notification of subscribed sessions by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1018](https://github.com/modelcontextprotocol/go-sdk/pull/1018)) #### Multi Round-Trip Requests ([SEP-2322](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/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 [@&#8203;yarolegovich](https://github.com/yarolegovich) ([#&#8203;950](https://github.com/modelcontextprotocol/go-sdk/pull/950)) #### Cacheable list results ([SEP-2549](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/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 [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1008](https://github.com/modelcontextprotocol/go-sdk/pull/1008)) - mcp: add Cacheable fields to `DiscoverResult` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1022](https://github.com/modelcontextprotocol/go-sdk/pull/1022)) #### HTTP standardization ([SEP-2243](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/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-header` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;915](https://github.com/modelcontextprotocol/go-sdk/pull/915)) - mcp: fix http-standardization (SEP-2243) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1010](https://github.com/modelcontextprotocol/go-sdk/pull/1010)) #### Deprecation of roots, sampling, and logging ([SEP-2577](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577)) Roots, sampling, and logging are formally deprecated on the `2026-07-28` revision. The SDK continues to expose the corresponding Go types for backward compatibility with older peers, but new servers should not rely on them. - mcp: Deprecate roots, sampling and logging (SEP-2577) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1017](https://github.com/modelcontextprotocol/go-sdk/pull/1017)) #### 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 `-32002` code for `ResourceNotFoundError`. - **`hintomitempty=1`** — restore `omitempty` on `ToolAnnotations.ReadOnlyHint` and `IdempotentHint`. The default now always serializes these fields because the Go types are bare `bool` (not `*bool`), so omitting `false` made it indistinguishable from "unset". - **`allowsessionsinstateless=1`** — restore session-id handling on stateless streamable HTTP servers (read/write `Mcp-Session-Id`, accept `DELETE`). The default behavior is now what the spec requires: stateless servers ignore session IDs entirely and return `405 Method Not Allowed` for `DELETE`. - **`nomethodnotfoundcodeinerror=1`** — restore the previous STDIO behavior where the JSON-RPC `MethodNotFound` (`-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 raw `unmarshalParams` errors from receiving handlers instead of wrapping them as a JSON-RPC `-32602 Invalid params` error. Introduced by [#&#8203;1087](https://github.com/modelcontextprotocol/go-sdk/pull/1087). - **`disablecompleteparamsvalidation=1`** — restore the previous behavior of accepting `completion/complete` responses without validating the presence of the `completion` params object. Introduced by [#&#8203;1080](https://github.com/modelcontextprotocol/go-sdk/pull/1080). #### Other Changes to the SDK Streamable HTTP transport: - mcp: allow opt-in to cancel handler ctx on aborted POST by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1099](https://github.com/modelcontextprotocol/go-sdk/pull/1099)) - mcp: enforce body size limit in Streamable connection by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1055](https://github.com/modelcontextprotocol/go-sdk/pull/1055)) - mcp: close HTTP response body from DELETE request in `streamableClientConn.Close` by [@&#8203;blackwell-systems](https://github.com/blackwell-systems) ([#&#8203;929](https://github.com/modelcontextprotocol/go-sdk/pull/929)) - mcp: write SSE comment on standalone stream so HTTP/2 reverse proxies flush HEADERS frame by [@&#8203;jchangx](https://github.com/jchangx) ([#&#8203;938](https://github.com/modelcontextprotocol/go-sdk/pull/938)) - mcp: refactor streamable handler control flow by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) ([#&#8203;949](https://github.com/modelcontextprotocol/go-sdk/pull/949)) - mcp: add MCPGODEBUG for opt-in Content-Type check by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1012](https://github.com/modelcontextprotocol/go-sdk/pull/1012)) - fix: prevent duplicate in-flight request IDs by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1011](https://github.com/modelcontextprotocol/go-sdk/pull/1011)) - fix: reject duplicate initialize requests by [@&#8203;he-yufeng](https://github.com/he-yufeng) ([#&#8203;962](https://github.com/modelcontextprotocol/go-sdk/pull/962)) - fix(jsonrpc2): decode requests when method key is present by [@&#8203;piyushbag](https://github.com/piyushbag) ([#&#8203;1000](https://github.com/modelcontextprotocol/go-sdk/pull/1000)) Custom methods and MCPGODEBUG-guarded fixes: - mcp: Allow registration of custom JSON-RPC methods by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;956](https://github.com/modelcontextprotocol/go-sdk/pull/956)) - mcp: wrap `unmarshalParams` with jsonrpc error by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1087](https://github.com/modelcontextprotocol/go-sdk/pull/1087)) - mcp: add param check for `CompleteResult` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1080](https://github.com/modelcontextprotocol/go-sdk/pull/1080)) Additional spec-compliance fixes: - mcp: update return meta in `DiscoverResult` (SEP-2575) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1097](https://github.com/modelcontextprotocol/go-sdk/pull/1097)) - mcp: add return type to `subscriptions/listen` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1088](https://github.com/modelcontextprotocol/go-sdk/pull/1088)) - mcp: reject calls to `server/discover` for `<2026-07-28` requests by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1084](https://github.com/modelcontextprotocol/go-sdk/pull/1084)) - mcp: include `resultType` on new-protocol responses by [@&#8203;ychampion](https://github.com/ychampion) ([#&#8203;1060](https://github.com/modelcontextprotocol/go-sdk/pull/1060)) - mcp: infer elicit mode from `ElicitParams` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1078](https://github.com/modelcontextprotocol/go-sdk/pull/1078)) - mcp: do not `ApplyDefault` when `res.Content == nil` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1069](https://github.com/modelcontextprotocol/go-sdk/pull/1069)) - mcp: do not exclude Notifications from carrying `InitializeParams` in Meta by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1049](https://github.com/modelcontextprotocol/go-sdk/pull/1049)) - mcp: cap negotiated `protocolVersion` in legacy initialize to `protocolVersion20251125` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1051](https://github.com/modelcontextprotocol/go-sdk/pull/1051)) - mcp: make `NotificationSubscriptions` a mandatory field by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1050](https://github.com/modelcontextprotocol/go-sdk/pull/1050)) - mcp: do not enforce TTL on cached tool by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1053](https://github.com/modelcontextprotocol/go-sdk/pull/1053)) - mcp: block server-initiated requests (SEP-2322) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1057](https://github.com/modelcontextprotocol/go-sdk/pull/1057)) - fix: extra wrapper for input response map by [@&#8203;yarolegovich](https://github.com/yarolegovich) ([#&#8203;1045](https://github.com/modelcontextprotocol/go-sdk/pull/1045)) - fix: do not `omitempty` `ReadOnlyHint` in `ToolAnnotations` by [@&#8203;pvlbzn](https://github.com/pvlbzn) ([#&#8203;908](https://github.com/modelcontextprotocol/go-sdk/pull/908)) - fix: add implementation description metadata by [@&#8203;he-yufeng](https://github.com/he-yufeng) ([#&#8203;981](https://github.com/modelcontextprotocol/go-sdk/pull/981)) - fix(mcp): prevent SIGSEGV in `AddTool` when schema is nil by [@&#8203;wucm667](https://github.com/wucm667) ([#&#8203;918](https://github.com/modelcontextprotocol/go-sdk/pull/918)) - mcp: `tool.InputSchema` and `tool.OutputSchema` validation (SEP-2106) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1009](https://github.com/modelcontextprotocol/go-sdk/pull/1009)) - mcp: update JSON-RPC error codes to align with updated MCP specification by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1016](https://github.com/modelcontextprotocol/go-sdk/pull/1016)) - mcp: bump protocol version from `2026-06-30` to `2026-07-28` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1015](https://github.com/modelcontextprotocol/go-sdk/pull/1015)) - mcp: add `2026-07-28` to the supported protocol versions by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1020](https://github.com/modelcontextprotocol/go-sdk/pull/1020)) - mcp: derive Mcp-Protocol-Version header from the outgoing message by \[[@&#8203;jan-xyz](https://github.com/jan-xyz)] Auth and OAuth: - auth: support OAuth2 session persistence by [@&#8203;smlx](https://github.com/smlx) ([#&#8203;1058](https://github.com/modelcontextprotocol/go-sdk/pull/1058)) - mcp: align resource not found error code with [SEP-2164](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2164) by [@&#8203;yarolegovich](https://github.com/yarolegovich) ([#&#8203;931](https://github.com/modelcontextprotocol/go-sdk/pull/931)) - mcp: OIDC-Flavored Refresh Token Guidance ([SEP-2207](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2207)) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;939](https://github.com/modelcontextprotocol/go-sdk/pull/939)) - mcp: add client-side scope accumulation ([SEP-2350](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2350)) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;944](https://github.com/modelcontextprotocol/go-sdk/pull/944)) - mcp: add optional issuer validator for pre-registered client validation ([SEP-2352](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2352)) by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;946](https://github.com/modelcontextprotocol/go-sdk/pull/946)) - auth: issuer mix-up mitigation ([SEP-2468](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2468)) by [@&#8203;max-stytch](https://github.com/max-stytch) ([#&#8203;859](https://github.com/modelcontextprotocol/go-sdk/pull/859)) - auth: compare auth server metadata issuer ignoring trailing slash by [@&#8203;gainsley](https://github.com/gainsley) ([#&#8203;955](https://github.com/modelcontextprotocol/go-sdk/pull/955)) - auth: bind refreshing token source to a background context, not the request ctx by [@&#8203;toabctl](https://github.com/toabctl) ([#&#8203;988](https://github.com/modelcontextprotocol/go-sdk/pull/988)) - auth: add `ClockSkew` option to `RequireBearerTokenOptions` by [@&#8203;BorisTyshkevich](https://github.com/BorisTyshkevich) ([#&#8203;969](https://github.com/modelcontextprotocol/go-sdk/pull/969)) - auth: add `AllowMissingExpiration` option to `RequireBearerTokenOptions` by [@&#8203;BorisTyshkevich](https://github.com/BorisTyshkevich) ([#&#8203;971](https://github.com/modelcontextprotocol/go-sdk/pull/971)) - oauthex: add `MatchesResource` helper (RFC 9728/8707 audience comparison) by [@&#8203;BorisTyshkevich](https://github.com/BorisTyshkevich) ([#&#8203;970](https://github.com/modelcontextprotocol/go-sdk/pull/970)) - fix: handle `oauth2.RetrieveError` during token refresh by [@&#8203;smlx](https://github.com/smlx) ([#&#8203;917](https://github.com/modelcontextprotocol/go-sdk/pull/917)) Session, keepalive and misc: - mcp: use `golang.org/x/time/rate` for `LoggingHandler` rate limiting by [@&#8203;wucm667](https://github.com/wucm667) ([#&#8203;927](https://github.com/modelcontextprotocol/go-sdk/pull/927)) - mcp: add configurable keepalive failure threshold by [@&#8203;tdabasinskas](https://github.com/tdabasinskas) ([#&#8203;982](https://github.com/modelcontextprotocol/go-sdk/pull/982)) - mcp: remove outdated comment by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1003](https://github.com/modelcontextprotocol/go-sdk/pull/1003)) Conformance tests, documentation and CI: - mcp: add integration for server conformance tests by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1054](https://github.com/modelcontextprotocol/go-sdk/pull/1054)) - mcp: add conformance tests on client by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1063](https://github.com/modelcontextprotocol/go-sdk/pull/1063)) - mcp: Upgrade conformance test to latest available deployment by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1021](https://github.com/modelcontextprotocol/go-sdk/pull/1021)) - mcp: add documentation for new protocol version by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1019](https://github.com/modelcontextprotocol/go-sdk/pull/1019)) - mcp: update docs references by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1023](https://github.com/modelcontextprotocol/go-sdk/pull/1023)) - docs: update docs by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1089](https://github.com/modelcontextprotocol/go-sdk/pull/1089)) - docs: update `troubleshoot.md` to include `resultType` by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1081](https://github.com/modelcontextprotocol/go-sdk/pull/1081)) - ci: update dependabot rules by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1059](https://github.com/modelcontextprotocol/go-sdk/pull/1059)) - ci: fix nightly runs by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) ([#&#8203;1086](https://github.com/modelcontextprotocol/go-sdk/pull/1086)) - build(deps): bump `github/codeql-action` from 4.35.1 to 4.35.2 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;922](https://github.com/modelcontextprotocol/go-sdk/pull/922)) - build(deps): bump `github/codeql-action` from 4.35.2 to 4.36.0 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;986](https://github.com/modelcontextprotocol/go-sdk/pull/986)) - build(deps): bump the codeql-action group with 3 updates by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;1064](https://github.com/modelcontextprotocol/go-sdk/pull/1064)) - build(deps): bump `actions/cache` from 5.0.4 to 5.0.5 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;923](https://github.com/modelcontextprotocol/go-sdk/pull/923)) - build(deps): bump `actions/cache` from 5.0.5 to 6.1.0 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;1065](https://github.com/modelcontextprotocol/go-sdk/pull/1065)) - build(deps): bump `actions/setup-node` from 6.3.0 to 6.4.0 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;921](https://github.com/modelcontextprotocol/go-sdk/pull/921)) - build(deps): bump `actions/upload-artifact` from 7.0.0 to 7.0.1 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;920](https://github.com/modelcontextprotocol/go-sdk/pull/920)) - build(deps): bump `actions/checkout` from 6.0.2 to 7.0.0 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;1040](https://github.com/modelcontextprotocol/go-sdk/pull/1040)) - build(deps): bump `actions/setup-python` from 6.2.0 to 6.3.0 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;1038](https://github.com/modelcontextprotocol/go-sdk/pull/1038)) - build(deps): bump `actions/setup-go` from 6.4.0 to 6.5.0 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;1066](https://github.com/modelcontextprotocol/go-sdk/pull/1066)) - build(deps): bump `github/codeql-action/upload-sarif` from 4.36.0 to 4.36.2 by [@&#8203;dependabot](https://github.com/dependabot) ([#&#8203;1039](https://github.com/modelcontextprotocol/go-sdk/pull/1039)) #### New Contributors - [@&#8203;MatyasVondraOutreach](https://github.com/MatyasVondraOutreach) made their first contribution in [#&#8203;877](https://github.com/modelcontextprotocol/go-sdk/pull/877) - [@&#8203;rafaeljusto](https://github.com/rafaeljusto) made their first contribution in [#&#8203;878](https://github.com/modelcontextprotocol/go-sdk/pull/878) - [@&#8203;begelundmuller](https://github.com/begelundmuller) made their first contribution in [#&#8203;856](https://github.com/modelcontextprotocol/go-sdk/pull/856) - [@&#8203;Dinesht04](https://github.com/Dinesht04) made their first contribution in [#&#8203;883](https://github.com/modelcontextprotocol/go-sdk/pull/883) - [@&#8203;N-Masi](https://github.com/N-Masi) made their first contribution in [#&#8203;896](https://github.com/modelcontextprotocol/go-sdk/pull/896) - [@&#8203;jpugliesi](https://github.com/jpugliesi) made their first contribution in [#&#8203;888](https://github.com/modelcontextprotocol/go-sdk/pull/888) - [@&#8203;blackwell-systems](https://github.com/blackwell-systems) made their first contribution in [#&#8203;929](https://github.com/modelcontextprotocol/go-sdk/pull/929) - [@&#8203;smlx](https://github.com/smlx) made their first contribution in [#&#8203;917](https://github.com/modelcontextprotocol/go-sdk/pull/917) - [@&#8203;yarolegovich](https://github.com/yarolegovich) made their first contribution in [#&#8203;931](https://github.com/modelcontextprotocol/go-sdk/pull/931) - [@&#8203;wucm667](https://github.com/wucm667) made their first contribution in [#&#8203;918](https://github.com/modelcontextprotocol/go-sdk/pull/918) - [@&#8203;jchangx](https://github.com/jchangx) made their first contribution in [#&#8203;938](https://github.com/modelcontextprotocol/go-sdk/pull/938) - [@&#8203;gainsley](https://github.com/gainsley) made their first contribution in [#&#8203;955](https://github.com/modelcontextprotocol/go-sdk/pull/955) - [@&#8203;he-yufeng](https://github.com/he-yufeng) made their first contribution in [#&#8203;962](https://github.com/modelcontextprotocol/go-sdk/pull/962) - [@&#8203;pvlbzn](https://github.com/pvlbzn) made their first contribution in [#&#8203;908](https://github.com/modelcontextprotocol/go-sdk/pull/908) - [@&#8203;max-stytch](https://github.com/max-stytch) made their first contribution in [#&#8203;859](https://github.com/modelcontextprotocol/go-sdk/pull/859) - [@&#8203;tdabasinskas](https://github.com/tdabasinskas) made their first contribution in [#&#8203;982](https://github.com/modelcontextprotocol/go-sdk/pull/982) - [@&#8203;BorisTyshkevich](https://github.com/BorisTyshkevich) made their first contribution in [#&#8203;971](https://github.com/modelcontextprotocol/go-sdk/pull/971) - [@&#8203;piyushbag](https://github.com/piyushbag) made their first contribution in [#&#8203;1000](https://github.com/modelcontextprotocol/go-sdk/pull/1000) - [@&#8203;toabctl](https://github.com/toabctl) made their first contribution in [#&#8203;988](https://github.com/modelcontextprotocol/go-sdk/pull/988) - [@&#8203;ychampion](https://github.com/ychampion) made their first contribution in [#&#8203;1060](https://github.com/modelcontextprotocol/go-sdk/pull/1060) - [@&#8203;jan-xyz](https://github.com/jan-xyz) made their first contribution in [#&#8203;1107](https://github.com/modelcontextprotocol/go-sdk/pull/1107) - [@&#8203;george1410](https://github.com/george1410) made their first contribution in [#&#8203;1106](https://github.com/modelcontextprotocol/go-sdk/pull/1106) **Full Changelog**: <https://github.com/modelcontextprotocol/go-sdk/compare/v1.6.0...v1.7.0> ### [`v1.6.1`](https://github.com/modelcontextprotocol/go-sdk/releases/tag/v1.6.1) [Compare Source](https://github.com/modelcontextprotocol/go-sdk/compare/v1.6.0...v1.6.1) 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 `disablecrossoriginprotection` MCPGODEBUG flag as the cross-origin protection. In v1.6.0, the cross-origin protection was disabled by default (replaced by the opt-in `enableoriginverification` flag), 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=1` skips the `Content-Type: application/json` validation on POST requests. See [#&#8203;957](https://github.com/modelcontextprotocol/go-sdk/issues/957). #### What's Changed - mcp: add MCPGPDEBUG for opt-in Content-Type check by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) in [#&#8203;972](https://github.com/modelcontextprotocol/go-sdk/pull/972) **Full Changelog**: <https://github.com/modelcontextprotocol/go-sdk/compare/v1.6.0...v1.6.1> ### [`v1.6.0`](https://github.com/modelcontextprotocol/go-sdk/releases/tag/v1.6.0) [Compare Source](https://github.com/modelcontextprotocol/go-sdk/compare/v1.5.0...v1.6.0) ***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 `ClientCredentialsHandler` for OAuth client credentials grant. #### Add `ClientCredentialsHandler` for OAuth client credentials grant Added `ClientCredentialsHandler` implementing `auth.OAuthHandler` using the OAuth 2.0 Client Credentials grant (RFC 6749 Section 4.4) for service-to-service authentication with pre-registered credentials. - extauth: add ClientCredentialsHandler for OAuth client credentials grant by [@&#8203;ravyg](https://github.com/ravyg) in [#&#8203;895](https://github.com/modelcontextprotocol/go-sdk/pull/895) #### 2026-06-30 Release related PRs - feat: add automatic application\_type inference by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) in [#&#8203;904](https://github.com/modelcontextprotocol/go-sdk/pull/904) New `application_type` field is added to the `ClientRegistrationMetadata` for DynamicClientRegistration. If not specified, the `application_type` will be inferred from the RedirectURIs. This implements [SEP-837](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/837). - feat: HTTP Header Standardization for method and name by [@&#8203;guglielmo-san](https://github.com/guglielmo-san) in [#&#8203;907](https://github.com/modelcontextprotocol/go-sdk/pull/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](https://modelcontextprotocol.io/seps/2243-http-standardization). #### Behavior Changes ##### `SetError` Behavior Change Previously the `SetError` method on `CallToolResult` always overwrote the `Content` field with the error text. Now `SetError` preserves the existing value if it has already been populated. You can restore the previous behavior by setting the environment variable `seterroroverwrite=1`. - mcp: preserve existing Content in SetError by [@&#8203;ravyg](https://github.com/ravyg) in [#&#8203;864](https://github.com/modelcontextprotocol/go-sdk/pull/864) ##### Cross-Origin Protection Default Change Previously (v1.4.1-v1.5.0) default (zero-value) cross-origin protection was applied when `CrossOriginProtection` in `StreamableHTTPOptions` was `nil`. Now cross-origin protection is not enabled by default when `CrossOriginProtection` is nil. You can restore the previous behavior (enable by default) by setting `enableoriginverification=1`. - mcp: remove default cross origin protection by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;906](https://github.com/modelcontextprotocol/go-sdk/pull/906) `disablecrossoriginprotection` was replaced by `enableoriginverification` after the default was changed to not enable cross-origin protection. `jsonescaping` option was removed, according to plan. #### Other Changes to the SDK - internal: remove unused util functions by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;871](https://github.com/modelcontextprotocol/go-sdk/pull/871) - build(deps): bump github/codeql-action from 4.32.4 to 4.35.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;873](https://github.com/modelcontextprotocol/go-sdk/pull/873) - build(deps): bump actions/setup-go from 6.3.0 to 6.4.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;874](https://github.com/modelcontextprotocol/go-sdk/pull/874) - build(deps): bump actions/setup-node from 6.2.0 to 6.3.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;875](https://github.com/modelcontextprotocol/go-sdk/pull/875) - build(deps): bump dominikh/staticcheck-action from 1.4.0 to 1.4.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;872](https://github.com/modelcontextprotocol/go-sdk/pull/872) - oauthex: accept 200 in client registration by [@&#8203;MatyasVondraOutreach](https://github.com/MatyasVondraOutreach) in [#&#8203;877](https://github.com/modelcontextprotocol/go-sdk/pull/877) - mcp: allow Content-Type parameters in streamable transport by [@&#8203;rafaeljusto](https://github.com/rafaeljusto) in [#&#8203;878](https://github.com/modelcontextprotocol/go-sdk/pull/878) - mcp: preserve existing Content in SetError by [@&#8203;ravyg](https://github.com/ravyg) in [#&#8203;864](https://github.com/modelcontextprotocol/go-sdk/pull/864) - mcp: fix race condition in `ServerSession.startKeepalive` by [@&#8203;begelundmuller](https://github.com/begelundmuller) in [#&#8203;856](https://github.com/modelcontextprotocol/go-sdk/pull/856) - chore: preserve CNAME when deploying to GitHub pages by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;884](https://github.com/modelcontextprotocol/go-sdk/pull/884) - extauth: refactor enterprise auth tests by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;879](https://github.com/modelcontextprotocol/go-sdk/pull/879) - feat: Add Support for mkdocs by [@&#8203;Dinesht04](https://github.com/Dinesht04) in [#&#8203;883](https://github.com/modelcontextprotocol/go-sdk/pull/883) - mcp: add DNS rebinding and cross origin protections to SSE transport by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;891](https://github.com/modelcontextprotocol/go-sdk/pull/891) - mcp: log out-of-band errors instead of dropping them by [@&#8203;ravyg](https://github.com/ravyg) in [#&#8203;887](https://github.com/modelcontextprotocol/go-sdk/pull/887) - mcp: don't close session when keepalive ping returns method-not-found by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;900](https://github.com/modelcontextprotocol/go-sdk/pull/900) - mcp: accept parameterized Content-Type types by [@&#8203;kalvinnchau](https://github.com/kalvinnchau) in [#&#8203;890](https://github.com/modelcontextprotocol/go-sdk/pull/890) - mcp: remove default cross origin protection by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;906](https://github.com/modelcontextprotocol/go-sdk/pull/906) - Update README.md by [@&#8203;N-Masi](https://github.com/N-Masi) in [#&#8203;896](https://github.com/modelcontextprotocol/go-sdk/pull/896) - mcp: preserve transport errors in Write error chain by [@&#8203;jpugliesi](https://github.com/jpugliesi) in [#&#8203;888](https://github.com/modelcontextprotocol/go-sdk/pull/888) - mcp: do not re-prompt OAuth after cancelled Authorize by [@&#8203;ravyg](https://github.com/ravyg) in [#&#8203;885](https://github.com/modelcontextprotocol/go-sdk/pull/885) - mcp: Upgrade jsonschema-go by [@&#8203;rafaeljusto](https://github.com/rafaeljusto) in [#&#8203;912](https://github.com/modelcontextprotocol/go-sdk/pull/912) - internal/jsonrpc2: remove unused code by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;910](https://github.com/modelcontextprotocol/go-sdk/pull/910) - MCPGODEBUG update for 1.6.0 by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;893](https://github.com/modelcontextprotocol/go-sdk/pull/893) #### New Contributors - [@&#8203;MatyasVondraOutreach](https://github.com/MatyasVondraOutreach) made their first contribution in [#&#8203;877](https://github.com/modelcontextprotocol/go-sdk/pull/877) - [@&#8203;rafaeljusto](https://github.com/rafaeljusto) made their first contribution in [#&#8203;878](https://github.com/modelcontextprotocol/go-sdk/pull/878) - [@&#8203;begelundmuller](https://github.com/begelundmuller) made their first contribution in [#&#8203;856](https://github.com/modelcontextprotocol/go-sdk/pull/856) - [@&#8203;Dinesht04](https://github.com/Dinesht04) made their first contribution in [#&#8203;883](https://github.com/modelcontextprotocol/go-sdk/pull/883) - [@&#8203;N-Masi](https://github.com/N-Masi) made their first contribution in [#&#8203;896](https://github.com/modelcontextprotocol/go-sdk/pull/896) - [@&#8203;jpugliesi](https://github.com/jpugliesi) made their first contribution in [#&#8203;888](https://github.com/modelcontextprotocol/go-sdk/pull/888) - [@&#8203;guglielmo-san](https://github.com/guglielmo-san) made their first contribution in [#&#8203;904](https://github.com/modelcontextprotocol/go-sdk/pull/904) **Full Changelog**: <https://github.com/modelcontextprotocol/go-sdk/compare/v1.5.0...v1.6.0-pre.1> ### [`v1.5.0`](https://github.com/modelcontextprotocol/go-sdk/releases/tag/v1.5.0) [Compare Source](https://github.com/modelcontextprotocol/go-sdk/compare/v1.4.1...v1.5.0) ***This release is equivalent to v1.5.0-pre.1. Thank you to those who tested the pre-release.*** In this release we introduce important enhancements to the client-side OAuth flows. We also introduce several smaller fixes and improvements. #### Stabilization of client-side OAuth APIs As previously communicated, we're stabilizing the client-side OAuth APIs in `v1.5.0`. This means that the `mcp_go_client_oauth` build tag will no longer be required to compile the functionality and standard backward compatibility guarantees apply from now on. Compared to the experimental support published in `v1.4.0`, we made some backwards incompatible changes: - `auth.AuthorizationCodeHandlerConfig.AuthorizationCodeFetcher`'s type was changed from `func(context.Context, *auth.AuthorizationArgs) (*auth.AuthorizationResult, error)` to `auth.AuthorizationCodeFetcher` which is a reusable definition carrying the same underlying function type. - `auth.AuthorizationCodeHandlerConfig.PreregisteredClientConfig` was removed and replaced with `auth.AuthorizationCodeHandlerConfig.PreregisteredClient` which uses a newly introduced `oauthex.ClientCredentials` type. The type used previously (`auth.PreregisteredClientConfig`) has been removed. - Deprecated functionality has been removed from both `auth` and `oauthex` packages. * all: stabilize client OAuth support by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;861](https://github.com/modelcontextprotocol/go-sdk/pull/861) #### Enterprise Managed Authorization support added Support for [Enterprise Managed Authorization](https://modelcontextprotocol.io/extensions/auth/enterprise-managed-authorization) has been added to `auth/extauth` package. Huge thanks to [@&#8203;radar07](https://github.com/radar07) for the implementation! - Enterprise managed authorization by [@&#8203;radar07](https://github.com/radar07) in [#&#8203;770](https://github.com/modelcontextprotocol/go-sdk/pull/770) **Note:** this support is part of an official MCP extension and is not part of the core protocol. The support of this functionality is not covered by the principles defined in [SDK tiers](https://modelcontextprotocol.io/community/sdk-tiers). #### Other changes to the SDK - examples: fix OAuth client example after latest changes. by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;820](https://github.com/modelcontextprotocol/go-sdk/pull/820) - build(deps): bump actions/upload-artifact from 4.6.1 to 7.0.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;824](https://github.com/modelcontextprotocol/go-sdk/pull/824) - build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.3 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;825](https://github.com/modelcontextprotocol/go-sdk/pull/825) - build(deps): bump actions/setup-go from 6.2.0 to 6.3.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;827](https://github.com/modelcontextprotocol/go-sdk/pull/827) - build(deps): bump actions/checkout from 4.2.2 to 6.0.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;826](https://github.com/modelcontextprotocol/go-sdk/pull/826) - mcp: simplify and unify unit tests introduced for sampling with tools. by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;799](https://github.com/modelcontextprotocol/go-sdk/pull/799) - auth: fix 2025-03-26 backcompat by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;821](https://github.com/modelcontextprotocol/go-sdk/pull/821) - chore: update deps after v1.4.0 release by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;829](https://github.com/modelcontextprotocol/go-sdk/pull/829) - build(deps): bump github/codeql-action from 3 to 4 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;823](https://github.com/modelcontextprotocol/go-sdk/pull/823) - mcp: update latestProtocolVersion to 2025-11-25 by [@&#8203;findleyr](https://github.com/findleyr) in [#&#8203;724](https://github.com/modelcontextprotocol/go-sdk/pull/724) - mcp: protect ioConn.protocolVersion with a mutex by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;832](https://github.com/modelcontextprotocol/go-sdk/pull/832) - examples: add an example that display header forwarding. by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;836](https://github.com/modelcontextprotocol/go-sdk/pull/836) - internal: fix Unicode zero character handling by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;841](https://github.com/modelcontextprotocol/go-sdk/pull/841) - auth: allow passing custom http.Client to AuthorizationCodeHandler by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;840](https://github.com/modelcontextprotocol/go-sdk/pull/840) - mcp: verify 'Origin' and 'Content-Type' headers by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;842](https://github.com/modelcontextprotocol/go-sdk/pull/842) - auth: return scope in WWW-Authenticate header. by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;834](https://github.com/modelcontextprotocol/go-sdk/pull/834) - mcp: fix setProgressToken when Meta is nil by [@&#8203;StevenRChen](https://github.com/StevenRChen) in [#&#8203;846](https://github.com/modelcontextprotocol/go-sdk/pull/846) - all: clean up Go 1.24 specific code. by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;850](https://github.com/modelcontextprotocol/go-sdk/pull/850) - mcp: re-enable race test after fixing data races by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;851](https://github.com/modelcontextprotocol/go-sdk/pull/851) - mcp: handle empty chunks in MemoryEventStore by [@&#8203;jba](https://github.com/jba) in [#&#8203;862](https://github.com/modelcontextprotocol/go-sdk/pull/862) - oauthex: use internal JSON library for decoding. by [@&#8203;maciej-kisiel](https://github.com/maciej-kisiel) in [#&#8203;866](https://github.com/modelcontextprotocol/go-sdk/pull/866) - all: fix typos by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;869](https://github.com/modelcontextprotocol/go-sdk/pull/869) - mcp: return input validation errors as tool results, not JSON-RPC errors by [@&#8203;ravyg](https://github.com/ravyg) in [#&#8203;863](https://github.com/modelcontextprotocol/go-sdk/pull/863) - all: modernize code by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;868](https://github.com/modelcontextprotocol/go-sdk/pull/868) - mcp: accept parameterized Accept media types by [@&#8203;kalvinnchau](https://github.com/kalvinnchau) in [#&#8203;853](https://github.com/modelcontextprotocol/go-sdk/pull/853) - mcp: use http.ResponseController to ensure writes are flushed by [@&#8203;toofishes](https://github.com/toofishes) in [#&#8203;870](https://github.com/modelcontextprotocol/go-sdk/pull/870) #### New Contributors - [@&#8203;StevenRChen](https://github.com/StevenRChen) made their first contribution in [#&#8203;846](https://github.com/modelcontextprotocol/go-sdk/pull/846) - [@&#8203;radar07](https://github.com/radar07) made their first contribution in [#&#8203;770](https://github.com/modelcontextprotocol/go-sdk/pull/770) - [@&#8203;alexandear](https://github.com/alexandear) made their first contribution in [#&#8203;869](https://github.com/modelcontextprotocol/go-sdk/pull/869) - [@&#8203;ravyg](https://github.com/ravyg) made their first contribution in [#&#8203;863](https://github.com/modelcontextprotocol/go-sdk/pull/863) - [@&#8203;kalvinnchau](https://github.com/kalvinnchau) made their first contribution in [#&#8203;853](https://github.com/modelcontextprotocol/go-sdk/pull/853) - [@&#8203;toofishes](https://github.com/toofishes) made their first contribution in [#&#8203;870](https://github.com/modelcontextprotocol/go-sdk/pull/870) **Full Changelog**: <https://github.com/modelcontextprotocol/go-sdk/compare/v1.4.1...v1.5.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My43Ni40IiwidXBkYXRlZEluVmVyIjoiNDMuMjg1LjYiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.5.0
All checks were successful
ci / trivy (pull_request) Successful in 15s
3097c2088b
Author
Member

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 2 additional dependencies were updated

Details:

Package Change
github.com/google/jsonschema-go v0.4.2 -> v0.4.3
golang.org/x/oauth2 v0.34.0 -> v0.35.0
### ℹ️ Artifact update notice ##### File name: go.mod In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s): - 2 additional dependencies were updated Details: | **Package** | **Change** | | :-------------------------------- | :--------------------- | | `github.com/google/jsonschema-go` | `v0.4.2` -> `v0.4.3` | | `golang.org/x/oauth2` | `v0.34.0` -> `v0.35.0` |
sa-renovate changed title from chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.5.0 to chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.6.0 2026-05-01 03:04:17 +00:00
sa-renovate force-pushed renovate/github.com-modelcontextprotocol-go-sdk-1.x from 3097c2088b
All checks were successful
ci / trivy (pull_request) Successful in 15s
to 9f8fcc5cd8
All checks were successful
ci / trivy (pull_request) Successful in 14s
2026-05-01 03:04:17 +00:00
Compare
sa-renovate changed title from chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.6.0 to chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.6.1 2026-05-23 03:04:19 +00:00
sa-renovate force-pushed renovate/github.com-modelcontextprotocol-go-sdk-1.x from 9f8fcc5cd8
All checks were successful
ci / trivy (pull_request) Successful in 14s
to 927cba130b
All checks were successful
ci / trivy (pull_request) Successful in 14s
2026-05-23 03:04:19 +00:00
Compare
sa-renovate changed title from chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.6.1 to chore(deps): update module github.com/modelcontextprotocol/go-sdk to v1.7.0 2026-07-28 13:51:32 +00:00
sa-renovate force-pushed renovate/github.com-modelcontextprotocol-go-sdk-1.x from 927cba130b
All checks were successful
ci / trivy (pull_request) Successful in 14s
to 838e8b643c
All checks were successful
ci / trivy (pull_request) Successful in 32s
2026-07-28 13:51:33 +00:00
Compare
All checks were successful
ci / trivy (pull_request) Successful in 32s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/github.com-modelcontextprotocol-go-sdk-1.x:renovate/github.com-modelcontextprotocol-go-sdk-1.x
git switch renovate/github.com-modelcontextprotocol-go-sdk-1.x

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff renovate/github.com-modelcontextprotocol-go-sdk-1.x
git switch renovate/github.com-modelcontextprotocol-go-sdk-1.x
git rebase main
git switch main
git merge --ff-only renovate/github.com-modelcontextprotocol-go-sdk-1.x
git switch renovate/github.com-modelcontextprotocol-go-sdk-1.x
git rebase main
git switch main
git merge --no-ff renovate/github.com-modelcontextprotocol-go-sdk-1.x
git switch main
git merge --squash renovate/github.com-modelcontextprotocol-go-sdk-1.x
git switch main
git merge --ff-only renovate/github.com-modelcontextprotocol-go-sdk-1.x
git switch main
git merge renovate/github.com-modelcontextprotocol-go-sdk-1.x
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
DevFW-CICD/edge-connect-mcp!8
No description provided.