Skip to main content
Glama
REAPER Claude MCP Server
by DevWesC
README.md
# REAPER Claude MCP Server

Talk to your DAW. An MCP server that bridges Claude and REAPER via the built-in web control interface — no scripts, no plugins, no setup inside REAPER beyond flipping a switch.

```
Claude  ←→  MCP Server (stdio)  ←→  REAPER Web API (HTTP on localhost:8080)
```

## Why This Exists

Mixing is a creative process that gets constantly interrupted by mechanical busywork. You're thinking about how a vocal should sit in a mix, but what you're actually doing is clicking through track lists, dragging faders, and soloing/unsoloing channels. Every context switch between "what should this sound like?" and "how do I make the software do that?" is a break in flow.

This server lets you control a REAPER session through natural language in Claude. Instead of hunting for a track and adjusting a fader, you say "drop the vocal by 3dB" and it happens. The session state is always live — no polling, no stale data — so Claude can answer questions like "what's soloed right now?" with accuracy.

It uses REAPER's built-in HTTP web control interface, which means zero footprint inside your DAW. No ReaScripts to install, no Lua to manage, no files in your resource path. Enable the web interface in preferences and you're done.

## How It Works

REAPER exposes an HTTP server that accepts commands via URL. All communication uses the format:

```
http://127.0.0.1:8080/_/;COMMAND1;COMMAND2;COMMAND3
```

Commands are semicolon-separated after `/_/`. Commands with sub-paths use forward slashes internally (e.g., `SET/TRACK/1/VOL/0.5`). Multiple commands can be batched in a single request.

| Purpose | URL |
|---------|-----|
| Play | `/_/;CMD;1007` |
| Insert track | `/_/;CMD;40001` |
| Get transport | `/_/;TRANSPORT` |
| Get track 1 | `/_/;TRACK;1` |
| Set track 1 volume | `/_/;SET/TRACK/1/VOL/0.5` |
| Mute track 2 + undo point | `/_/;SET/TRACK/2/B_MUTE/1;SET/UNDO` |
| Set tempo to 140 | `/_/;SET/TEMPO/140` |

Every read queries REAPER live. Every write pushes an undo point so changes are reversible inside the DAW.

## Setup

### 1. Enable REAPER's Web Interface

1. Open REAPER
2. Go to **Options → Preferences → Control/OSC/Web**
3. Click **Add**
4. Select **Web browser interface**
5. Set port to **8080**
6. Click OK

Verify: open `http://127.0.0.1:8080/_/;TRANSPORT` in a browser. You should see transport state data.

### 2. Install & Build

```bash
cd reaper-claude-mcp
npm install
npm run build
```

### 3. Add to Claude Desktop

Add to your `claude_desktop_config.json`:

**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "reaper": {
      "command": "node",
      "args": ["C:/full/path/to/reaper-claude-mcp/dist/index.js"]
    }
  }
}
```

On Windows, you can also run `setup.ps1` to handle steps 2 and 3 automatically.

### 4. Talk to Your DAW

> "What's in my REAPER session?"
> "Mute the drums"
> "Set the tempo to 140"
> "Drop the vocal volume by 3dB"
> "Solo the bass and guitar tracks"
> "Arm the DI track for recording"

## Tools

### Read (real-time, always current)

| Tool | What it does |
|------|-------------|
| `reaper_get_session` | Full session overview: all tracks, transport, markers |
| `reaper_get_track` | Deep dive on one track by name or index |
| `reaper_get_transport` | Play state, tempo, time sig, position |
| `reaper_search_tracks` | Filter tracks by name, mute/solo/arm state |
| `reaper_connection_status` | Check if REAPER is reachable |

### Write (immediate effect)

| Tool | What it does |
|------|-------------|
| `reaper_set_track_volume` | Set volume in dB |
| `reaper_set_track_pan` | Set pan (-100 to 100) |
| `reaper_mute_track` | Mute/unmute |
| `reaper_solo_track` | Solo/unsolo |
| `reaper_arm_track` | Arm/disarm for recording |
| `reaper_set_tempo` | Change BPM |
| `reaper_transport` | Play, stop, pause, record, repeat |
| `reaper_add_track` | Insert new track with optional name |
| `reaper_set_cursor` | Move cursor to time position |
| `reaper_set_master_volume` | Set master fader |
| `reaper_execute_action` | Run any REAPER action by ID |
| `reaper_save` | Save project |
| `reaper_undo` | Undo last action |

Track commands accept names (partial, case-insensitive match) or numeric indices. Say "the vocals" instead of "track 7".

## Project Structure

```
src/
  index.ts                    Entry point — MCP server bootstrap
  constants.ts                Server identity
  services/
    reaper-client.ts          HTTP client for REAPER web API
  tools/
    helpers.ts                Track resolution, formatting, response builders
    session-tools.ts          Read-only tools (get session, tracks, transport)
    command-tools.ts          Write tools (volume, pan, mute, transport controls)
```

For design rationale and architectural decisions, see [ARCHITECTURE.md](ARCHITECTURE.md).

## What Changed in v2

- **Removed unused `express` dependency** — server is pure MCP over stdio
- **Centralized URL building** — single `send()` method that correctly formats `/_/;CMD1;CMD2`
- **Fixed track query URLs** — `TRACK;1` not `TRACK/1` (semicolons separate commands)
- **Uses correct REAPER property names** — `B_MUTE`, `I_SOLO`, `I_RECARM` for set operations
- **Adds `SET/UNDO` after mutations** — so changes appear in REAPER's undo history
- **Fixed transport state parsing** — uses proper numeric playstate codes (0/1/2/5/6)
- **Extracted shared helpers** — `resolveTrack`, `ok/err`, formatting into `helpers.ts`
- **BEATPOS query for reliable tempo** — falls back gracefully if unavailable

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `REAPER_HOST` | `127.0.0.1` | REAPER host |
| `REAPER_PORT` | `8080` | REAPER web interface port |

## License

[MIT](LICENSE)