Skip to content

v0.1.0 โ€” Initial release

Choose a tag to compare

@StanleyChanH StanleyChanH released this 08 Jul 10:55

๐ŸŽ‰ Initial release of mcp2xiaozhi โ€” a general-purpose bridge connecting any MCP server (stdio / SSE / StreamableHTTP) to a Xiaozhi server over WebSocket.

The Xiaozhi server acts as an MCP client over a WebSocket: it sends JSON-RPC tool calls as text frames and expects JSON-RPC replies. mcp2xiaozhi receives those frames and relays them โ€” at the protocol level โ€” to your MCP server, wherever it runs and whatever transport it speaks.

Highlights

  • Three native transports โ€” stdio, sse, streamablehttp (http), all via the official mcp Python SDK. No mcp-proxy subprocess.
  • Protocol-level relay โ€” frames parsed as JSONRPCMessage, wrapped/unwrapped through the SDK's SessionMessage. Malformed frames are logged and dropped instead of crashing the bridge.
  • Resilient reconnection โ€” exponential backoff with jitter; clean closes (ConnectionClosedOK) distinguished from abnormal ones.
  • Multi-server โ€” run one bridge or every server in your config; each server gets its own Xiaozhi endpoint with conflict warnings.
  • Cross-platform โ€” UTF-8 console handling on Windows, graceful SIGINT/SIGTERM shutdown.
  • Developer-friendly โ€” pyproject.toml, src layout, type hints, CLI, 42 tests (incl. a real fastmcp integration test), ruff/mypy clean, uv-managed.

Install

pip install mcp2xiaozhi
# or
uv add mcp2xiaozhi

Quick start

export MCP_ENDPOINT="wss://api.your-xiaozhi-server.example/mcp/<token>"
mcp2xiaozhi run calculator

Documentation

Full Changelog: https://github.com/StanleyChanH/MCP2Xiaozhi/commits/v0.1.0