Labsco
xDarkzx logo

ReaperMCP

β˜… 25

from xDarkzx

AI-powered music production in REAPER via the Model Context Protocol β€” 150 tools for composition, mixing, mastering, and audio analysis.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeNeeds API keys

ReaperMCP

AI-powered music production in REAPER through the Model Context Protocol

Quick Start β€’ Features β€’ Tools Reference β€’ Architecture β€’ Troubleshooting


ReaperMCP connects any MCP-compatible AI assistant to REAPER, giving it full control over music production through 153 tools across 24 modules β€” transport, tracks, MIDI, patterns (drum / chord progressions), loop-library pipeline (scan folder β†’ pick by BPM/key β†’ load into REAPER), FX, envelopes, sidechain, mixing, mastering, bus pipelines, and objective audio analysis. Talk to your AI assistant and it composes, mixes, masters, and measures your music in real-time β€” the AI chooses every note, rhythm, and CC itself.

ReaperMCP itself runs entirely on your machine via a file-based Lua IPC bridge inside REAPER β€” your project, audio, and MIDI never leave your computer. The AI "brain" naturally lives wherever you already run it: Claude Desktop / Claude Code / Cursor / Antigravity / any MCP client. You bring the AI, ReaperMCP handles REAPER.

Works With

ReaperMCP works with any AI client that supports the Model Context Protocol:


Features

153 Tools Across 24 Modules

CategoryToolsHighlights
Transport11Play, stop, pause, record, set BPM, time signature, playrate, toggle repeat/metronome
Tracks18Create, delete, rename, volume, pan, mute, solo, arm, colour, input, folder, mixer state, peak meter, freeze/unfreeze
Track Templates4Save, apply, list, and delete REAPER track templates
Project11New, open, save, export audio (WAV/MP3/OGG/FLAC/AIFF), undo/redo, notes, grid
Items13Get/select/split/delete/move items, set length/volume/mute/fade, insert media, create MIDI
Takes4List, add, delete, and switch active take
MIDI13Insert notes (single/batch), edit/delete notes, insert/delete CC, count events, note names, sort, set extents (CC reading intentionally omitted β€” see below)
MIDI Quantize / Humanize3midi_quantize, midi_humanize, project_set_ripple_mode
Markers & Regions6Add markers/regions, delete, edit, navigate (+ add_markers_batch in Composition Editing)
Tempo Map4Add/delete/list tempo markers, clear all
Envelopes3Read, write, and clear automation envelopes (track / item / FX-param)
Selection9Time selection, loop points, select/deselect all items/tracks, get selected
Sends & Routing7Create/remove sends, set volume/pan/mute, full routing diagram
FX15Add/remove plugins, get/set parameters, presets, enable/disable, show UI, find instrument, move within chain, rename display label
FX Inventory2fx_list_installed (detects FabFilter / Waves / iZotope / Valhalla / racks), set_fx_preferences
Mix & Master3engine_mix, engine_master, engine_fix_mix β€” 25 style profiles across EDM / Rock / Pop / Electronic
Sidechain1setup_sidechain — pin-mapped kick→bass/pad pumping with a single amount dial
Bus Pipelines4setup_parallel_compression, setup_drum_bus, setup_vocal_chain, bounce_stems
Composition Utility3get_track_instruments, analyze_score, compose_arrangement (small batch insert)
Composition Editing9wipe_all_midi, reset_composition, configure_tracks, setup_routing, add_markers_batch, rewrite_cc, edit_section, setup_fx_chain, setup_effect_bus
Patterns2create_drum_pattern (multi-lane step-sequencer notation), create_chord_progression (parses "Cm7, Fm7, Bb7, Eb" into voiced MIDI)
Loop Library3scan_audio_folder (parse BPM / key / role from filenames), detect_common_bpm, load_loops (batch-create tracks + load stems). Point at a sample-pack folder and the AI builds a track from it.
Audio Analysis4analyze_loudness (LUFS vs. streaming/broadcast/cinema target), analyze_clipping, analyze_frequency_spectrum, analyze_stereo_field β€” objective mix metrics for measure β†’ correct loops. Optional extras: pip install 'reaper-mcp[analysis]'
Demo1demo_edm_project β€” one-shot full-project demo render (smoke test + reference)

See docs/TOOLS.md for the complete tool reference with every signature and a one-line description for each tool.

Tool profiles

The default 147-tool surface is designed for full-featured frontier models. Smaller/cheaper models (Groq Llama 3 caps at 128 tools, some local models lower still) will silently truncate. Set REAPER_MCP_PROFILE in your client's server config to pick a workflow-specific subset:

ProfileToolsFor
full (default)~153Frontier models β€” Claude, GPT-4, Gemini
composition~109Writing / editing music (includes patterns + loops)
mixing~67Mixing, mastering, bus pipelines
analysis~47Inspect + measure only
minimal~40Smoke test / basic control
{
  "mcpServers": {
    "reaper": {
      "command": "reaper-mcp",
      "env": { "REAPER_MCP_PROFILE": "mixing" }
    }
  }
}

Mixing & Mastering Pipelines

25 professional style profiles drive automatic EQ, compression, reverb buses, sidechain pumping, and mastering β€” each tuned to industry-standard LUFS targets and character.

ToolWhat It Does
engine_mix(style)Per-track EQ + compression + reverb buses with send routing. Auto-detects FabFilter Pro-Q 3 / Pro-C 2 / Pro-R or falls back to REAPER stock (ReaEQ / ReaComp / ReaVerbate)
engine_master(style)Master-bus chain: HP 25 Hz β†’ bus glue comp β†’ tonal shelf EQ β†’ stereo width β†’ brick-wall limiter, targeting style-specific LUFS and true-peak ceilings
engine_fix_mix(style)Non-destructive repair pass β€” re-runs the mix pipeline on an existing session, preserving user tweaks where possible
setup_sidechain(source, target, amount)Kick β†’ bass / pad pumping via channels 3/4 + pin-mapped sidechain inputs
setup_drum_bus / setup_parallel_compression / setup_vocal_chainReady-made bus recipes for drums, parallel (NY) comp, and pro vocal chains
bounce_stems(track_indices)Render selected tracks individually to WAV stems

Styles (25):

  • EDM (11): melodic_dubstep, big_room, future_bass, future_house, deep_house, tech_house, progressive_house, dubstep, trap, drum_and_bass, trance
  • Rock (6): alt_rock, classic_rock, pop_rock, hard_rock, punk, post_rock
  • Pop (4): modern_pop, dance_pop, indie_pop, rnb_pop
  • Electronic (4): synthwave, lofi, ambient, hiphop

Smart plugin detection. fx_list_installed() inspects what's on the user's machine and reports the best-available EQ / compressor / reverb / limiter / de-esser / gate / saturator / multiband / stereo tool β€” covering FabFilter, Waves, iZotope, Valhalla, Softube, TDR, Slate, Melda, Soundtoys, Airwindows, REAPER stock, and common rack hosts (Waves StudioRack, Blue Cat PatchWork, Kilohearts Snap Heap). Users can pin category β†’ plugin preferences via set_fx_preferences(...).

AI-Driven Composition

The AI writes every note, rhythm, CC curve, and keyswitch itself using the granular MIDI and FX tools above. A single 00_core.md instruction file provides the tool surface, shorthand notation, BBC Spitfire CC reference, and per-family mixing tips. Voicing, humanization, structure, and genre conventions all come from the AI's own musical knowledge.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     stdio      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   file IPC    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MCP Client  │◄──────────────►│  ReaperMCP   │◄────────────►│    REAPER    β”‚
β”‚(AI assistant)β”‚    (JSON-RPC)  β”‚   FastMCP    β”‚  (JSON files) β”‚  (Lua script)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The Python server writes commands to command.json in a shared temp directory; a Lua script inside REAPER polls, executes, and writes results to response.json. No sockets, no ports, no network exposure.

IPC directory:

  • Windows: %TEMP%\reaper_mcp
  • macOS: $TMPDIR/reaper_mcp
  • Linux: /tmp/reaper_mcp

