mcp-golang  by metoro-io

Go SDK for Model Context Protocol server/client development

created 7 months ago
1,081 stars

Top 35.7% on sourcepulse

GitHubView on GitHub
Project Summary

This Go library implements the Model Context Protocol (MCP), enabling developers to build MCP servers and clients with minimal boilerplate. It targets AI developers and engineers building applications that interact with large language models (LLMs) or other AI services, offering type-safe argument handling and flexible transport options.

How It Works

The library leverages Go structs with JSON schema tags to define tool arguments, automatically generating schemas for deserialization and validation. It supports custom transports, including stdio for full bidirectional communication and http for stateless interactions, allowing developers to choose the best fit for their needs. The modular design separates transport, protocol, and server/client components for flexibility.

Quick Start & Requirements

Highlighted Details

  • Type-safe argument definition using native Go structs with JSON schema tags.
  • Automatic schema generation, deserialization, and error handling.
  • Built-in stdio (bidirectional) and http (stateless) transports, with Gin integration.
  • Support for tools, prompts, and resources with change notifications and pagination.
  • Client library for interacting with MCP servers.

Maintenance & Community

  • Active development with a clear feature roadmap.
  • Discord server available for support and discussion.
  • Contributions are welcomed.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and integration with closed-source projects.

Limitations & Caveats

  • HTTPS with custom authentication for HTTP transport is listed as "in progress" and not yet supported.
  • HTTP transports are stateless and do not support bidirectional features like notifications.
Health Check
Last commit

3 weeks ago

Responsiveness

1 week

Pull Requests (30d)
4
Issues (30d)
2
Star History
301 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
Feedback? Help us improve.