go-sdk  by modelcontextprotocol

Go SDK for Model Context Protocol (MCP)

created 3 months ago
1,267 stars

Top 31.9% on sourcepulse

GitHubView on GitHub
Project Summary

This Go SDK provides an implementation for the Model Context Protocol (MCP), enabling Go developers to build clients and servers that communicate using this protocol. It targets developers creating distributed AI systems or integrating with existing MCP-based services, offering a structured way to define and interact with AI tools.

How It Works

The SDK is built around two core packages: mcp for client/server interactions and jsonschema for defining tool schemas. It facilitates communication over various transports, including standard input/output (stdin/stdout) via CommandTransport for sidecar processes, and potentially others. The design emphasizes clear API definitions for constructing clients and servers, registering tools with defined inputs and outputs, and managing the communication lifecycle.

Quick Start & Requirements

  • Install: go get github.com/modelcontextprotocol/go-sdk
  • Prerequisites: Go toolchain.
  • Examples: Located in the examples/ directory.
  • Documentation: Package documentation is available via Go's standard tooling.

Highlighted Details

  • Implements the official Model Context Protocol for Go.
  • Supports defining MCP clients and servers with tools.
  • Includes a JSON Schema implementation for tool input/output validation.
  • Provides example code for client-server communication over stdin/stdout.

Maintenance & Community

The project acknowledges inspiration from existing Go MCP SDKs like mcp-go, mcp-golang, and go-mcp. Further design discussions are encouraged in issues and discussions.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The SDK is explicitly marked as unreleased, unstable, and subject to breaking changes. A stable release is targeted for August 2025. Users are advised not to use it in production environments and to report bugs or API proposals via the issue tracker.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
70
Issues (30d)
56
Star History
1,358 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
1 more.

fastmcp by punkpeye

3.7%
2k
TypeScript framework for building MCP servers handling client sessions
created 7 months ago
updated 2 days ago
Starred by Didier Lopes Didier Lopes(Founder of OpenBB), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
2 more.

fastmcp by jlowin

2.2%
15k
Pythonic SDK for building Model Context Protocol (MCP) servers/clients
created 8 months ago
updated 11 hours ago
Feedback? Help us improve.