MCP Go

Active
GitHub Go MIT

Description

Go implementation of the Model Context Protocol SDK enabling seamless integration between LLM applications and external data sources and tools

Key Features

  • Native Go MCP protocol implementation: complete Model Context Protocol SDK supporting Resources, Tools, and Prompts
  • Minimal API design: build MCP servers with minimal boilerplate and built-in type-safe argument access helpers
  • Multiple transport layers: supports stdio, HTTP SSE and other communication methods
  • Session management and middleware: per-session tool filtering, Tool Handler middleware, and request hooks
  • Backward-compatible with multiple MCP spec versions: 2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05
  • OAuth protected resource metadata: built-in OAuth authentication support

Use Cases

💡 Building custom MCP tool servers: wrapping internal APIs and data sources as LLM-callable tools
💡 Integrating external data sources for AI agents: securely accessing databases and file systems via MCP protocol
💡 Developing AI IDE plugins for Claude Desktop / Cursor: writing high-performance MCP servers in Go
💡 Enterprise LLM data gateway: unified management of access and authentication for multiple external services

Quick Start

1. Install Go 1.21+
2. Run: go get github.com/mark3labs/mcp-go
3. Create main.go importing mcp and server packages
4. Create server instance with server.NewMCPServer()
5. Register tools and handlers via s.AddTool()
6. Start the server with server.ServeStdio(s)

Related Projects