Skip to main content
Glama

Scythe MCP - REAPER Integration

AI-powered music composition and control for REAPER DAW via Model Context Protocol.

Features

  • OSC Control: Transport, tempo, volume, pan, mute/solo

  • MIDI Generation: Create tracks, items, and notes programmatically

  • execute_lua: Full REAPER control via ReaScript

  • Music Theory: Scales, chords, progressions, rhythm patterns

  • Generators: Drums, basslines, and melodies

Related MCP server: reaper-reapy-mcp

Quick Start

1. Install Python dependencies

cd /path/to/scythe_mcp_reaper
uv sync

2. Configure REAPER OSC

  1. Preferences > Control/OSC/Web > Add

  2. Select OSC (Open Sound Control)

  3. Configure:

    • Mode: Local port

    • Port: 8000

    • Local IP: 127.0.0.1

3. Load the Lua script

  1. Copy scythe_mcp/reascript/scythe_poller.lua to REAPER Scripts folder

  2. Actions > Load ReaScript > Select the file

  3. Run the script (it will poll for commands in the background)

4. Add to MCP config

Add to your MCP client configuration (e.g., Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "scythe": {
      "command": "uv",
      "args": ["run", "scythe-mcp"],
      "cwd": "/path/to/scythe_mcp_reaper"
    }
  }
}

Available Tools

Tool

Description

play, stop, record

Transport control

set_tempo(bpm)

Change project tempo

create_track(name)

Create new track with name

insert_midi_item(track, start, length)

Create MIDI item on track

add_notes(track, item, notes)

Insert MIDI notes

set_track_volume(track, vol)

Set volume (0-1)

mute_track, solo_track

Mute/solo toggle

execute_lua(code)

Run any Lua code in REAPER

trigger_action(id)

Trigger REAPER action by ID

Project Structure

scythe_mcp/
├── server/
│   ├── main.py           # MCP server with tool definitions
│   └── reaper_bridge.py  # OSC + file-based command bridge
├── reascript/
│   ├── scythe_poller.lua # REAPER Lua polling script
│   └── install.md        # Setup guide
├── music_theory/
│   ├── scales.py         # 15+ scales and modes
│   ├── chords.py         # Chord parsing and construction
│   ├── progressions.py   # Genre-specific chord progressions
│   └── rhythm.py         # Time signatures, note values
└── generators/
    ├── drums.py          # Drum pattern generation
    ├── basslines.py      # Bass line generation
    └── melodies.py       # Melody generation

Bridge Architecture

The system uses a file-based command bridge between Python and REAPER:

  1. Python writes commands to %TEMP%/scythe_mcp/command.json

  2. Lua script polls this file every 100ms

  3. Lua executes the command and writes result to response.json

  4. Python reads the response

This approach bypasses REAPER's limited OSC capabilities for complex operations like MIDI note insertion.

Known Limitations

  • Melody generator produces harmonically correct but not necessarily musical results

  • PPQ timing assumes 960 ticks per quarter note (standard for most REAPER projects)

  • The Lua polling script must be running in REAPER for commands to execute

Example Usage

from scythe_mcp.server.reaper_bridge import ReaperBridge

bridge = ReaperBridge()
bridge.set_tempo(120)
res = bridge.create_track("My Track")
track_idx = res["track_index"]
bridge.insert_midi_item(track_idx, 0, 16)  # 16 beats
bridge.add_notes(track_idx, 0, [
    {"pitch": 60, "start": 0, "duration": 1, "velocity": 100},
    {"pitch": 64, "start": 1, "duration": 1, "velocity": 90},
])

License

MIT

Available Tools

17 tools
add_notesA
Add MIDI notes to an existing MIDI item.

Args:
    track_number: Track number (1-based)
    item_index: Index of the MIDI item (0-based)
    notes: List of note dictionaries with:
        - pitch: MIDI note number (0-127, middle C = 60)
        - start: Start position in beats (relative to item)
        - duration: Duration in beats
        - velocity: Velocity (1-127, default 100)

Inputs: track_number (required), item_index (required), notes (required). Returns: result

arm_trackA
Arm or disarm a track for recording.

