What does Build Go MCP servers with MCP Go do?
Use MCP Go to implement typed Model Context Protocol servers in Go that expose tools, resources, prompts, and transport handlers to agent clients.
Prerequisites
Go, MCP Go module, MCP-compatible client or host runtime
Installation
Requirements and caveats from upstream:
- // Example: A tool that requires task execution
- Servers that require OAuth can advertise their authorization requirements
Basic usage or getting-started notes:
-
go get github.com/mark3labs/mcp-go
-
Let's create a simple MCP server that exposes a calculator tool and some data:
-
go
-
Extracted from upstream docs: https://raw.githubusercontent.com/mark3labs/mcp-go/HEAD/README.md