mcp-golang  by metoro-io

Go SDK for Model Context Protocol server/client development

Created 9 months ago
1,134 stars

Top 33.9% 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

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
0
Star History
33 stars in the last 30 days

Explore Similar Projects

Starred by Jason Knight Jason Knight(Director AI Compilers at NVIDIA; Cofounder of OctoML) and Georgios Konstantopoulos Georgios Konstantopoulos(CTO, General Partner at Paradigm).

rust-sdk by modelcontextprotocol

2.4%
2k
Rust SDK for Model Context Protocol
Created 7 months ago
Updated 1 day ago
Feedback? Help us improve.