v0.1.0 โ Initial release
๐ 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. Nomcp-proxysubprocess. - Protocol-level relay โ frames parsed as
JSONRPCMessage, wrapped/unwrapped through the SDK'sSessionMessage. 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/SIGTERMshutdown. - 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 mcp2xiaozhiQuick start
export MCP_ENDPOINT="wss://api.your-xiaozhi-server.example/mcp/<token>"
mcp2xiaozhi run calculatorDocumentation
- ๐ README (English)
- ๐ ไธญๆ่ฏดๆ
- ๐ง Configuration
- ๐ CHANGELOG
- ๐ PyPI
Full Changelog: https://github.com/StanleyChanH/MCP2Xiaozhi/commits/v0.1.0