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 https://github.com/modelcontextprotocol/go-sdk/pull/895
2026-06-30 Release related PRs
-
feat: add automatic application_type inference by @guglielmo-san in https://github.com/modelcontextprotocol/go-sdk/pull/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 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.
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 @ravyg in 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 @maciej-kisiel in 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 @alexandear in https://github.com/modelcontextprotocol/go-sdk/pull/871
- build(deps): bump github/codeql-action from 4.32.4 to 4.35.1 by @dependabot[bot] in https://github.com/modelcontextprotocol/go-sdk/pull/873
- build(deps): bump actions/setup-go from 6.3.0 to 6.4.0 by @dependabot[bot] in https://github.com/modelcontextprotocol/go-sdk/pull/874
- build(deps): bump actions/setup-node from 6.2.0 to 6.3.0 by @dependabot[bot] in https://github.com/modelcontextprotocol/go-sdk/pull/875
- build(deps): bump dominikh/staticcheck-action from 1.4.0 to 1.4.1 by @dependabot[bot] in https://github.com/modelcontextprotocol/go-sdk/pull/872
- oauthex: accept 200 in client registration by @MatyasVondraOutreach in https://github.com/modelcontextprotocol/go-sdk/pull/877
- mcp: allow Content-Type parameters in streamable transport by @rafaeljusto in https://github.com/modelcontextprotocol/go-sdk/pull/878
- mcp: preserve existing Content in SetError by @ravyg in https://github.com/modelcontextprotocol/go-sdk/pull/864
- mcp: fix race condition in
ServerSession.startKeepaliveby @begelundmuller in https://github.com/modelcontextprotocol/go-sdk/pull/856 - chore: preserve CNAME when deploying to GitHub pages by @maciej-kisiel in https://github.com/modelcontextprotocol/go-sdk/pull/884
- extauth: refactor enterprise auth tests by @maciej-kisiel in https://github.com/modelcontextprotocol/go-sdk/pull/879
- feat: Add Support for mkdocs by @Dinesht04 in https://github.com/modelcontextprotocol/go-sdk/pull/883
- mcp: add DNS rebinding and cross origin protections to SSE transport by @maciej-kisiel in https://github.com/modelcontextprotocol/go-sdk/pull/891
- mcp: log out-of-band errors instead of dropping them by @ravyg in https://github.com/modelcontextprotocol/go-sdk/pull/887
- mcp: don't close session when keepalive ping returns method-not-found by @maciej-kisiel in https://github.com/modelcontextprotocol/go-sdk/pull/900
- mcp: accept parameterized Content-Type types by @kalvinnchau in https://github.com/modelcontextprotocol/go-sdk/pull/890
- mcp: remove default cross origin protection by @maciej-kisiel in https://github.com/modelcontextprotocol/go-sdk/pull/906
- Update README.md by @N-Masi in https://github.com/modelcontextprotocol/go-sdk/pull/896
- mcp: preserve transport errors in Write error chain by @jpugliesi in https://github.com/modelcontextprotocol/go-sdk/pull/888
- mcp: do not re-prompt OAuth after cancelled Authorize by @ravyg in https://github.com/modelcontextprotocol/go-sdk/pull/885
- mcp: Upgrade jsonschema-go by @rafaeljusto in https://github.com/modelcontextprotocol/go-sdk/pull/912
- internal/jsonrpc2: remove unused code by @maciej-kisiel in https://github.com/modelcontextprotocol/go-sdk/pull/910
- MCPGODEBUG update for 1.6.0 by @maciej-kisiel in https://github.com/modelcontextprotocol/go-sdk/pull/893
New Contributors
- @MatyasVondraOutreach made their first contribution in https://github.com/modelcontextprotocol/go-sdk/pull/877
- @rafaeljusto made their first contribution in https://github.com/modelcontextprotocol/go-sdk/pull/878
- @begelundmuller made their first contribution in https://github.com/modelcontextprotocol/go-sdk/pull/856
- @Dinesht04 made their first contribution in https://github.com/modelcontextprotocol/go-sdk/pull/883
- @N-Masi made their first contribution in https://github.com/modelcontextprotocol/go-sdk/pull/896
- @jpugliesi made their first contribution in https://github.com/modelcontextprotocol/go-sdk/pull/888
- @guglielmo-san made their first contribution in 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