synth-mcp
MCP server that synthesizes audio from MusicXML. Supports voice part selection (Soprano, Alto, Tenor, Bass) and tempo control.
What it does
Takes a MusicXML score, optionally filters to one or more voice parts, and renders a WAV audio file using FluidSynth. Useful for choir singers who want to practice a specific voice part.
Tools
| Tool | Description |
|---|---|
get_parts |
List all voice parts in a score — returns part name, ID, and measure count |
synthesize |
Render the score (or selected parts) to a WAV file, with optional tempo adjustment |
list_capabilities |
Return server metadata: backend version, soundfont status, FluidSynth availability |
Installation
cd synth-mcp
uv sync
System library required:
# Ubuntu / Debian
sudo apt install libfluidsynth-dev
# macOS
brew install fluid-synth
A soundfont (SF2) file is also required. Free options:
| Soundfont | Size | Notes |
|---|---|---|
| TimGM6mb | ~6 MB | Ships with Ubuntu (/usr/share/sounds/sf2/TimGM6mb.sf2) |
| MuseScore General | ~200 MB | Better quality; download from musescore.org |
| GeneralUser GS | ~30 MB | Download from schristiancollins.com |
Running
SYNTH_SOUNDFONT_PATH=/usr/share/sounds/sf2/TimGM6mb.sf2 uv run synth-mcp
Configuration
| Variable | Required | Description |
|---|---|---|
SYNTH_SOUNDFONT_PATH |
Yes | Path to an SF2 soundfont file |
Claude Desktop configuration
{
"mcpServers": {
"synth": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/synth-mcp", "run", "synth-mcp"],
"env": {
"SYNTH_SOUNDFONT_PATH": "/absolute/path/to/soundfont.sf2"
}
}
}
}
Usage examples
// List parts in a score
{"tool": "get_parts", "arguments": {"musicxml": "<score-partwise>...</score-partwise>"}}
// Synthesize the full score
{
"tool": "synthesize",
"arguments": {
"musicxml": "<score-partwise>...</score-partwise>",
"output_path": "/tmp/full.wav"
}
}
// Synthesize Soprano part only at 80% tempo
{
"tool": "synthesize",
"arguments": {
"musicxml": "<score-partwise>...</score-partwise>",
"output_path": "/tmp/soprano.wav",
"part_ids": ["P1"],
"tempo_factor": 0.8
}
}
tempo_factor range: 0.25–4.0. Values below 1.0 slow down; above 1.0 speed up. Does not affect pitch.
Testing
# Unit tests (no soundfont required)
VIRTUAL_ENV= .venv/bin/pytest tests/ -v
# Integration tests (synthesizes real audio)
VIRTUAL_ENV= SYNTH_SOUNDFONT_PATH=/usr/share/sounds/sf2/TimGM6mb.sf2 \
.venv/bin/pytest tests/ -v -m integration
Dependencies
- music21 — score parsing and MIDI export
- pyfluidsynth — Python bindings for FluidSynth
- mcp — MCP protocol
Known limitations
- music21's MIDI export may drop some articulations and dynamics
- Audio output is always WAV; convert with
ffmpeg -i out.wav out.mp3if needed - Large scores (100+ measures) may take several seconds to synthesize
System requirements
- Python 3.11+
libfluidsynthshared library (libfluidsynth.so.3on Linux)- An SF2 soundfont file
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synth_mcp-0.1.2.tar.gz.
File metadata
- Download URL: synth_mcp-0.1.2.tar.gz
- Upload date:
- Size: 140.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1431d94bdedcaae2d93599532d4da25e2d77e55e1ccb6cd9189f8cf80916a33
|
|
| MD5 |
b00cd00fa12b95fcdadb294db240db39
|
|
| BLAKE2b-256 |
35464386702e544b87258cac79c68fdd8a12852b589dbb8cbf5a3f3fdd3d72bc
|
Provenance
The following attestation bundles were made for synth_mcp-0.1.2.tar.gz:
Publisher:
publish.yml on raulkivi/music-assistant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synth_mcp-0.1.2.tar.gz -
Subject digest:
e1431d94bdedcaae2d93599532d4da25e2d77e55e1ccb6cd9189f8cf80916a33 - Sigstore transparency entry: 2481863475
- Sigstore integration time:
-
Permalink:
raulkivi/music-assistant@7ff9527a4037d29c77405611f71c19f607945c70 -
Branch / Tag:
refs/tags/synth-mcp/v0.1.2 - Owner: https://github.com/raulkivi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ff9527a4037d29c77405611f71c19f607945c70 -
Trigger Event:
push
-
Statement type:
File details
Details for the file synth_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: synth_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7426b527985640388a4fd495eaab5a74b06aa8eab406d3c9180651b8643de6a2
|
|
| MD5 |
8da43655f4f28a9252b02a06fe01d869
|
|
| BLAKE2b-256 |
3e354ad986d7040b3993515373577c7c129704d1bb0ddd303ff28d3113569446
|
Provenance
The following attestation bundles were made for synth_mcp-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on raulkivi/music-assistant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synth_mcp-0.1.2-py3-none-any.whl -
Subject digest:
7426b527985640388a4fd495eaab5a74b06aa8eab406d3c9180651b8643de6a2 - Sigstore transparency entry: 2481863531
- Sigstore integration time:
-
Permalink:
raulkivi/music-assistant@7ff9527a4037d29c77405611f71c19f607945c70 -
Branch / Tag:
refs/tags/synth-mcp/v0.1.2 - Owner: https://github.com/raulkivi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ff9527a4037d29c77405611f71c19f607945c70 -
Trigger Event:
push
-
Statement type: