Skip to main content
Glama
README.md
# reaper-mcp

MCP server that connects Claude CLI to Reaper for AI-assisted VST plugin tuning.

**Loop:** play riff → capture audio → Claude analyzes spectrum → proposes DSP changes → builds plugin → reload in Reaper → repeat.

---

## Setup

### 1 — Install Python dependencies (Windows)

```bat
cd server
python -m venv .venv
.venv\Scripts\activate
pip install -r ..\requirements.txt
```

### 2 — Configure Claude CLI

Add to `%APPDATA%\Claude\claude_desktop_config.json` (Claude Desktop) or `.claude/settings.json` (Claude CLI):

```json
{
  "mcpServers": {
    "reaper": {
      "command": "C:\\path\\to\\reaper-mcp\\server\\.venv\\Scripts\\python.exe",
      "args":    ["C:\\path\\to\\reaper-mcp\\server\\main.py"],
      "env": {
        "REAPER_MCP_REPO": "C:\\path\\to\\vst-distortion-power-house"
      }
    }
  }
}
```

### 3 — Load the Reaper bridge script

In Reaper:
1. **Actions → Show action list → ReaScript: Run script**
2. Select `reaper/mcp_bridge.lua`
3. It will show "MCP Bridge running." in the Reaper console and stay active

Bind a hotkey to **Script: mcp_bridge.lua** so you can restart it quickly.

---

## Usage

With Claude CLI open and MCP connected:

```
> capture_audio        # after playing a riff — renders last 4s and analyzes
> get_plugin_params    # see current LandsDist knob positions
> set_plugin_param Gain 0.8   # tweak live in Reaper
> build_plugin         # after code changes — incremental build
> reload_plugin        # Reaper picks up new VST3
```

Claude will call these tools automatically during a tuning session.

---

## How it works

```
Reaper ←──── mcp_bridge.lua (Lua, polls %TEMP%\reaper_mcp_cmd.json)
                    ↕  temp files
Python MCP server (server/main.py, stdio)
                    ↕  MCP protocol
Claude CLI (Windows)
```

The Lua bridge polls a temp file every 150ms. The Python server writes a command, waits up to 10s for a response, then returns the result to Claude as a tool call result.

---

## Adding support for other plugins

Set `REAPER_MCP_REPO` to any other VST repo path. Pass `plugin_name` matching the FX name in Reaper's FX chain.