Go MCP 服务器 logo

Go MCP 服务器

Community
cbrgm

A Model Context Protocol (MCP) server implementation from scratch in Go. Made for learning purposes only

Publishercbrgm
Repositorygo-mcp-server
LanguageGo
Forks
1
Stars
6
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    Go MCP 服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    6 stars and 1 forks from the linked repository.

Go MCP Server

A Model Context Protocol (MCP) server implementation in Go that provides tea information through tools, resources, and prompts.

Note: This project is for learning purposes only. I built this MCP server from scratch to understand the Model Context Protocol specification. For production use, consider using mcp-go or wait for the official MCP Go SDK to be released (expected end of June 2025).

This MCP server, especially the mcp package, was written with the help of Claude Code using the latest version of the MCP specification (2025-06-21).

Features

  • MCP 2025-03-26 Specification Compliant
  • Multiple Transports: stdio (default), http with SSE
  • Tea Collection: 8 premium teas (Green, Black, Oolong, White)
  • Full MCP Capabilities: Tools, Resources, and Prompts

Quick Start

bash
# Build the binary
go build ./cmd/go-mcp-server

# Run with stdio transport (default)
./go-mcp-server

# Run with HTTP transport
./go-mcp-server -transport http -port 8080

# Test with MCP Inspector
echo '{"jsonrpc":"2.0","method":"initialize","id":1}' | ./go-mcp-server

Usage

The server binary accepts several command line arguments to configure its behavior:

bash
./go-mcp-server [options]

Command Line Arguments

ArgumentTypeDefaultDescription
-transportstringstdioTransport protocol to use (stdio or http)
-portint8080HTTP server port (only used with -transport http)
-request-timeoutduration30sMaximum time to wait for request processing
-shutdown-timeoutduration10sMaximum time to wait for graceful shutdown
-log-levelstringinfoLog level (debug, info, warn, error)
-log-jsonboolfalseOutput logs in JSON format
-server-namestringMCP ServerServer name returned in initialization
-server-versionstring1.0.0Server version returned in initialization

Examples

bash
# Default stdio transport with debug logging
./go-mcp-server -log-level debug

# HTTP transport on custom port with JSON logs
./go-mcp-server -transport http -port 9000 -log-json

# Custom timeouts for production use
./go-mcp-server -transport http -request-timeout 60s -shutdown-timeout 30s

# Custom server identification
./go-mcp-server -server-name "My Tea Server" -server-version "2.0.0"

MCP Capabilities

Tools

  • getTeaNames - List all available teas
  • getTeaInfo - Get detailed tea information and brewing instructions
  • getTeasByType - Filter teas by type (Green Tea, Black Tea, Oolong Tea, White Tea)

Resources

  • menu://tea - Complete tea collection with prices and details

Prompts

  • tea_recommendation - Personalized recommendations based on mood/preferences
  • brewing_guide - Detailed brewing instructions for specific teas
  • tea_pairing - Food pairing suggestions

Tea Collection Example

Try these commands to explore the tea collection:

bash
# List all available teas
echo '{"jsonrpc":"2.0","method":"tools/call","id":1,"params":{"name":"getTeaNames","arguments":{}}}' | ./go-mcp-server

# Get information about a specific tea
echo '{"jsonrpc":"2.0","method":"tools/call","id":2,"params":{"name":"getTeaInfo","arguments":{"name":"earl-grey"}}}' | ./go-mcp-server

# Get all oolong teas
echo '{"jsonrpc":"2.0","method":"tools/call","id":3,"params":{"name":"getTeasByType","arguments":{"type":"Oolong Tea"}}}' | ./go-mcp-server

# Read the complete tea menu resource
echo '{"jsonrpc":"2.0","method":"resources/read","id":4,"params":{"uri":"menu://tea"}}' | ./go-mcp-server

# Get a brewing guide for gyokuro
echo '{"jsonrpc":"2.0","method":"prompts/get","id":5,"params":{"name":"brewing_guide","arguments":{"tea_name":"gyokuro"}}}' | ./go-mcp-server

Web UI

When using HTTP transport, a web status page is available at the root path (/) of the server. This page shows server information, active sessions, and available endpoints.

MCP Client Configuration

Claude Desktop / VS Code / Other MCP Clients

Add this configuration to your MCP client settings:

json
{
  "mcpServers": {
    "tea": {
      "command": "podman",
      "args": ["run", "-i", "--rm", "ghcr.io/cbrgm/go-mcp-server:v1"]
    }
  }
}

For local development, you can also use:

json
{
  "mcpServers": {
    "tea": {
      "command": "go",
      "args": ["run", "./cmd/go-mcp-server"],
      "cwd": "/path/to/go-mcp-server"
    }
  }
}

Testing with MCP Inspector

  1. Install: npm install -g @modelcontextprotocol/inspector
  2. Start: npx @modelcontextprotocol/inspector
  3. Connect with command: go run ./cmd/go-mcp-server

License

Apache 2.0

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "cbrgm-go-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "go-mcp-server"
      ]
    }
  }
}

Use Go MCP 服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Go MCP 服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Go MCP 服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Go MCP 服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "cbrgm-go-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "go-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Go MCP 服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Go MCP 服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Go MCP 服务器 to help me with this task?
Go MCP 服务器
Sure. I read it.
Here is what I found using Go MCP 服务器.

Frequently asked questions

What is the Go MCP 服务器 MCP server used for?

Go MCP 服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Go MCP 服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Go MCP 服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Go MCP 服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Go MCP 服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Go MCP 服务器 MCP to TypingMind?

Go MCP 服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Go MCP 服务器 MCP provide in TypingMind?

Go MCP 服务器 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Go MCP 服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Go MCP 服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