Control FL Studio using natural language through Claude AI via the Model Context Protocol (MCP).
- Transport Control: Play, stop, record, get playback state
- Pattern Management: Create, select, and rename patterns
- Channel Rack: View all channels with volume, pan, mute status
- Mixer Info: Get mixer track information
- FL Studio (Windows/macOS)
- Node.js 18+
- Virtual MIDI Driver:
- Windows: loopMIDI
- macOS: Use IAC Driver (built-in) - see instructions below
- Linux: Use ALSA virtual MIDI ports
git clone https://github.com/your-repo/fl-studio-mcp.git
cd fl-studio-mcp
npm install
npm run build- Install loopMIDI
- Create two ports:
FL Bridge In(commands to FL Studio)FL Bridge Out(responses from FL Studio)
- Open Audio MIDI Setup (Applications > Utilities)
- Show MIDI Studio (Window > Show MIDI Studio)
- Double-click IAC Driver
- Check "Device is online"
- Add two ports:
FL Bridge InFL Bridge Out
sudo modprobe snd-virmidi
# Creates virtual MIDI ports accessible via ALSACopy the fl-bridge folder to FL Studio's Hardware folder:
- Windows:
Documents\Image-Line\FL Studio\Settings\Hardware\FLBridge\ - macOS:
Documents/Image-Line/FL Studio/Settings/Hardware/FLBridge/
The folder should contain:
FLBridge/
├── device_FLBridge.py
├── protocol/
│ ├── __init__.py
│ ├── sysex.py
│ └── commands.py
└── handlers/
├── __init__.py
├── transport.py
├── state.py
└── patterns.py
- Open FL Studio
- Go to OPTIONS > MIDI settings
- Click "Rescan MIDI devices" or "Update MIDI scripts"
Input Section:
- Select
FL Bridge In - Set Controller type to
FL Bridge - Assign Port
0
Output Section:
- Select
FL Bridge Out - Assign Port
0
Critical: Both input and output must have the same port number (e.g., Port 0) for FL Studio to link them correctly.
Create .mcp.json in your project directory:
{
"mcpServers": {
"fl-studio": {
"type": "stdio",
"command": "node",
"args": ["/path/to/fl-studio-mcp/dist/index.js"],
"env": {
"FL_PORT_TO_FL": "FL Bridge In",
"FL_PORT_FROM_FL": "FL Bridge Out"
}
}
}
}Environment Variables:
| Variable | Description | Default |
|---|---|---|
FL_PORT_TO_FL |
MIDI port for sending commands to FL Studio | FL Bridge In |
FL_PORT_FROM_FL |
MIDI port for receiving responses from FL Studio | FL Bridge Out |
FL_DEBUG |
Enable debug logging (1 or true) |
disabled |
FL_DEBUG_FILE |
Custom path for debug log file | ./fl-studio-mcp-debug.log |
Note: Use full path to
nodeif using a version manager like fnm or nvm.
Once configured, Claude can control FL Studio:
"Start playing the project"
"Stop playback"
"Show me all the channels"
"Create a new pattern called 'Intro'"
"What's the current transport state?"
| Tool | Description |
|---|---|
transport_play |
Start playback |
transport_stop |
Stop playback |
transport_record |
Toggle recording |
transport_state |
Get current transport state |
get_channels |
List all channels |
get_mixer |
Get mixer track info |
get_patterns |
List all patterns |
pattern_select |
Select a pattern by index |
pattern_create |
Create a new pattern |
pattern_rename |
Rename a pattern |
- Ensure
device_FLBridge.pyhas# name=FL Bridgeas the first line - Click "Update MIDI scripts" in MIDI settings
- Restart FL Studio if needed
- Check FL Studio Script output (View > Script output) for errors
- Verify both ports have the same port number in MIDI settings
- Check loopMIDI shows data flowing (Total data counters)
- Verify virtual MIDI ports are running
- Check port names match exactly (case-sensitive)
- Use full path to node.exe if using version managers
Enable debug logging to troubleshoot issues:
"env": {
"FL_PORT_TO_FL": "FL Bridge In",
"FL_PORT_FROM_FL": "FL Bridge Out",
"FL_DEBUG": "1"
}Logs are written to fl-studio-mcp-debug.log with automatic rotation (max 1000 lines).
┌─────────────┐ stdio ┌─────────────┐ MIDI SysEx ┌─────────────┐
│ Claude AI │◄────────────►│ MCP Server │◄────────────────►│ FL Studio │
│ │ │ (Node.js) │ │ (Python) │
└─────────────┘ └─────────────┘ └─────────────┘
│ │
▼ ▼
loopMIDI/IAC FL Bridge Script
Virtual MIDI (device_FLBridge.py)
MIT