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 fromfunc(context.Context, *auth.AuthorizationArgs) (*auth.AuthorizationResult, error)toauth.AuthorizationCodeFetcherwhich is a reusable definition carrying the same underlying function type.auth.AuthorizationCodeHandlerConfig.PreregisteredClientConfigwas removed and replaced withauth.AuthorizationCodeHandlerConfig.PreregisteredClientwhich uses a newly introducedoauthex.ClientCredentialstype. The type used previously (auth.PreregisteredClientConfig) has been removed.- Deprecated functionality has been removed from both
authandoauthexpackages.
- all: stabilize client OAuth support by @maciej-kisiel in #861
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
- examples: fix OAuth client example after latest changes. by @maciej-kisiel in #820
- build(deps): bump actions/upload-artifact from 4.6.1 to 7.0.0 by @dependabot[bot] in #824
- build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.3 by @dependabot[bot] in #825
- build(deps): bump actions/setup-go from 6.2.0 to 6.3.0 by @dependabot[bot] in #827
- build(deps): bump actions/checkout from 4.2.2 to 6.0.2 by @dependabot[bot] in #826
- mcp: simplify and unify unit tests introduced for sampling with tools. by @maciej-kisiel in #799
- auth: fix 2025-03-26 backcompat by @maciej-kisiel in #821
- chore: update deps after v1.4.0 release by @maciej-kisiel in #829
- build(deps): bump github/codeql-action from 3 to 4 by @dependabot[bot] in #823
- mcp: update latestProtocolVersion to 2025-11-25 by @findleyr in #724
- mcp: protect ioConn.protocolVersion with a mutex by @maciej-kisiel in #832
- examples: add an example that display header forwarding. by @maciej-kisiel in #836
- internal: fix Unicode zero character handling by @maciej-kisiel in #841
- auth: allow passing custom http.Client to AuthorizationCodeHandler by @maciej-kisiel in #840
- mcp: verify 'Origin' and 'Content-Type' headers by @maciej-kisiel in #842
- auth: return scope in WWW-Authenticate header. by @maciej-kisiel in #834
- mcp: fix setProgressToken when Meta is nil by @StevenRChen in #846
- all: clean up Go 1.24 specific code. by @maciej-kisiel in #850
- mcp: re-enable race test after fixing data races by @maciej-kisiel in #851
- mcp: handle empty chunks in MemoryEventStore by @jba in #862
- oauthex: use internal JSON library for decoding. by @maciej-kisiel in #866
- all: fix typos by @alexandear in #869
- mcp: return input validation errors as tool results, not JSON-RPC errors by @ravyg in #863
- all: modernize code by @alexandear in #868
- mcp: accept parameterized Accept media types by @kalvinnchau in #853
- mcp: use http.ResponseController to ensure writes are flushed by @toofishes in #870
New Contributors
- @StevenRChen made their first contribution in #846
- @radar07 made their first contribution in #770
- @alexandear made their first contribution in #869
- @ravyg made their first contribution in #863
- @kalvinnchau made their first contribution in #853
- @toofishes made their first contribution in #870
Full Changelog: v1.4.1...v1.5.0-pre.1