The go-sdk repository is the official Go software development kit for the Model Context Protocol, maintained in collaboration with Google. It provides a complete implementation enabling developers to build MCP servers and clients in Go, with the SDK designed to implement the full MCP specification across multiple versions.
The repository is organized into several importable packages that serve different purposes. The primary mcp package defines the core APIs for constructing and using MCP clients and servers. The jsonrpc package supports users implementing custom transports, while the auth package provides primitives for OAuth support. The oauthex package extends OAuth functionality with features like ProtectedResourceMetadata. The docs directory contains feature documentation that maps the MCP specification to these packages.
Version compatibility is carefully maintained across SDK releases. SDK version 1.7.0 and later support the latest MCP spec from 2026-07-28 while maintaining backward compatibility with earlier specifications including 2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05. Earlier SDK versions support progressively older spec versions, with v1.0.0 through v1.1.0 supporting specs back to 2024-11-05. The SDK notes that roots, sampling, and logging features were deprecated as of protocol version 2026-07-28 but continue to be supported for compatibility during a deprecation window of at least twelve months.
The repository demonstrates strong maintenance and community engagement.
Getting started with the SDK involves creating an mcp.Server instance, adding features to it, and running it over an mcp.Transport. The repository includes an examples directory with sample clients and servers demonstrating practical usage patterns. The project welcomes contributions and acknowledges the ecosystem of third-party Go MCP SDKs that inspired its development, including mcp-go, mcp-golang, and go-mcp.
The project targets only supported versions of Go according to Go's official release policy, ensuring compatibility with current language standards.