Go SDK for Model Context Protocol (MCP) servers and clients. It implements MCP in Go, with multiple packages for core APIs, transports, and auth extensions.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
The MCP Go SDK is an implementation of the official Go software development kit (SDK) for the Model Context Protocol (MCP).
How it works
The SDK comprises several importable packages:
- mcp: primary APIs for constructing and using MCP clients and servers
- jsonrpc: for users implementing their own transports
- auth: primitives for supporting OAuth
- oauthex: extensions to the OAuth protocol (e.g., ProtectedResourceMetadata) The repository includes a docs directory with feature documentation and a compatibility table linking SDK versions to MCP spec versions.
Getting started examples show creating an mcp.Server, adding a tool, and running over an mcp.Transport, as well as creating an mcp.Client to connect over a CommandTransport or similar transport.
Getting started
Getting started code examples demonstrate server creation and client connection:
package main
import (
"context"
"log"
"github.com/modelcontextprotocol/go-sdk/mcp"
)
// server example omitted for brevity
package main
import (
"context"
"log"
"os/exec"
"github.com/modelcontextprotocol/go-sdk/mcp"
)
func main() {
ctx := context.Background()
client := mcp.NewClient(&mcp.Implementation{Name: "mcp-client", Version: "v1.0.0"}, nil)
transport := &mcp.CommandTransport{Command: exec.Command("myserver")}
session, err := client.Connect(ctx, transport, nil)
if err != nil {
log.Fatal(err)
}
defer session.Close()
// CallTool example omitted for brevity
}
The README also notes a directory with more example clients and servers.
Recent releases
Latest releases include:
- v1.7.0 (2026-07-28): full support for protocol version 2026-07-28; wire protocol rewritten with stateless model and per-request _meta; server/discover RPC replaces i
- v1.7.0-pre.3 (2026-07-17): follow-up pre-release targeting protocol 2026-07-28
- v1.7.0-pre.2 (2026-07-09): pre-release on top of v1.7.0-pre.1
- v1.7.0-pre.1 (2026-06-24): v1.7.0—MCP 2026-07-28
- v1.6.1 (2026-05-22): MCPGODEBUG flag to opt out of the Content-Type check on POST requests
Traction
The repository shows 4931 stars and 492 forks. There are 83 open issues.
License
The project is licensed under Apache 2.0 for new contributions, with existing code under MIT (see LICENSE).






