McpSynth
# McpSynth
[](https://github.com/MomoPewpew/McpSynth/actions/workflows/build.yml)
**A synthesizer you program by talking to an AI agent.** Load McpSynth in your DAW and ask your agent (e.g. Claude
Code) for *"five dreamy ambient pads with a long reverb in synth 1"*. A moment later the presets show up in the
plugin, ready to audition on your own keyboard. Keep what you like, reject the rest, and ask for variations.
Agents can't hear, so McpSynth gives them the next best thing. Every sound they design is rendered offline and
returned as a spectrogram image, loudness and timbre numbers, and plain-language descriptors ("bright", "slow swell",
"long tail"). The agent iterates until the sound matches your request and sends it to your plugin. Then it tells you
in a sentence or two how it got there.
## How it works
```
you ──"make me an acid bassline in synth 1"──▶ agent ──MCP──▶ McpSynth server (Python)
renders, analyzes, iterates
│ preset JSON
▼
your DAW ◀── plays live ── McpSynth plugin (VST3/CLAP) ◀── test bin (~/.mcpsynth/instances/…)
```
- **The plugin** (Rust, [nih-plug](https://github.com/robbert-vdh/nih-plug)) is a full real-time synth with a
minimal UI. Your saved **library** is on the left (searchable, with folders), and a **test bin** that the agent
fills is on the right. Click a preset to audition it (hold a chord and click through them: the held notes switch to each new sound), 💾 to
save it to the library, 👎 to reject it. Each instance
has a name (`synth 1`, `synth 2`, …) that you use when talking to the agent.
- **The MCP server** (Python) holds the reference engine, the renderer and the analysis. Its tools let the agent
render sounds, look at them, play them to you, save presets and send them to a plugin instance.
- **Both engines produce the same sound.** The plugin matches the Python reference to about -100 dB, checked by
32 golden tests on every build.
## The synth
- **Oscillators** (up to 4):
- Virtual analog: saw, square, pulse with PWM, triangle, sine.
- Wavetables: basic shapes, pulse width, harmonic sweep, formant vowels, odd/even, digital.
- 2-operator FM.
- White, pink or brown noise.
Each has unison (detune, stereo spread), its own pitch and pan, and optionally a fixed frequency and its own
envelope.
- **Filters**: up to 2 in series. Lowpass, highpass, bandpass or notch, at 12 or 24 dB, with resonance, drive and
key tracking.
- **Modulation**:
- Sources: the amp envelope plus 2 free envelopes; 4 LFOs; velocity, key tracking and per-note random.
- LFO shapes: sine, triangle, saw, square, sample & hold, smooth random. LFOs can sync to tempo (locked to your
song's bars), retrigger per note and fade in.
- A mod matrix routes the sources to pitch, oscillator levels and pans, wavetable position, pulse width, FM index,
filter cutoff and resonance, and overall level and pan. A route can be scaled by a second source
(`via`), e.g. an LFO's vibrato depth by the mod wheel.
- **Macro knobs**: each preset gets up to 4 knobs that the agent names and wires for that sound (*Brightness*,
*Space*, *Grit*…). One knob can move several settings at once, including effect mix, drive, delay feedback and
reverb length. They're regular plugin parameters, so you can automate them and map them to a MIDI controller.
- **Plays like an instrument**: pitch-bend wheel (range set per preset), sustain pedal, and the mod wheel and
aftertouch as modulation sources the agent wires per sound (vibrato on the wheel for leads, filter swells on
pressure for pads…).
- **Voices**: polyphonic, mono or legato, with glide.
- **Effects**: EQ; distortion (soft, hard, fold, bitcrush; oversampled); chorus; tempo-synced delay with ping-pong;
a lush 16-line reverb.
- **Lightweight**: a typical voice uses about 0.3% of one CPU core.
Patches are plain JSON in physical units (Hz, seconds, dB, semitones). The full format is the agent's manual,
[docs/GUIDE.md](docs/GUIDE.md), which also has sound-design recipes.
## Getting started
You need Python 3.11+ and an MCP-capable agent. These instructions use
[Claude Code](https://claude.com/claude-code).
1. **Install the plugin.** Download the zip for your system from the
[latest build](https://github.com/MomoPewpew/McpSynth/actions/workflows/build.yml) or a
[release](https://github.com/MomoPewpew/McpSynth/releases). Copy `McpSynth.vst3` and `McpSynth.clap` to:
| | VST3 | CLAP |
|---|---|---|
| Linux | `~/.vst3/` | `~/.clap/` |
| Windows | `C:\Program Files\Common Files\VST3\` | `C:\Program Files\Common Files\CLAP\` |
| macOS | `~/Library/Audio/Plug-Ins/VST3/` | `~/Library/Audio/Plug-Ins/CLAP/` |
The macOS build is unsigned, so your DAW will refuse to load it until you run this once for each bundle:
```bash
xattr -dr com.apple.quarantine <path to the bundle>
```
2. **Install the MCP server.**
```bash
git clone https://github.com/MomoPewpew/McpSynth && cd McpSynth
python3 -m venv .venv && .venv/bin/pip install -e .
```
3. **Connect your agent.** If you start Claude Code inside the `McpSynth` folder, it picks up the server from
`.mcp.json`; approve it when asked. To use it from any folder instead, register it once:
```bash
claude mcp add --scope user mcpsynth -- /path/to/McpSynth/.venv/bin/python -m mcpsynth.server
```
On Windows the interpreter is `.venv\Scripts\python.exe`.
4. **Make sounds.** Put McpSynth on an instrument track; its UI shows its name, e.g. `synth 1`. Then ask:
> Make me 4 ambient pads with long reverb in synth 1.
> The second one is great, make three variations that are darker.
> Make me an acid bassline with lots of glide.
The plugin and the server talk through files in `~/.mcpsynth/`. Saved presets live in `library/`, and each plugin's
test bin lives in `instances/`. Set `MCPSYNTH_DATA` to move this folder. The 📂 buttons in the plugin open it.
### Without a DAW
The server can also render sounds and play them on its own, and there's a command line:
```bash
.venv/bin/mcpsynth render presets/examples/glass-bell.json -p plucks --play
.venv/bin/mcpsynth batch presets/space-scene/*.json -p chord # writes a spectrogram contact sheet
.venv/bin/mcpsynth analyze some-reference.wav
```
Output goes to `renders/`: WAV (32-bit float, 48 kHz), PNG spectrogram, and JSON (patch + analysis).
### Demo presets
`presets/` holds:
- `space-scene/`: ten sounds the agent made for a peaceful, slightly unsettling space scene.
- `ambient-pads/`: four pads the agent made.
- `examples/`: hand-made reference patches.
Copy any of them into `~/.mcpsynth/library/` to see them in the plugin.
## MCP tools
| Tool | What it does |
|---|---|
| `synth_guide` | Returns the patch format, units, recipes and how to read the analysis. |
| `validate_patch` | Checks a patch; errors name the field and the allowed range. |
| `render`, `render_batch` | Render to WAV and return the analysis plus a spectrogram (a contact sheet for batches). |
| `analyze_wav` | Analyzes any audio file, such as a reference sound you want matched. |
| `play`, `stop` | Play renders on your speakers. |
| `save_preset`, `list_presets`, `load_preset` | Manage the shared preset library, with folders. |
| `list_instances`, `send_to_instance`, `get_instance` | Find the plugins open in your DAW, fill their test bins, and see what you saved or rejected. |
## Repository
```
mcpsynth/ Python: patch schema, reference engine, effects, analysis, plots, MCP server, CLI
rust/core/ real-time engine (allocation-free), checked against the Python reference
rust/plugin/ the VST3/CLAP plugin: UI, preset protocol, host integration
docs/GUIDE.md the agent's sound-design manual
docs/PLUGIN_PLAN.md plugin design, file protocol and milestones
presets/ demo preset sets
tests/ DSP tests and the Rust-vs-Python golden tests
```
### Building from source
```bash
.venv/bin/pip install pytest && .venv/bin/python -m pytest -q tests # Python tests
cd rust
cargo test --release --workspace
cargo xtask bundle mcpsynth-plugin --release # -> target/bundled/McpSynth.vst3, McpSynth.clap
cargo build --release -p mcpsynth-core # the renderer the golden tests compare against
cargo run --release -p mcpsynth-core --example bench # CPU per voice (fxbench: per effect)
```
On Linux the plugin needs the usual X11/ALSA/JACK development packages; the workflow file lists them. GitHub
Actions builds and tests all three platforms on every push, and a `v*` tag publishes a release.
## Design
- **The synth exposes precise parameters; the agent translates intent.** There is no "make it ethereal" knob. The
sound-design knowledge lives in the guide and the example presets.
- **Physical units everywhere**, defaults for everything, and validation errors that say what to fix.
- **Feedback loop first.** Agents can't hear, so every render comes back as an image, numbers and words, and `play`
puts your ears in the loop.
- **One reference engine.** The Python renderer defines the sound. The real-time plugin must reproduce it, and the
golden tests hold it to that.
- **Presets stay yours.** They're plain JSON files in a folder you can open, back up and share.
## Known limitations
- The synth has no cross-oscillator FM, FM feedback, oscillator sync or ring modulation yet, and no sampler,
granular or physical-modeling engines.
- Beyond its macro knobs, the plugin has no controls: for deeper changes, ask the agent or edit the JSON.
- Automation lanes show the macros as "Macro 1" to "Macro 4"; only the plugin's own UI shows their names.
- During glides and pitch modulation, wavetables switch at semitone boundaries, so formant vowels follow in steps.
- The analysis judges shape and obvious failures (too quiet, clipping, harsh, muddy), not beauty. Your ears are
the final judge.
- The macOS build is unsigned.
## License
GPL-3.0, see [LICENSE](LICENSE).
TDQS
Scored across 13 tools
Each tool maps to a clearly distinct stage of synth patch work: guidance, WAV analysis, validation, single render, batch render, playback, preset listing/save/load, and DAW instance management. render vs render_batch and play vs render are explicitly differentiated, and analyze_wav targets existing files while render produces new audio.
All names are consistently snake_case, and most follow a verb_noun pattern (analyze_wav, validate_patch, list_presets, render_batch, save_preset, load_preset, list_instances, send_to_instance, get_instance). A few single-verb tools (render, play, stop) and one noun phrase (synth_guide) are natural deviations but keep the set predictable.
13 tools sit comfortably within the ideal 3-15 range for a synth design assistant. Each tool covers a distinct workflow step with no obvious filler.
The surface covers the full lifecycle: guide/schema, reference analysis, validation, rendering/preview, playback, preset list/save/load, and DAW instance discovery plus test-bin exchange. Minor gaps exist around preset deletion/renaming and direct preset editing, but core workflows are fully supported.