Serverdex · build · Go
Build an MCP server in Go
1. Install the Go SDK
package: github.com/modelcontextprotocol/go-sdk/mcpgo get github.com/modelcontextprotocol/go-sdk/mcpThe official SDK repository: modelcontextprotocol/go-sdk.
2. The shape of a minimal server
start from this APIimport "github.com/modelcontextprotocol/go-sdk/mcp"
server := mcp.NewServer(&mcp.Implementation{Name: "greeter", Version: "v1.0.0"}, nil)
mcp.AddTool(server, &mcp.Tool{Name: "greet", Description: "say hi"}, SayHi)
server.Run(context.Background(), &mcp.StdioTransport{})This is the starting API, not a full program — the complete, always-current walkthrough is the official quickstart. Define your tools, then connect a transport (stdio for local, HTTP for remote). Read on 1 December 2026; confirm the current version in the quickstart.
3. Real Go MCP servers to learn from
most-starred in our index · open source
ANetdata
netdataProduction-ready
Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Registry82k 9d agoGPL-3.0
AGitHub
githubProduction-ready
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Registry35k 1d agoMIT
AD2
d2langProduction-ready
Look up D2 syntax, render diagrams locally, and review animations with storyboards and motion lint.
Registry26k 3d agoMPL-2.0
AOh My Posh Validator
JanDeDobbeleerProduction-ready
Validate oh-my-posh configurations and segment snippets against the official schema.
Live246 tokRegistry24k 2 5d agoMIT
AKeploy
keployProduction-ready
End-to-end API testing — generate and run tests from OpenAPI, curl, Postman, or real user traffic.
Registry20k 9d agoApache-2.0
ACoder
coderProduction-ready
Manage Coder workspaces, templates, and cloud development environments
Registry18k 2d agoAGPL-3.0
See all Go MCP servers, or the best-maintained across every language.
4. Connect it, then get it found
Point a client at your server to try it — the client matrix shows which clients support what. When it works, list it on Serverdex: a free listing is a server page with a link back to us, in front of developers choosing MCP servers. Want it live now without the link? Priority Review ($9, one-time) does that.
Questions people ask
- What's the official way to build an MCP server in Go?
- Use the official Go SDK, github.com/modelcontextprotocol/go-sdk/mcp. Install it (go get github.com/modelcontextprotocol/go-sdk/mcp), construct a server, register your tools, and connect a transport. The full, always-current walkthrough is the official quickstart; the snippet here shows the shape. Read from the SDK's repository on 1 December 2026.
- Is the Go SDK production-ready?
- Tier 1 — passes 100% of the MCP conformance tests and implements every non-experimental feature.
- How do I test and connect my Go server?
- Run it over stdio and point a client at it. Serverdex's client matrix shows which clients support what; most developers start with Claude Desktop or an IDE client. Once it answers, list it on Serverdex so others find it.