Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go-mcp

> 编程语言
Open source

Go-MCP is a powerful Go(Golang) version of the MCP SDK that implements the Model Context Protocol (MCP) to facilitate seamless communication between external sy

672 stars0 likes0 views
WebsiteGitHub

About

Go-MCP is a powerful Go(Golang) version of the MCP SDK that implements the Model Context Protocol (MCP) to facilitate seamless communication between external sy

Go-MCP

简体中文 | 繁體中文 | Tiếng Việt

Overview

Go-MCP is a powerful Go version of the MCP SDK that implements the Model Context Protocol (MCP) to facilitate seamless communication between external systems and AI applications. Based on the strong typing and performance advantages of the Go language, it provides a concise and idiomatic API to facilitate your integration of external systems into AI applications.

✨ Key Features

  • Complete Protocol Implementation: Full implementation of the MCP specification, ensuring seamless integration with all compatible services
  • ️ Elegant Architecture Design: Adopts a clear three-layer architecture, supports bidirectional communication, ensuring code modularity and extensibility
  • Seamless Integration with Web Frameworks: Provides MCP protocol-compliant http.Handler, allowing developers to integrate MCP into their service frameworks
  • ️ Type Safety: Leverages Go's strong type system for clear, highly maintainable code
  • Simple Deployment: Benefits from Go's static compilation, eliminating complex dependency management
  • ⚡ High-Performance Design: Fully utilizes Go's concurrency capabilities, maintaining excellent performance and low resource overhead across various scenarios

️ Installation

bash
go get github.com/ThinkInAIXYZ/go-mcp

Requires Go 1.18 or higher.

Quick Start

Client Example

…

Server Example

…

Integration With Gin Server

…

Reference:A more complete example

️ Architecture Design

Go-MCP adopts an elegant three-layer architecture:

  1. Transport Layer: Handles underlying communication implementation, supporting multiple transport protocols
  2. Protocol Layer: Handles MCP protocol encoding/decoding and data structure definitions
  3. User Layer: Provides friendly client and server APIs

Currently supported transport methods:

  • HTTP SSE/POST: HTTP-based server push and client requests, suitable for web scenarios
  • Streamable HTTP: Supports HTTP POST/GET requests with both stateless and stateful modes, where stateful mode utilizes SSE for multi-message streaming to enable server-to-client notifications and requests
  • Stdio: Standard input/output stream-based, suitable for local inter-process communication

The transport layer uses a unified interface abstraction, making it simple to add new transport methods (like Streamable HTTP, WebSocket, gRPC) without affecting upper-layer code.

Contributing

We welcome all forms of contributions! Please see CONTRIBUTING.md for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact Us

  • GitHub Issues: Submit an issue
  • Discord: Click here to join our user group
  • WeChat Group:

✨ Contributors

Thanks to all developers who have contributed to this project!

Project Trends

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言