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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synth_mcp-0.1.3.tar.gz (140.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synth_mcp-0.1.3-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file synth_mcp-0.1.3.tar.gz.

File metadata

  • Download URL: synth_mcp-0.1.3.tar.gz
  • Upload date:
  • Size: 140.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for synth_mcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 58290a2edec1550d0131f4a294fd8785de4bcfa1a5db6ee632cf447fa116170b
MD5 1ddae967b74e8eceaedbc6c9d739548a
BLAKE2b-256 b859c21eae80eb7f6cd03dd12c214dd3bbf91dd0ce08e399a00bb1af0c19e93b

See more details on using hashes here.

Provenance

The following attestation bundles were made for synth_mcp-0.1.3.tar.gz:

Publisher: publish.yml on raulkivi/music-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synth_mcp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: synth_mcp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for synth_mcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 97cd9631f934623b83df872cc52c67fd2abe716e631082ac859b663459788311
MD5 53fd114b74c64e1af2707d55446115a7
BLAKE2b-256 9bb9ccd5d36545a445d2368b08b9be91a98b017a80b2985dc44c036e4bb9d4bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for synth_mcp-0.1.3-py3-none-any.whl:

Publisher: publish.yml on raulkivi/music-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page