xstudio-mcp
Controls NetEase Cloud Music's X Studio desktop app to create and edit song projects, manage singers and tracks, set tempo/notes/lyrics, trigger cloud-based singing synthesis, and export audio files.
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.
xstudio-mcp
让 AI 直接操作网易云音乐 X Studio:选歌手、写谱、填词、合成、导出。 An MCP server that lets an AI compose, edit, synthesize and export songs in NetEase Cloud Music X Studio.
非官方项目,不包含 X Studio 的任何代码或资源;需要你本机已安装正版程序。详见NOTICE.md。
为什么做这个
X Studio 是个很好听的歌声合成软件,但它没有公开 API、没有批处理、没有脚本接口。想让 AI 帮你写一首歌,卡点不是"AI 会不会写旋律",而是"写完怎么让它唱出来"。
这个 MCP 把这条链路补齐:
AI:写旋律 + 歌词 → MCP:写工程文件 + 驱动程序 → X Studio:合成 → 导出 MP3/WAVAI 不需要会点鼠标,也不需要看屏幕。
Related MCP server: yue-studio
能力总览
工具 | 作用 |
| 程序是否在跑、当前工程、可见对话框、最近提示 |
| 本机可用的 AI 歌手(名称 → id / 颜色) |
| 建工程:多轨、歌手、音符或「歌词 + 旋律」 |
| 一句话成曲:歌词 + 旋律 |
| 打开工程;对已打开的同名文件强制重载 |
| 解码工程:曲速、拍号、调号、轨道、音符(位置以「拍」为单位) |
| 改写 / 追加某轨音符(显式音符,或歌词 + 旋律 + 节奏) |
| 增删轨道(指定歌手) |
| 曲速 / 拍号 / 调号 |
| 云端合成并导出 MP3 / AAC / WAV(可指定格式、码率、采样率、声道、范围) |
| 播放、停止、保存 |
| 截图( |
位置一律用拍(beat);音高写 C4 / F#5 或 MIDI 数字。
快速开始
要求:Windows 10/11、Python 3.10+、已安装并登录 X Studio(合成需要联网与账号)。
pip install -e .
# 或者只装依赖、用 python -m xstudio_mcp.server 启动注册到 MCP 客户端(任何支持 stdio 的客户端都一样):
{
"mcpServers": {
"xstudio": {
"command": "python",
"args": ["-m", "xstudio_mcp.server"]
}
}
}然后就可以对 AI 说:
用小冰唱《测试》,旋律 C4 D4 E4 G4,节奏 1 1 1 1,速度 100,导出 WAV 到
D:\out\demo.wav
对应的工具序列是 xstudio_compose → xstudio_export,全程不用你碰鼠标。
工作方式
工程文件是唯一事实来源,程序只负责合成与导出。
环节 | 通道 |
读工程 | 直接解析 |
写工程 | protobuf 序列化后落盘,不经过界面 |
驱动程序 | UIA 的 |
导出 | 点按钮 → 等对话框 → 读控件文字定位输出目录 → 移动文件 |
截图(可选) |
|
所以:这条链路在运行时几乎不使用视觉。唯一涉及像素的工具是 xstudio_screenshot,而且它只是搬运画面,不做 OCR、不做识别。删掉它,其余 14 个工具照常工作。
工程格式要点
.svip3是 protobuf,根消息xstudio.proto.AppModel,轨道用google.protobuf.Any包SingingTrack/AudioTrack。480 ticks = 1 拍(MIDI PPQ)。4/4 一小节 1920 ticks,2/4 一小节 960 ticks。
音高
key_index就是 MIDI 编号(C4 = 60)。速度字段是BPM × 100。客户端不带描述符文件:首次运行会从你本机的 X Studio 可执行文件里把 protobuf 描述符抽出来,缓存到
%LOCALAPPDATA%\xstudio-mcp\descriptors.bin。推理细节见 docs/architecture.md。
已知限制
合成需要登录且联网:歌声由
xstudio-api.music.163.com生成,离线导出会失败。导出要过两次程序弹窗(设置 + AI 标识告知),本项目已自动处理;一首歌约 5–20 秒。
原生文件对话框不可用 UIA(系统
#32770子树会阻塞),所以"打开 / 另存为"走命令行转发与键盘输入。界面上的手工改动不会被感知,除非先保存再读文件。
截图只覆盖当前视口(约 4–8 小节);长谱请用
xstudio_project_info的数值核对,不要凭截图判断"谱是空的"。只覆盖演唱轨 / 说唱轨;音频轨、人声分离、MIDI 转换等菜单功能未纳入。
合规
导出默认保留程序要求的 AI 生成标识;
ai_label=false选择的是程序自带的无标识版本,合规责任由调用方承担。本项目不绕过任何授权、不破解、不分发厂商资源,只驱动你本机已授权的程序。
详见 NOTICE.md。
开发
pip install -e ".[dev]"
python tests\test_units.py # 纯逻辑:拍号换算、音名解析、音符解析(不需要程序,CI 跑这个)
python tests\test_protocol.py # 起一个真的 MCP 进程,验证 15 个工具能握手、能调用
python tests\test_offline.py # 工程读写、往返一致性(需要本机装有 X Studio)
python tests\test_e2e.py # 端到端:成曲 → 打开 → 截图 → 导出(需要程序和登录)想直接看 API 怎么用:examples/compose_demo.py。
许可
代码 MIT。X Studio、网易云音乐及相关名称归其所有者,本项目仅作描述性使用。
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
Design music, generate songs and lyrics, edit audio and arrange Studio projects.
Generate 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.
Make songs with vocals, lyrics and cover art, plus stems, MIDI and mastering.
Compose, mix, master and export in Logic Pro, REAPER or Ableton Live by talking to an AI engineer.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceControls the official NetEase Cloud Music desktop client on Windows, enabling AI to search, play, manage queues, and adjust playback settings via a local control channel.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to drive the local YuE Studio music creation desktop app, including guided wizards, song submission, job tracking, lyric input, cancellation, and style reference queries for composing and adapting songs.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a local NetEase Cloud Music client in natural language — searching songs and playlists, playing or queuing tracks, replacing the queue with a playlist, and pausing, skipping, or adjusting volume — via a BetterNCM plugin and localhost bridge with token authentication.MIT
- AlicenseAqualityBmaintenanceEnables an AI assistant to produce a cover of any song in a cloned voice: it fetches the track and timed lyrics from NetEase Cloud Music, swaps the vocals via the 声线 app's singing voice-change feature, and returns a finished mp3 plus synchronized lyrics. Also lists available voices and remaining credits so users can just ask for a song by name or share link.3MIT