stem-splitter
You can run and manage asynchronous audio stem-separation jobs over MCP, using local Demucs or a remote command.
Start a separation with
separate_stemsfrom an absolute audio path (WAV directly; mp3/m4a/flac via decoder), returning a job id immediately.Choose model (
htdemucsdefault,htdemucs_ft,mdx_extra; README also mentionshtdemucs_6sfor guitar/piano, but the schema omits it), quality (fast/best), backend (auto/demucs/command), and optional job/out directories.Poll one job or list recent jobs with
stem_job_status; inspect status, stage, stems, and errors.Cancel a running job with
stem_job_cancel, removing its half-written stems.Check available separation backends with
stem_backendsand learn how to enable missing ones.Outputs are plain 16-bit PCM WAV stems named for the model’s stem set (four stems: vocals, drums, bass, other; six if
htdemucs_6swere exposed).Runs locally via Demucs or remotely via
STEM_SPLIT_COMMAND; first local use may bootstrap/download the backend.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stem-splitter Split ~/Music/song.mp3 into vocals, drums, bass, and other stems"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Stem Splitter
An MCP server that separates a finished song into vocals, drums, bass and other — or, with the six-source model, guitar and piano on top of those — locally with Demucs, or through a command you point at a GPU box, for any MCP-compatible agent.
把一首成品歌拆成人声、鼓、贝斯和其它四条分轨的 MCP 服务:本地跑 Demucs,或用一条命令指向你的 GPU 机器;任何支持 MCP 的 agent 都能调用。
Platform support: macOS — supported (developed & verified on this machine) · Windows — unverified (paths are cross-platform in the codebase, but no real-machine testing yet).
Why it is shaped like this
Separation takes minutes, and an MCP call that blocks for minutes gets killed by its client. So the
work runs as a job: separate_stems writes a job file and starts a detached process, then returns
a job id immediately. The client polls stem_job_status, and can stop the work with
stem_job_cancel. A bridge restart, a plugin restart or a closed laptop lid does not lose the job —
the record on disk is the truth.
The model is not a dependency of the server: the plugin itself is stdlib + numpy, and it runs Demucs
through whichever interpreter has it (by default a virtualenv at
<ShadowRoom>/_venvs/stem-splitter).
Related MCP server: Claud-Ear
Features
Four stems, the split DJs and producers actually ask for:
vocals,drums,bass,other.Six stems when you ask for them.
model: "htdemucs_6s"addsguitarandpiano. It is not the default, and that is deliberate: Demucs's own README says its piano source is not working well, and the six sources sum back to the mix more loosely than the four-stem model does — measured on this machine, correlation 0.963–0.997 against the mix (it varies with the material), where four stems hold 0.999. Use it to pull a guitar or a piano out; use the four-stem model when the sum has to be the song.Two backends. Local Demucs (
htdemucs, orhtdemucs_ftfor the slow fine-tuned bag), or a command template (STEM_SPLIT_COMMAND) for a remote GPU box, a container, or a wrapper script.Any input. WAV is read directly; mp3 / m4a / flac / aiff / ogg go through ffmpeg, or through macOS's own
afconvertwhen ffmpeg is not installed.Plain output. Every stem is written as 16-bit PCM WAV next to the others, whatever the backend produced, so every player and DAW opens them.
Honest errors. No backend → the message says how to install one; a separator that writes three stems → the missing one is named.
Requirements
OS | macOS, Linux or Windows |
Python | 3.9 or newer (for the MCP server itself: stdlib + numpy) |
Model | none of its own — Demucs runs from its own virtualenv, or a remote command |
Decoder | ffmpeg, or macOS |
Install
As an MCP server (any client)
{
"mcpServers": {
"stem-splitter": {
"command": "python3",
"args": ["mcp_server.py"],
"cwd": "/path/to/stem-splitter"
}
}
}The separator itself (local Demucs)
python3 -m venv ~/Documents/ShadowRoom/_venvs/stem-splitter
~/Documents/ShadowRoom/_venvs/stem-splitter/bin/pip install -r requirements-local.txtThat installs torch 2.2.2, torchaudio, Demucs 4.0.1 and soundfile (about 300 MB). The first
separation downloads the htdemucs weights (~80 MB). Measured on an M4 Mac: a 20-second excerpt
separated in 11.7 seconds, and the four stems summed back to the mix at 0.999 correlation.
The versions matter: torch 2.2.2 was built against numpy 1.x, so numpy<2 is pinned; and without
soundfile (or ffmpeg) torchaudio cannot open even a plain WAV — Demucs then fails with
"FFmpeg is not installed".
Configuration
Option | Default | Used for |
|
| the interpreter that has Demucs |
| – | remote command: |
|
| where the stems are written |
|
| job records |
|
| where the venv and output directories live |
Tools
Tool | What it does |
| Start a separation ( |
| One job's status, stage, stems and errors (or the recent jobs) |
| Stop a job and delete its half-written stems |
| Which backends this machine has, and how to enable the missing one |
Usage
shadow-stem-splitter backends
shadow-stem-splitter separate ~/Music/artist - track.mp3
shadow-stem-splitter status # the recent jobs
shadow-stem-splitter status 20260915-011407-song-20s
shadow-stem-splitter cancel 20260915-011407-song-20sThe stages a job moves through are decode → separate → collect; collect is where the stems
are rewritten as plain WAVs and named after the model's stem set — vocals.wav, drums.wav,
bass.wav, other.wav for the four-stem models, plus guitar.wav and piano.wav for
htdemucs_6s. stem_backends reports both sets as stems_by_model.
Safety
Nothing is deleted except the job's own half-written stems when you cancel it, inside the output directory that job was given. The source file is only ever read.
Troubleshooting
Symptom | Fix |
| Nothing to fix on a fresh machine — the first |
|
|
| Pin |
A job stays | Its process died: |
First use downloads the backend (once, ~169 MB)
The heavy dependencies (torch + Demucs ≈ 85 MB of wheels, plus the 84 MB htdemucs weights) do not
ship with the app. The first separate_stems on a machine without them installs them as job stages
— the job's install_step says what is happening, stem_backends reports the estimate up front
(首次分轨需下载模型(约 169 MB,仅一次)), and stem_install_backend pre-installs without waiting
for a real song. Pins match the frozen set the production venv uses, including the two that pip
would otherwise get wrong: numpy==1.26.4 (torch 2.2.2 is built against numpy 1.x) and
soundfile==0.13.1 (torchaudio 2.2.2 has no other wav backend on macOS). The model download
resumes (Range, verified 206), verifies sha256 + size before landing, tries the next URL on a bad
asset, and every network step has timeouts — a failure leaves a readable Chinese error and a retry
picks up where it left off. STEM_SPLIT_COMMAND machines never download anything: the command
backend wins resolution, which is the documented fallback path.
License
AGPL-3.0. The separation model (Demucs, MIT) is installed separately and is not bundled.
Available Tools
4 toolsseparate_stemsA
Start separating one audio file into vocals / drums / bass / other. Returns a job id immediately.
Inputs: path (required), model, backend, job_dir, +2 more.
stem_backendsA
Which separation backends this machine has (local demucs, or STEM_SPLIT_COMMAND) and how to enable them.
Inputs: no named parameters.
stem_job_cancelA
Stop a running separation and remove its half-written stems.
Inputs: job_id (required), job_dir.
stem_job_statusA
Read one separation job (or the recent ones): status, stage, stems, errors.
Inputs: job_id, job_dir.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The four tools map to distinct actions: starting a job, checking status, cancelling, and listing backends. There is no overlap in purpose, so an agent should be able to select the correct one without ambiguity.
Naming is mixed: separate_stems follows verb_noun, while stem_job_status and stem_backends are noun phrases and stem_job_cancel reverses the object/verb order. A consistent pattern such as get_stem_job_status, cancel_stem_job, and list_stem_backends would make the set more predictable.
Four tools is well-scoped for a job-based audio stem separation server. Every tool covers a necessary lifecycle action without redundancy.
The core job lifecycle is covered: start, inspect status, and cancel, plus backend discovery. A minor gap is the lack of an explicit result-retrieval or cleanup tool, though status may expose stem outputs indirectly.
Maintenance
Related MCP Connectors
Remote MCP server for audio stem separation, denoise, reverb, and MIDI export.
AI stem splitter and vocal remover. Split songs from public audio links into vocals and instrumental, a 4-stem Basic Split (vocals, drums, bass, other) or 6 stems with guitar and piano, one song or a batch of up to 10. Each split returns MP3 stem links and a link to practise the song in StemConsole's practice room, with WAV links and a ZIP of all stems on Pro. Account tools show the plan and splits left, list, rename and delete songs, and list and create setlists. Connect with OAuth at https://stemconsole.ai/mcp/account, or use an API key at https://stemconsole.ai/mcp. Free accounts get 5 splits a month.
Make full songs with vocals, split stems, transcribe and analyze audio from your AI assistant.
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.
Related MCP Servers
- AlicenseAqualityDmaintenanceRemove vocals, extract instrumentals, and split any song into up to six stems — directly from Claude Desktop, Cursor, or any MCP client. Supports local audio files, YouTube URLs, and SoundCloud track1119 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents the ability to listen to and understand music/audio files, enabling semantic analysis, stem separation, lyrics transcription, and signal processing via tool calls.1MIT
- AlicenseNot gradedqualityBmaintenanceAI-powered music production toolkit enabling AI agents to generate, remix, separate stems, master tracks, and control DAWs via MCP.1MIT
- AlicenseBqualityBmaintenanceEnables MCP-compatible agents to queue, run, and track local AI music generation jobs with dry-run defaults, license recording, and pluggable pipeline adapters for YuE or compatible backends.31AGPL 3.0