xiaozhi-mcp-bridge
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
xiaozhi-mcp-bridge
小智 AI(Xiaozhi)音乐 MCP 桥,把 MCP 工具调用通过 HTTP 转发给 music-free-source 音乐源服务,并将结果通过主动式 WebSocket 连接上报给小智云端。
本仓库是 MCP 系统的接入层,负责与小智云端建立连接(出站 WebSocket,无需内网穿透),并把 LLM 需要的歌曲直链回传,供设备端 self.player.command 播放。
架构
┌────────────────────┐ MCP (stdio) ┌──────────────────────┐
│ 小智云端 (MCP 客户端) │ ◀────────────────────▶ │ xiaozhi-mcp-bridge │
│ api.xiaozhi.me │ WebSocket (WSS) │ (MCP 桥, Python) │
└────────────────────┘ └──────────┬───────────┘
│ HTTP (内部网络)
▼
┌──────────────────────┐
│ music-free-source │
│ (音乐源, Node) │
└──────────────────────┘本桥:
mcp_pipe.py建立与小智云端的 WSS 连接,把消息灌入子进程music_mcp_server.py(FastMCP, stdio)。music-free-source(独立仓库):处理实际搜索 / 取链。
Related MCP server: xiaozhi-music-railway
工具
工具名 | 说明 | 参数 |
| 搜索音乐(关键词 / 歌手) |
|
| 获取榜单 / 热门推荐 |
|
| 随机推荐 |
|
工具返回 JSON,包含 action: REQLLM 字段、人类可读的 response 文本,以及每首歌的 url 播放直链(songs[])。小智 LLM 据此调 self.player.command 播放 <url>。
快速开始
1. 创建共享网络(两个容器同网络用容器名互访)
docker network create music-free-net2. 配置环境变量
复制 .env.example 为 .env,设置小智 MCP 接入点:
cp .env.example .env
# 编辑 .env:XIAOZHI_MCP_URL=wss://api.xiaozhi.me/mcp/?token=你的token
MUSIC_SOURCE_URL默认http://musicfree-source:4233(同网络容器名),无需修改。
3. 启动
docker compose up -d4. 验证
查看日志,确认连接成功且能检测到 music-free-source:
docker compose logs -f正常时可见:
[mcp-pipe] Successfully connected to WebSocket server
[health] musicfree-source OK: http://musicfree-source:4233/health (sources=N)环境变量
变量 | 默认值 | 说明 |
| (必填) | 小智 MCP WebSocket 端点(含 token,敏感) |
|
| musicfree-source 服务地址 |
构建(可选)
拉取镜像:docker pull ghcr.io/luuuye/xiaozhi-mcp-bridge:latest
本地构建:docker build -t ghcr.io/luuuye/xiaozhi-mcp-bridge:latest .
发布
GitHub Actions 在 main 分支推送或打 v* tag 时,自动构建 amd64 / arm64 两个镜像并推送到 GHCR,同时导出独立 .tar 包发布到 GitHub Release。各架构独立包:
docker load -i xiaozhi-mcp-bridge-amd64.tar # x86_64
docker load -i xiaozhi-mcp-bridge-arm64.tar # ARM64(如 S905X)技术栈
Python 3.11(Alpine 基础镜像)
mcpSDK(FastMCP)+httpx+websockets主动式 WebSocket 连接(出站,无需内网穿透)
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server to create AI songs from a description, lyrics, a cover or a photo.
1Generate full songs with vocals, instrumentals and sound effects from text. One server for Suno, Google Lyria, Mureka, MiniMax, ACE-Step, YuE and ElevenLabs. Your agent can quote the credit cost before generating, start a song, wait for it to finish and return download links. Sign in with OAuth; optional daily credit caps; retries never charge twice.
Sonos MCP server: control your Sonos speakers from any MCP client. Play songs, artists and playlists, set volume, group rooms, move music to another room, switch to TV, spoken announcements and reminders. 27 tools, English and Chinese. Works through the official Sonos cloud, so there is no home bridge to install; sign in with OAuth. Requires the free ZoneFoundry iOS app.
ScoreStarling is an all-in-one AI sheet music assistant. Ask for anything to do with sheet music: transcribe a song from audio, video or a link, read a PDF or photo, add chords, change the key, make it easier, turn it into guitar TAB or jianpu, or arrange it for another instrument. Every change lands on a real score you can hear, fix and download (PDF, MIDI, MusicXML, guitar TAB, jianpu, audio). Hosted remote server with OAuth sign-in. Free accounts get monthly credits and free previews; prices are at scorestarling.com/pricing. Setup: https://scorestarling.com/mcp
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides music search, playback control, volume adjustment, and playlist management for Xiaozhi AI speakers via MCP.62-
- FlicenseNot gradedqualityDmaintenanceMusic MCP WebSocket server enabling multi-platform music search and playable URL retrieval via Meting for XiaoZhi AI.2-
- FlicenseNot gradedqualityDmaintenanceProvides music search, playback control, volume adjustment, and playlist management for XiaoZhi AI through MCP protocol.-
- AlicenseAqualityDmaintenanceEnables 小智AI to search songs across multiple free music sources, resolve direct playback URLs, and stream audio to devices via the ResourceLink/resources/read protocol.2854MIT