Key design decisions

  • File-based IPC β€” no port allocation, no firewall surface.
  • Static Lua dispatch β€” every handler is explicit code, no load / dofile / loadstring.
  • Dynamic tool registration β€” drop a module into reaper_mcp/tools/, export register(mcp), and it's picked up automatically.
  • Heartbeat + timeouts β€” the client detects a stale REAPER (no lock-file update) and raises a typed error instead of hanging.
  • Conservative per-call limits β€” MAX_COMPOSE_TRACKS, MAX_TOTAL_NOTES_PER_CALL etc. keep any single command under ~2 s of REAPER's main thread time.

Full details β€” IPC protocol, request lifecycle, registration internals, mix-engine pipeline, style catalog β€” in docs/ARCHITECTURE.md.

Project structure

Reaper-MCP/
β”œβ”€β”€ reaper_mcp/
β”‚   β”œβ”€β”€ main.py                     # FastMCP server entry (`reaper-mcp` command)
β”‚   β”œβ”€β”€ tool_registry.py            # Auto-discovers tool modules
β”‚   β”œβ”€β”€ reaper_client.py            # File-IPC client (lock, heartbeat, timeouts)
β”‚   β”œβ”€β”€ cc_map.py                   # CC number translation helpers
β”‚   β”œβ”€β”€ shorthand.py                # Compact composition notation parser
β”‚   β”œβ”€β”€ instructions/
β”‚   β”‚   └── 00_core.md              # System-prompt instructions injected into MCP
β”‚   β”œβ”€β”€ mix_engine/                 # Mixing + mastering pipelines
β”‚   β”‚   β”œβ”€β”€ __init__.py             # run_mix_pipeline
β”‚   β”‚   β”œβ”€β”€ master.py               # run_master_pipeline
β”‚   β”‚   β”œβ”€β”€ fix_mix.py              # Non-destructive mix repair
β”‚   β”‚   β”œβ”€β”€ detect.py               # FabFilter / REAPER stock detection
β”‚   β”‚   β”œβ”€β”€ fx_inventory.py         # Installed-plugin discovery
β”‚   β”‚   β”œβ”€β”€ plugins.py              # Plugin param translation
β”‚   β”‚   β”œβ”€β”€ profiles.py             # Legacy orchestral profiles
β”‚   β”‚   β”œβ”€β”€ profiles_v2.py          # Schema for 25 style profiles
β”‚   β”‚   └── catalog/                # Per-family style catalog
β”‚   β”‚       β”œβ”€β”€ edm.py              # 11 EDM subgenres
β”‚   β”‚       β”œβ”€β”€ rock.py             # 6 rock subgenres
β”‚   β”‚       β”œβ”€β”€ pop.py              # 4 pop subgenres
β”‚   β”‚       β”œβ”€β”€ electronic.py       # synthwave, lofi, ambient, hiphop
β”‚   β”‚       └── _shared.py          # Shared role β†’ EQ/comp library
β”‚   └── tools/                      # 24 modules, 153 auto-registered tools
β”‚       β”œβ”€β”€ transport_tools.py      # Playback and recording (11)
β”‚       β”œβ”€β”€ track_tools.py          # Track management + freeze (18)
β”‚       β”œβ”€β”€ template_tools.py       # Track templates (4)
β”‚       β”œβ”€β”€ project_tools.py        # Project/file operations (11)
β”‚       β”œβ”€β”€ item_tools.py           # Media item management (13)
β”‚       β”œβ”€β”€ take_tools.py           # Takes (4)
β”‚       β”œβ”€β”€ midi_tools.py           # MIDI notes and CC (13)
β”‚       β”œβ”€β”€ quantize_tools.py       # Quantize / humanize / ripple (3)
β”‚       β”œβ”€β”€ marker_tools.py         # Markers and regions (6)
β”‚       β”œβ”€β”€ tempo_tools.py          # Tempo map markers (4)
β”‚       β”œβ”€β”€ envelope_tools.py       # Automation envelopes (3)
β”‚       β”œβ”€β”€ selection_tools.py      # Selection and loop (9)
β”‚       β”œβ”€β”€ send_tools.py           # Sends and routing (7)
β”‚       β”œβ”€β”€ fx_tools.py             # FX chain + params (14)
β”‚       β”œβ”€β”€ inventory_tools.py      # fx_list_installed + set_fx_preferences (2)
β”‚       β”œβ”€β”€ mix_tools.py            # engine_mix / engine_master / engine_fix_mix (3)
β”‚       β”œβ”€β”€ sidechain_tools.py      # setup_sidechain (1)
β”‚       β”œβ”€β”€ pipeline_tools.py       # Drum bus, parallel comp, vocal chain, stems (4)
β”‚       β”œβ”€β”€ compose_tools.py        # get_track_instruments, analyze_score, compose_arrangement (3)
β”‚       β”œβ”€β”€ compose_edit_tools.py   # wipe_all_midi, edit_section, rewrite_cc, … (9)
β”‚       β”œβ”€β”€ patterns_tools.py       # create_drum_pattern, create_chord_progression (2)
β”‚       β”œβ”€β”€ loops_tools.py          # scan_audio_folder, detect_common_bpm, load_loops (3)
β”‚       β”œβ”€β”€ analysis_tools.py       # LUFS, clipping, spectrum, stereo field (4, optional deps)
β”‚       β”œβ”€β”€ demo_tools.py           # demo_edm_project (1)
β”‚       └── compose_helpers.py      # Shared helpers (no tools)
β”œβ”€β”€ reaper_mcp_shared/
β”‚   β”œβ”€β”€ constants.py                # IPC paths, timeouts, safety limits
β”‚   β”œβ”€β”€ error_codes.py              # ReaperMCPError + ErrorCode enum
β”‚   └── protocol.py                 # Command / response formatting
β”œβ”€β”€ reaper_scripts/
β”‚   └── reaper_mcp_server.lua       # Lua IPC bridge (runs inside REAPER)
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ INSTALLATION.md             # Detailed setup for all platforms
β”‚   β”œβ”€β”€ PROJECT_SETUP.md            # Template setups for orchestral / pop / EDM
β”‚   β”œβ”€β”€ TOOLS.md                    # Complete tool reference
β”‚   └── ARCHITECTURE.md             # IPC protocol, mix engine, design notes
β”œβ”€β”€ tests/
β”œβ”€β”€ install.bat / install.sh        # One-click installers
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE
└── pyproject.toml

