mcp
A XGo implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
claude mcp add --transport stdio goplus-mcp gop run . \ --env GOPATH="path/to/go/workspace (optional; use default if not set)"
How to use
This MCP server is a Go-based MCP (Model Context Protocol) server built with the XGo MCP server framework. It lets you run a simple MCP server locally using the gop tool, enabling you to expose a minimal MCP server that can be extended with additional tools and prompts as described in the repository. The example in the README demonstrates a basic server with a single tool that greets a user by name. To use it, install the required tooling, initialize the module, fetch the MCP framework, and then run the server with gop run . The server provides a straightforward starting point for building more complex MCP servers and integrating with LLM applications via the MCP protocol.
How to install
Prerequisites:
- Go tooling installed on your system (https://golang.org/dl/)
- The gop tool available in your PATH (often installed via go install github.com/goplus/gop@latest)
Steps:
- Install Go (if not already installed).
- Install the gop tool:
go install github.com/goplus/gop@latest
Ensure $GOPATH/bin is in your PATH
- Navigate to your MCP server repository (the one described in README).
- Install dependencies and verify the module: gop mod tidy
- Run the MCP server: gop run .
- Access or test the server using the provided MCP tools and prompts as shown in the README.
Notes:
- The example shows a simple server with one tool. You can extend by adding additional tools or prompts following the provided classfile conventions.
Additional notes
Tips and troubleshooting:
- Ensure your Go environment and the gop tool are correctly installed and in PATH.
- If you encounter module resolution issues, run gop mod tidy to sync dependencies.
- When running in CI or containers, consider pinning the gop tool version with go install github.com/goplus/gop@vX.Y.Z and use explicit versioning.
- The MCP server in this repository demonstrates a minimal Hello tool; you can expand by adding more tools, prompts, and resources following the examples in the README.
- If using environment variables, you can customize GOPATH or GOMODCACHE to avoid permission issues in restricted environments.
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