Get the FREE Ultimate OpenClaw Setup Guide →

mcp -go

MCP server from shaneholloman/mcp-server-go

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Ensure you are in a Go module-aware project or create a new one: go mod init github.com/shaneholloman/mcp-server-go

  2. 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

  3. Build or run the server example from the repository. For a quick run, use: go run .

  4. 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

Sponsor this space

Reach thousands of developers