Go MCP SDK
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 systems and AI applications.
What is Go MCP SDK?
Go MCP SDK is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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 systems and ai applications.
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 systems and AI applications.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Go-MCP is a powerful Go(Golang) version of the MCP SDK that
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx goConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Go MCP SDK
go-mcp is a Go (Golang) SDK that implements the full Model Context Protocol specification, enabling Go developers to build both MCP servers and clients that integrate seamlessly with AI applications. It supports HTTP SSE/POST, Streamable HTTP, and stdio transports with a clean three-layer architecture spanning transport, protocol, and user layers. Go developers use it to embed MCP tool endpoints directly in existing Go web services (Gin, Echo, etc.) or ship standalone MCP servers as single binary executables.
Prerequisites
- Go 1.18 or higher installed
- A Go module initialized in your project (go mod init)
- An MCP client such as Claude Desktop to test the server
- Optional: a Go web framework (Gin, Echo, etc.) if embedding in an existing HTTP server
Install the go-mcp package
Add go-mcp to your Go module using go get. This downloads the library and adds it to your go.mod.
go get github.com/ThinkInAIXYZ/go-mcpCreate a simple MCP server with a tool
Import the library, create an SSE transport server, register your custom tool with RegisterTool, and call Run to start serving.
package main
import (
"github.com/ThinkInAIXYZ/go-mcp/server"
"github.com/ThinkInAIXYZ/go-mcp/transport"
)
func main() {
t, _ := transport.NewSSEServerTransport(":8080")
s, _ := server.NewServer(t)
s.RegisterTool("current_time", "Returns the current time in a given timezone",
func(req map[string]any) (any, error) {
timezone, _ := req["timezone"].(string)
// return formatted time for timezone
return map[string]string{"time": "2025-01-01T12:00:00Z", "timezone": timezone}, nil
},
map[string]any{
"type": "object",
"properties": map[string]any{
"timezone": map[string]string{"type": "string", "description": "IANA timezone name"},
},
"required": []string{"timezone"},
},
)
s.Run()
}Build and run the server binary
Compile your Go MCP server to a single binary and run it. The binary listens on the configured port or stdio.
go build -o mcp-server .
./mcp-serverConfigure Claude Desktop to connect via stdio
For a stdio-based Go MCP server, set the command to your compiled binary path in claude_desktop_config.json.
{
"mcpServers": {
"go-mcp-server": {
"command": "/path/to/your/mcp-server"
}
}
}Create an MCP client to list and call tools
Use the client package to connect to any running MCP server, list its tools, and invoke them programmatically from Go.
package main
import (
"fmt"
"github.com/ThinkInAIXYZ/go-mcp/client"
"github.com/ThinkInAIXYZ/go-mcp/transport"
)
func main() {
t, _ := transport.NewSSEClientTransport("http://localhost:8080")
c, _ := client.NewClient(t)
tools, _ := c.ListTools()
fmt.Println(tools)
}Go MCP SDK Examples
Client configuration
Claude Desktop configuration for a compiled Go MCP server binary using stdio transport.
{
"mcpServers": {
"go-mcp": {
"command": "/usr/local/bin/my-go-mcp-server"
}
}
}Prompts to try
Example prompts after connecting a Go MCP server with registered tools.
- "What is the current time in Tokyo?"
- "List all tools available on this server"
- "Call the current_time tool with timezone America/New_York"
- "What time is it simultaneously in London, New York, and Sydney?"Troubleshooting Go MCP SDK
Claude Desktop cannot connect to the Go MCP server
Ensure the binary path in the command field is absolute and the binary has execute permissions (chmod +x). For stdio transport, the binary must read from stdin and write to stdout without any other output interfering.
go get fails with version compatibility errors
Confirm your Go installation is 1.18 or higher with go version. If your go.mod specifies an older version, update it: go mod edit -go=1.21.
SSE server returns connection refused when the client tries to connect
Check that the port is not already in use (lsof -i :8080) and that your firewall allows the connection. For Claude Desktop, prefer stdio transport over SSE to avoid network configuration issues.
Frequently Asked Questions about Go MCP SDK
What is Go MCP SDK?
Go MCP SDK is a Model Context Protocol (MCP) server that 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 systems and ai applications. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Go MCP SDK?
Follow the installation instructions on the Go MCP SDK GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Go MCP SDK?
Go MCP SDK works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Go MCP SDK free to use?
Yes, Go MCP SDK is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Go MCP SDK Alternatives — Similar Developer Tools Servers
Looking for alternatives to Go MCP SDK? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Go MCP SDK in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Go MCP SDK?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.