About this project

This repository provides the official Go software development kit (SDK) for the Model Context Protocol (MCP), maintained in collaboration with Google. It enables Go developers to create robust MCP servers and clients that facilitate communication between AI models and external tools or data sources. The SDK is structured into several importable packages: - The `mcp` package contains the primary APIs for constructing and managing MCP clients and servers. - The `jsonrpc` package assists developers in implementing custom transport layers. - The `auth` package offers primitives for OAuth support. - The `oauthex` package provides extensions to the OAuth protocol, such as ProtectedResourceMetadata. The SDK aims to implement the full MCP specification, with version compatibility tracking updates from the initial 2024-11-05 spec up to the latest 2026-07-28 version. It includes deprecation windows for legacy features like roots, sampling, and logging to ensure backward compatibility. The repository includes comprehensive documentation, getting-started guides, and code examples demonstrating how to build a simple greeter server and a corresponding client that invokes its tools. It is licensed under Apache 2.0 for new contributions, with existing code remaining under the MIT license. The project also acknowledges alternative Go MCP SDKs like mcp-go, mcp-golang, and go-mcp, fostering a thriving ecosystem.