mcp -go
MCP server from shaneholloman/mcp-server-go
claude mcp add --transport stdio shaneholloman-mcp-server-go go run .
How to use
This MCP server is a Go implementation of the Model Context Protocol (MCP). It provides a high‑level API to define Tools (exposed operations) and Resources (data endpoints) that an LLM can call or load into context. Developers set up an MCPServer, register Tools with their handlers, and then start serving via standard input/output (stdio) using server.ServeStdio. The example in the repository shows how to create a server, add a Tool (hello_world) with a required string parameter (name), and implement a handler that returns a text result. Tools are defined with descriptions and argument schemas, enabling the LLM to discover what inputs are needed and what outputs will be produced. The server handles all MCP protocol mechanics behind the scenes so you can focus on building the actual functionality for your data sources and tools.
How to install
Prerequisites:
- Go (Golang) installed and configured (1.18+ recommended)
- GOPATH/GOMOD workspace set up (modules enabled)
Install steps:
-
Ensure you are in a Go module-aware project or create a new one: go mod init github.com/shaneholloman/mcp-server-go
-
Retrieve the MCP Go server package (the repository uses module paths like github.com/shaneholloman/mcp-server-go): go get github.com/shaneholloman/mcp-server-go
-
Build or run the server example from the repository. For a quick run, use: go run .
-
If you are integrating into an existing project, import the relevant packages: import ( "github.com/shaneholloman/mcp-server-go/mcp" "github.com/shaneholloman/mcp-server-go/server" )
Notes:
- The project uses Go modules; ensure your environment can fetch modules from the network.
- The README examples demonstrate how to initialize an MCPServer, add tools, and start stdio serving.
Recommended workflow:
- Clone the repo or create your own module that depends on github.com/shaneholloman/mcp-server-go.
- Implement your Tools and Resources following the examples in the README.
- Run the server with Go tooling (go run .) or build an executable and run it.
Additional notes
Tips and caveats:
- MCP Go is under active development; expect ongoing changes to features and APIs. Core MCP capabilities are functional, but some advanced features may still be evolving.
- When sharing Tools, provide clear descriptions and argument schemas so LLMs can construct valid requests.
- Resources can be static or dynamic; the examples in the README illustrate static and template-based resources. Customize resource handlers to fetch real data from files, databases, or external APIs.
- If you plan to expose your server via Docker or a launcher, you may want to containerize the Go binary after building to simplify deployment.
- Enable logging or resource capabilities via server options as shown in the Quickstart examples to aid debugging and observability.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go