# go-sdk

> The official Go SDK for Model Context Protocol servers and clients. Maintained in collaboration with Google.

- **URL**: https://www.freshcrate.ai/projects/go-sdk
- **Author**: modelcontextprotocol
- **Category**: MCP Servers
- **Latest version**: `v1.6.1` (2026-05-22)
- **License**: NOASSERTION
- **Source**: https://github.com/modelcontextprotocol/go-sdk
- **Homepage**: https://modelcontextprotocol.io
- **Language**: Go
- **GitHub**: 4,406 stars, 411 forks
- **Registry**: github
- **Tags**: `go`, `mcp`

## Description

The official Go SDK for Model Context Protocol servers and clients. Maintained in collaboration with Google.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v1.6.1` | 2026-05-22 | High | 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. |
| `v1.6.0` | 2026-05-08 | High | _**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 Credentia |
| `v1.5.0` | 2026-04-07 | High | _**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 ba |
| `v1.5.0-pre.1` | 2026-03-31 | Medium | 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 |
| `v1.4.1` | 2026-03-13 | Low | _**This release is a patch release for v1.4.0.**_  It contains cherry-picks for several security improvements. Security advisories will follow.  # Fixes  ## Update of the `segmentio/encoding` module version  The JSON parsing library that was adopted to avoid attacks taking advantage of the Go's standard parser being case insensitive turned out to contain an issue itself. We have submitted the fix upstream and this release updates the dependency to the patched version.  ## Cross-origin |
| `v1.4.0` | 2026-02-27 | Low | This release marks the completion of the full 2025-11-25 specification implementation, by introducing the support for Sampling with Tools and experimental client-side OAuth support. It also contains multiple bug fixes and improvements. Thanks to all contributors!  ## Client-side OAuth support This release introduces experimental support for OAuth on the client side of the SDK. It aims to support the full scope of the current [MCP specification for authorization](https://modelcontextprotocol.i |
| `v1.3.1` | 2026-02-18 | Low | _**This release is a patch release for v1.3.0.**_  It contains a cherry-pick for a security issue reported in #805, which takes advantage of the default behavior of Go's standard library JSON decoder that allows case-insensitive matches to struct field names (or "json" tags). The issue has been addressed by changing the JSON decoder to one that supports case sensitive matching.  ## Fixes * all: use case-sensitive JSON unmarshaling by @maciej-kisiel in https://github.com/modelcontextprotocol |
| `v1.3.0` | 2026-02-09 | Low | _**This release is equivalent to v1.3.0-pre.1. Thank you to those who tested the pre-release.**_  This release includes several enhancements and bugfixes. Worth mentioning is the addition of schema caching, which significantly improves the performance in some stateless server deployment scenarios.  ## Dependency updates * go.mod: upgrade to jsonschema v0.4.2 by @jba in https://github.com/modelcontextprotocol/go-sdk/pull/732  ## Enhancements * perf: add schema caching to avoid repeated re |
| `v1.3.0-pre.1` | 2026-01-27 | Low | This release includes several enhancements and bugfixes. Worth mentioning is the addition of schema caching, which significantly improves the performance in some stateless server deployment scenarios.  ## Dependency updates * go.mod: upgrade to jsonschema v0.4.2 by @jba in https://github.com/modelcontextprotocol/go-sdk/pull/732  ## Enhancements * perf: add schema caching to avoid repeated reflection by @SamMorrowDrums in https://github.com/modelcontextprotocol/go-sdk/pull/685 * mcp: add D |
| `v1.2.0` | 2025-12-22 | Low | _**This release is equivalent to v1.2.0-pre.2. Thank you to those who tested the prerelease.**_  This release adds partial support for the [2025-11-25 version](https://modelcontextprotocol.io/specification/2025-11-25/changelog) of the MCP spec and fixes some bugs in the streamable transports. It also includes some minor new APIs, changes to contributing flows, and small bugfixes.  ## Contributing changes  * CONTRIBUTING.md is updated to remove the ad-hoc antitrust policy (#651), and add a |

## Citation

- HTML: https://www.freshcrate.ai/projects/go-sdk
- Markdown: https://www.freshcrate.ai/projects/go-sdk.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/go-sdk/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
