Skip to main content

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
health_check Check that the soundfont, FluidSynth, and music21 are all available and ready

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

Quick install

Prefer not to do the above by hand? Run ./install.sh — it installs uv, the system libfluidsynth package, and a soundfont automatically. See SETUP.md for a non-technical walkthrough, and TROUBLESHOOTING.md if something goes wrong. Ready-made client configs (Claude Desktop, Cursor, Windsurf, Continue, Zed) are in examples/.

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": ["Soprano"],
    "tempo_factor": 0.8
  }
}

Note: part_ids are the part names returned by get_parts (e.g. "Soprano", "Alto"), not XML <part id>-style values like "P1" — music21 uses the part name as its id.

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.mp3 if needed
  • Large scores (100+ measures) may take several seconds to synthesize

System requirements

  • Python 3.11+
  • libfluidsynth shared library (libfluidsynth.so.3 on Linux)
  • An SF2 soundfont file

Metadata

Release files for synth-mcp 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synth-mcp 0.2.3
File Size Uploaded Provenance Actions
synth_mcp-0.2.3.tar.gz 144.8 kB With provenance Details for synth_mcp-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for synth-mcp 0.2.3
File Interpreter ABI Platform Actions
synth_mcp-0.2.3-py3-none-any.whl Python 3 none any Details for synth_mcp-0.2.3-py3-none-any.whl

Total release size: 156.7 kB

Release files / synth_mcp-0.2.3.tar.gz

Download URL synth_mcp-0.2.3.tar.gz
Size 144.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c60a4427cff38ee49f4ebed18c71a287c2bfb5a04a5877f03145f254857bbf0f
BLAKE2b-256 checksum
How to use checksums
47052e29fa49952a02171333c60936673d08795b26c5128c0266b4d53e045568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / synth_mcp-0.2.3-py3-none-any.whl

Download URL synth_mcp-0.2.3-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2a6053b2ca65ba2dc57f9e6728adb90e11dc8b69e480bd46a80e6d764b4128e
BLAKE2b-256 checksum
How to use checksums
d01d611893ca591ce16e08f49dd1719bd43e9ed15e3c088316d34bbfdcf13e8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for synth-mcp 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for synth_mcp-0.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page