Get the FREE Ultimate OpenClaw Setup Guide →

xiaozhi_mcp_server_golang

使用golang实现mcp server通过websocket连接到xiaozhi服务器

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hackers365-xiaozhi_mcp_server_golang docker run -i xiaozhi-mcp-server-go \
  --env MCP_TARGET="xiaozhi mcp target (optional)" \
  --env MCP_CONFIG_PATH="path to config (optional)"

How to use

This MCP server acts as an integration bridge to the Xiaozhi MCP service. It is implemented in Go and designed to connect to Xiaozhi's MCP ecosystem, exposing the standard MCP endpoints and protocol adapters needed to relay data between Xiaozhi services and your local or cloud environment. After starting the server, it will listen for MCP connections, perform the handshake with Xiaozhi, and then forward messages between your application and Xiaozhi's MCP suite. Use the built-in configuration options to tailor how it authenticates, routes messages, and handles retries.

How to install

Prerequisites:

  • Docker installed (recommended for the provided container in this guide) or a Go development environment if you prefer building from source.
  • Access rights to Xiaozhi MCP endpoints (credentials or tokens as required by your deployment).

Option A: Run with Docker

  1. Ensure Docker is running.
  2. Pull and run the container (replace image name with the official image if provided): docker pull xiaozhi/mcp-server-go docker run -i --env MCP_TARGET="<target-id>" --env MCP_CONFIG_PATH="/config" xiaozhi/mcp-server-go

Option B: Build from source (Go)

  1. Ensure Go is installed (https://golang.org/dl/).
  2. Clone the repository and navigate to the project directory.
  3. Build the binary: go build -o xiaozhi_mcp_server_go ./...
  4. Run the server: ./xiaozhi_mcp_server_go

Configure your environment as needed by setting environment variables for authentication, target, and config paths as described in the next section.

Additional notes

Environment variables and config options may include:

  • MCP_TARGET: The Xiaozhi MCP target or endpoint you are bridging to.
  • MCP_CONFIG_PATH: Path to a configuration file describing routes, adapters, and credentials.
  • You may need to adjust network settings (ports, TLS certificates) depending on your deployment environment. If you encounter connectivity issues, verify firewall rules, DNS resolution to Xiaozhi MCP endpoints, and that the correct credentials are in place. Logs typically indicate handshake or protocol negotiation problems if misconfigured. Ensure the Go binary or container has access to the necessary network resources and that the MCP protocol version matches Xiaozhi's expected version.

Related MCP Servers

Sponsor this space

Reach thousands of developers