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

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.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.2.tar.gz (140.0 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.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

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

Hashes for synth_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e1431d94bdedcaae2d93599532d4da25e2d77e55e1ccb6cd9189f8cf80916a33
MD5 b00cd00fa12b95fcdadb294db240db39
BLAKE2b-256 35464386702e544b87258cac79c68fdd8a12852b589dbb8cbf5a3f3fdd3d72bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for synth_mcp-0.1.2.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.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

Hashes for synth_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7426b527985640388a4fd495eaab5a74b06aa8eab406d3c9180651b8643de6a2
MD5 8da43655f4f28a9252b02a06fe01d869
BLAKE2b-256 3e354ad986d7040b3993515373577c7c129704d1bb0ddd303ff28d3113569446

See more details on using hashes here.

Provenance

The following attestation bundles were made for synth_mcp-0.1.2-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

0.1.3

2 files

This release

0.1.2 This release

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