Get the FREE Ultimate OpenClaw Setup Guide →

mcp-client-go

mcp client for Go (Golang). Integrate multiple Model Context Protocol (MCP) servers

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yincongcyincong-mcp-client-go go run .

How to use

mcp-client-go is a Golang client library for the Model Context Protocol (MCP). It provides a unified way to register and interact with various MCP-based services such as Amap, GitHub, Google Maps, and more through a common interface. The library exposes modular support for different service types and offers tooling to help trigger MCP requests via a prompt-driven workflow. You can leverage the included demos and prompts to quickly see how MCP-based servers respond to requests and how to manage clients across multiple services from a single entry point.

How to install

Prerequisites:

  • Go 1.18+ installed on your system
  • Internet access to fetch modules

Install the library (example using the repository path):

# initialize a module if you don't have one yet
go mod init your/module/name

# add the mcp-client-go module to your project
go get github.com/yincongcyincong/mcp-client-go@latest

Usage in a simple Go program:

package main

import (
  mcp "github.com/yincongcyincong/mcp-client-go"
)

func main() {
  // initialize MCP client from the library and use supported services
  client := mcp.NewClient()
  // register and interact with services (e.g., GitHub, Google Maps, Redis, etc.)
  _ = client
}

If you prefer a runnable example, clone the repository and run a demo that demonstrates MCP client usage:

git clone https://github.com/yincongcyincong/mcp-client-go.git
cd mcp-client-go
# follow repository-specific demo/setup if provided

Additional notes

Notes:

  • This project is a Golang client library; it is not a standalone MCP server. To run examples or demos, you typically build and execute a small Go program that uses the library to interact with MCP-based services.
  • The README references modular service types such as Amap, GitHub, GoogleMap, and others. When integrating, import the library and instantiate clients for the desired services.
  • If you use the repository's demo or prompt-based tooling, ensure your environment variables or configuration paths (e.g., mcpconf or prompt prompts) are set as described in the demo documentation.
  • For complex services, you may need API keys or credentials (e.g., for map APIs or GitHub) and to provide them via environment variables or configuration files as indicated by each service’s docs.

Related MCP Servers

Sponsor this space

Reach thousands of developers