Setting Up Your REAPER Project

ReaperMCP controls REAPER β€” but you need instruments loaded for the AI to compose with. The AI can create tracks and write MIDI, but it can't browse or install VST plugins for you.

Before You Start Composing

  1. Open REAPER and create a new project
  2. Add tracks with your desired VST instruments (Kontakt, Spitfire, LABS, etc.)
  3. Load patches β€” e.g., "Violin 1 Legato", "French Horn a4", "Grand Piano"
  4. Save as a template (File β†’ Save Project As Template) so you don't repeat this every time

The AI will use get_track_instruments to detect what's loaded and compose for those instruments automatically.

See the full Project Setup Guide for recommended instrument templates (orchestral, pop/rock, EDM) and what plugins to load.


Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -x -q

Adding New Tools

  1. Create a module in reaper_mcp/tools/ (or add to an existing one)
  2. Export a register(mcp: FastMCP) function
  3. Define your tools with @mcp.tool() decorators
  4. That's it β€” the tool registry auto-discovers it on startup

See CONTRIBUTING.md for full guidelines.


Support

If ReaperMCP has helped with your music production, consider buying me a coffee:

Your support helps keep this project maintained and free for everyone.


Documentation

  • Installation Guide β€” Detailed setup for Windows, macOS, Linux and every supported MCP client
  • Project Setup Guide β€” Setting up your REAPER project with instruments for AI composition
  • Tools Reference β€” Every tool grouped by domain, with a one-line description and signature
  • Architecture β€” IPC protocol, Lua bridge, dynamic tool registration, mix-engine pipeline, style catalog
  • Contributing β€” How to add tools and contribute
  • Changelog β€” Version history and release notes