Skip to main content
Glama
README.md
<p align="center">
  <img src="assets/banner.svg" alt="Surge XT MCP — AI sound design and live control for the Surge XT synthesizer" width="100%">
</p>

<p align="center">
  <a href="https://github.com/RandyNorthrup/surge-xt-mcp/actions/workflows/ci.yml"><img src="https://github.com/RandyNorthrup/surge-xt-mcp/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
  <a href="https://github.com/RandyNorthrup/surge-xt-mcp/releases"><img src="https://img.shields.io/github/v/release/RandyNorthrup/surge-xt-mcp?include_prereleases&label=release" alt="Release"></a>
  <img src="https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white" alt="Python 3.11+">
  <img src="https://img.shields.io/badge/MCP-stdio%20%2B%20HTTP-6E56CF" alt="MCP transports">
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License"></a>
  <img src="https://img.shields.io/badge/status-beta%20v0.1.0-orange" alt="Beta v0.1.0">
</p>

<p align="center"><strong>Describe a sound in plain English. Hear it in Surge XT seconds later.</strong></p>

Surge XT MCP is a professional [Model Context Protocol](https://modelcontextprotocol.io/) server that gives AI assistants (Claude, Cursor, and any MCP client) deep, live control of [Surge XT](https://surge-synthesizer.github.io/), the free open-source hybrid synthesizer. It speaks Surge XT's native Open Sound Control (OSC) protocol, so every move happens in your running synth — in the standalone app or inside your DAW — with float precision, full parameter readback in real units (Hz, seconds, percent), patch browsing across the ~3,000-patch factory library, and an inspectable sound-design recipe engine.

> **Beta (v0.1.0).** The live OSC workflow is the supported path and works with the standard Surge XT installer. Offline WAV rendering activates automatically when the optional `surgepy` bindings are present. See the [roadmap](#roadmap) for what is next.

## Highlights

- **Sound design in words** — `design_sound` turns "dark punchy reese bass" or "wide evolving cinematic pad" into an inspectable recipe (address, value, reason for every move). Review it, tweak it, then `apply_recipe`.
- **Total live control** — friendly controls (`set_filter`, `set_envelope`, macros, wavetable cycling, modulation routing) plus a raw `/param/...` escape hatch for Surge XT's full parameter set.
- **Hear every decision** — `play_note`, `play_chord`, and `play_melody` audition over OSC; `get_parameter` reads back Surge XT's own display strings.
- **Whole library at your fingertips** — browse, search, load, step, randomize, and save patches across factory, third-party, and user libraries. Works offline for browsing.
- **Honest offline rendering** — `render_preview` renders WAV headlessly when `surgepy` is installed and explains exactly how to enable it when it is not. It never fakes audio.
- **Zero-friction install** — one `uvx` command in your MCP client config. No C++ build, no DAW project changes.

## Quick start

### 1. Install Surge XT and enable OSC

Install [Surge XT 1.3+](https://surge-synthesizer.github.io/), open it (standalone or as a plugin), then go to **Menu → OSC Settings** and enable:

- **OSC In** on port `53280`
- **OSC Out** to `127.0.0.1` on port `53281`

Keep Surge XT open while using live tools. Full diagnosis is built in: ask your assistant to run `surge_doctor`.

### 2. Add the server to your MCP client

**Claude Desktop / Cursor** (`claude_desktop_config.json` / `.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "surge-xt": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/RandyNorthrup/surge-xt-mcp", "surge-xt-mcp"]
    }
  }
}
```

**Claude Code:**

```bash
claude mcp add surge-xt -- uvx --from git+https://github.com/RandyNorthrup/surge-xt-mcp surge-xt-mcp
```

**Local checkout (developers):**

```bash
git clone https://github.com/RandyNorthrup/surge-xt-mcp.git
cd surge-xt-mcp
uv sync --extra dev
uv run surge-xt-mcp
```

Copy-ready configs for Claude Desktop, Cursor, VS Code, and HTTP mode live in [`examples/`](examples/).

### 3. Try it

> "Use Surge XT: check the connection, design a dark punchy bass, play a low C riff so I can hear it, then save it as *Midnight Reese*."

## Tools

| Tool | What it does |
| --- | --- |
| `surge_status` | Connection, current patch, render availability |
| `surge_doctor` | Full install/OSC diagnosis with setup steps |
| `list_patch_categories`, `list_patches` | Browse ~3,000 factory + user patches (offline OK) |
| `load_patch`, `save_patch`, `random_patch`, `next_patch` | Patch management over OSC |
| `list_parameters`, `get_parameter`, `set_parameter` | Curated catalog + raw `/param/...` access, real-unit readback |
| `set_filter`, `set_envelope`, `set_macro`, `cycle_wavetable` | Fast sound-shaping moves |
| `set_modulation` | Route LFOs/envelopes/macros onto any parameter |
| `design_sound`, `apply_recipe` | English → inspectable recipe → live sound |
| `play_note`, `play_chord`, `play_melody`, `stop_notes` | Auditioning over OSC |
| `render_preview` | Headless WAV render (optional `surgepy`) |

Plus resources (`surge://guide`, `surge://parameters`) and prompts (`design_a_sound`, `explain_current_patch`) for guided sessions.

## Configuration

| Variable | Default | Meaning |
| --- | --- | --- |
| `SURGE_OSC_HOST` | `127.0.0.1` | Surge XT host |
| `SURGE_OSC_SEND_PORT` | `53280` | Surge XT OSC In port |
| `SURGE_OSC_RECV_PORT` | `53281` | Surge XT OSC Out port (replies) |
| `SURGE_OSC_TIMEOUT` | `2.0` | Query timeout in seconds |
| `SURGE_PATCH_DIRS` | — | Extra patch folders (path-list separated) |
| `MCP_TRANSPORT` | `stdio` | `stdio` or `http` (Streamable HTTP) |
| `MCP_HTTP_HOST` / `MCP_HTTP_PORT` | `127.0.0.1` / `8000` | HTTP bind |

See [`.env.example`](.env.example). Protocol details are in [`docs/OSC.md`](docs/OSC.md); design decisions are in [`PLAN.md`](PLAN.md) and [`PROJECT_BRIEF.md`](PROJECT_BRIEF.md).

## How it works

```text
MCP client (Claude / Cursor)
        |  MCP over stdio or HTTP
        v
surge-xt-mcp (Python, FastMCP)
   |-- patch library scan (.fxp on disk, offline)
   |-- recipe engine (English -> /param moves)
   |-- OSC client --UDP 53280--> Surge XT 1.3+ (standalone or DAW)
   |<-- replies / display values --UDP 53281--|
   `-- optional surgepy engine -> WAV renders
```

Surge XT parameter values travel as normalized floats (0.0–1.0). The server always offers Surge XT's display string alongside, so agents reason in Hz and seconds instead of guessing.

## Development

```bash
uv sync --extra dev
uv run pytest
uv run ruff check src tests
uv run ruff format --check src tests
uv run mypy
uv run surge-xt-mcp
```

Test with the MCP Inspector: `npx @modelcontextprotocol/inspector uv run surge-xt-mcp`. The OSC test suite runs against a fake Surge XT, so no synth is needed in CI. Live verification steps are in [`docs/OSC.md`](docs/OSC.md).

## Roadmap

- v0.1.x: harden curated parameter map against live `/q/all_params` discovery; FX-chain helpers.
- v0.2: full live catalog sync, modulation inspection, tuning control.
- Later: PyPI release (`uvx surge-xt-mcp`), preset exchange format, DAW transport helpers.

## Contributing and license

Issues and pull requests are welcome — see the issue templates. This server is [MIT licensed](LICENSE). Surge XT itself is GPL-3.0-or-later by the Surge Synth Team; this project communicates over OSC and redistributes no Surge XT code. Not affiliated with the Surge Synth Team.

TDQS

A3.5/5.0

Scored across 23 tools

Disambiguation4/5

Most tools map to a distinct resource+action (patch browse/load/save, parameter read/write, note audition, modulation routing). The main overlaps are surge_doctor vs surge_status (both report install/config/OSC health) and the convenience wrappers set_filter/set_envelope/set_macro versus the generic set_parameter, though their descriptions give enough guidance to pick correctly. play_note/play_chord/play_melody are separable by scope.

Naming Consistency4/5

The dominant pattern is verb_noun (play_chord, load_patch, set_parameter, list_patches, apply_recipe, cycle_wavetable), which is easy to scan and group. Deviations are minor but real: random_patch and next_patch omit the verb, and surge_doctor/surge_status use a noun-prefixed namespace style mixed with the rest.

Tool Count4/5

23 tools is at the upper edge, but the domain legitimately spans patch management, parameter editing, modulation routing, auditioning, rendering, and diagnostics, and most tools carry distinct responsibilities. There is some fat that could be trimmed (doctor/status duplication, three play_* variants), but nothing is clearly superfluous.

Completeness5/5

The surface covers the full lifecycle: discover (categories/patch lists/parameters), inspect (get_parameter, surge_status, surge_doctor), mutate (set_parameter, filter, envelope, modulation, macro, apply_recipe), persist (save_patch), audition (play_*), and render (render_preview). Notable only minor gaps such as patch deletion/rename and querying existing modulation routings, which agents can largely work around.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues