百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

go-mcp

> 编程语言
开源

Go-MCP 是一个强大的 Go (Golang) 版本的 MCP SDK,它实现了模型上下文协议 (MCP),可促进外部系统与 Go 程序之间的无缝通信。

672 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Go-MCP 是一个强大的 Go (Golang) 版本的 MCP SDK,它实现了模型上下文协议 (MCP),可促进外部系统与 Go 程序之间的无缝通信。

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

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