mcp-go is a Go implementation of the Model Context Protocol (MCP) providing an SDK and framework for building servers that connect large language model applications to external tools and data sources. It serves as a developer kit for implementing bidirectional communication and structured data exchange between AI clients and servers.
The framework enables the creation of executable tools with structured output schemas, reusable prompt templates, and data resource exposure via URI templates. It supports multiple transport layers, including stdio, HTTP, and Server-Sent Events, using a transport-agnostic message bus to decouple protocol logic from the communication channel.
The library includes capabilities for session-based context tracking, capability filtering, and handler middleware for logging and error recovery. It further provides observability through request tracing and lifecycle hooks, as well as security configurations for CORS and OAuth metadata exposure.