Args:
    track_number: Track number (1-based)
    armed: True to arm, False to disarm

Inputs: track_number (required), armed. Returns: result

create_midi_itemB
Create a MIDI item on a track.

Args:
    track_number: Track number (1-based)
    position: Start position in beats
    length: Length in beats (default: 4 = 1 bar in 4/4)

Inputs: track_number (required), position, length. Returns: result

create_trackB
Create a new track.

Args:
    name: Name for the new track

Inputs: name. Returns: result

execute_luaA
Execute arbitrary Lua code in REAPER.

This gives full control over REAPER via ReaScript.
The code runs in REAPER's Lua environment with access to the reaper.* API.

Args:
    code: Lua code to execute

Example:
    execute_lua("reaper.ShowMessageBox('Hello from MCP!', 'Test', 0)")

Inputs: code (required). Returns: result

get_session_infoB
Get information about REAPER. Note: OSC is primarily for sending commands.
Use this to confirm connection is working.

Inputs: no named parameters. Returns: result

goto_positionB
Move cursor to a specific position.

Args:
    seconds: Position in seconds

Inputs: seconds (required). Returns: result

mute_trackB
Mute or unmute a track.

Args:
    track_number: Track number (1-based)
    muted: True to mute, False to unmute

Inputs: track_number (required), muted. Returns: result

playB

Start playback.

Inputs: no named parameters. Returns: result

recordB

Start recording.

Inputs: no named parameters. Returns: result

select_trackC
Select a track.

Args:
    track_number: Track number (1-based)

Inputs: track_number (required). Returns: result

set_tempoA
Set the project tempo in BPM.

Args:
    tempo: Tempo in beats per minute (20-999)

Inputs: tempo (required). Returns: result

set_track_panB
Set track pan position.

Args:
    track_number: Track number (1-based)
    pan: Pan position (-1.0 = full left, 0.0 = center, 1.0 = full right)

Inputs: track_number (required), pan (required). Returns: result

set_track_volumeB
Set track volume.

Args:
    track_number: Track number (1-based, as shown in REAPER)
    volume: Volume level (0.0 = -inf dB, 1.0 = 0 dB)

Inputs: track_number (required), volume (required). Returns: result

solo_trackB
Solo or unsolo a track.

Args:
    track_number: Track number (1-based)
    solo: True to solo, False to unsolo

Inputs: track_number (required), solo. Returns: result

stopB

Stop playback.

Inputs: no named parameters. Returns: result

trigger_actionB
Trigger a REAPER action by name.

Available actions:
- Transport: play, stop, pause, record, rewind, forward
- Project: save, save_as, new_project, undo, redo
- Tracks: insert_track, delete_track, duplicate_track
- View: zoom_fit, toggle_mixer

Args:
    action_name: Name of the action to trigger

Inputs: action_name (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity. Tools like add_notes, create_midi_item, and create_track handle different MIDI/track creation tasks, while transport controls (play, record, stop) and track controls (mute_track, solo_track, arm_track) are well-separated. Even execute_lua and trigger_action serve different automation purposes without overlap.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern throughout. Examples include add_notes, arm_track, create_midi_item, get_session_info, and set_tempo. The naming is predictable and readable, with no deviations in style or convention.

    Tool Count5/5

    With 17 tools, the set is well-scoped for a DAW control server, covering essential operations like transport, track management, MIDI editing, and automation. Each tool earns its place without bloat, providing comprehensive control over REAPER's core functionalities in a manageable number.

    Completeness5/5

    The tool surface offers complete coverage for DAW operations, including CRUD for tracks and MIDI items, transport controls, track state management (mute/solo/arm/volume/pan), tempo setting, and advanced automation via execute_lua and trigger_action. There are no obvious gaps that would hinder agent workflows in this domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      A
      maintenance
      Connects AI assistants to REAPER for music production, enabling full control over tracks, MIDI, mixing, mastering, and audio analysis through 153 tools across 24 modules.
      174
      117
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      This MCP server enables AI assistants to control a live REAPER DAW instance, including transport, tracks, FX, MIDI, media, markers, rendering, and project state, with an escape hatch for arbitrary ReaScript commands.
      40
      MIT