Get the FREE Ultimate OpenClaw Setup Guide →

mcp

A XGo implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.

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

  1. Install Go (if not already installed).
  2. Install the gop tool: go install github.com/goplus/gop@latest

    Ensure $GOPATH/bin is in your PATH

  3. Navigate to your MCP server repository (the one described in README).
  4. Install dependencies and verify the module: gop mod tidy
  5. Run the MCP server: gop run .
  6. 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

Sponsor this space

Reach thousands of developers