FL Studio MCP Server
An MCP (Model Context Protocol) server that enables AI assistants to control FL Studio through MIDI communication and Piano Roll scripts.
Features
Transport Control
Play, pause, stop playback
Toggle recording
Set playback position
Get song length and position
Control loop mode (pattern/song)
Adjust playback speed
Mixer Control
Get/set track volume and pan
Mute/solo tracks
Arm tracks for recording
Set track names and colors
Stereo separation control
Channel Rack Control
List all channels
Get/set channel properties (volume, pan, name, color)
Mute/solo channels
Route channels to mixer tracks
Trigger MIDI notes in real-time
Step sequencer control (get/set grid bits)
Plugin Control
List plugin parameters
Get/set parameter values
Navigate presets (next/previous)
Query plugin info
Piano Roll Control
Add notes to the piano roll with precise timing
Add chords with a single command
Delete specific notes by MIDI number and time
Clear all notes from the piano roll
Read piano roll state to see all existing notes
Auto-triggering via keystroke (Cmd+Opt+Y on macOS, Ctrl+Alt+Y on Windows)
Important Limitations
Cannot Load Plugins
The FL Studio scripting API does not support loading new VST/AU plugins. You can only control parameters of plugins that are already loaded in your project.
Cannot Create Patterns
There is no API to programmatically create new patterns. You can only work with existing patterns.
Requirements
FL Studio 20.7+ (MIDI Controller Scripting API)
Python 3.10+
macOS or Windows
macOS: IAC Driver (built-in, needs to be enabled)
Windows: loopMIDI
Quick Installation
The easiest way to install is using the provided setup script:
This will:
Guide you through enabling virtual MIDI ports (IAC Driver on Mac)
Install the FL Studio MIDI controller script
Install the Piano Roll script (ComposeWithLLM)
Install Python dependencies
Manual Installation
1. Install Python Dependencies
2. Enable Virtual MIDI Ports
macOS (IAC Driver)
Open Audio MIDI Setup (search in Spotlight)
Press Cmd+2 or go to Window > Show MIDI Studio
Double-click on IAC Driver
Check "Device is online"
Click Apply
Windows (loopMIDI)
Download and install loopMIDI
Create a virtual port (any name works)
Keep loopMIDI running while using FL Studio
3. Install FL Studio Scripts
Copy the controller script to FL Studio's Hardware folder:
Copy the Piano Roll script:
4. Configure FL Studio
Restart FL Studio (if it's running)
Go to Options > MIDI Settings
Under Input, find your virtual MIDI port (e.g., "IAC Driver Bus 1")
Set the Controller type to FLStudioMCP
Enable the port (click to highlight it)
5. Configure Claude
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Or for Claude Code, add to your MCP settings.
Usage
Running the Server Manually
Piano Roll Workflow
Open FL Studio and select a channel
Open the Piano Roll (F7 or double-click the channel)
The first time, manually run the script: Tools > Scripting > ComposeWithLLM
After that, the MCP tools will auto-trigger the script
Available Tools
Connection
Tool | Description |
| Connect/reconnect to FL Studio |
| Get connection status |
Transport
Tool | Description |
| Start/pause playback |
| Stop playback |
| Toggle recording |
| Get playback/recording state |
| Set playback position |
| Get song duration |
| Switch between pattern/song mode |
| Adjust playback speed (0.25x-4x) |
Mixer
Tool | Description |
| Get number of mixer tracks |
| Get track details |
| List all tracks |
| Set track volume |
| Set track pan |
| Mute/unmute track |
| Solo/unsolo track |
| Arm track for recording |
| Rename track |
| Set track color |
| Adjust stereo width |
Channels
Tool | Description |
| Get number of channels |
| Get channel details |
| List all channels |
| Get selected channel |
| Select/deselect channel |
| Select channel exclusively |
| Trigger MIDI note (real-time) |
| Set channel volume |
| Set channel pan |
| Mute/unmute channel |
| Solo/unsolo channel |
| Rename channel |
| Set channel color |
| Route to mixer track |
| Get step sequencer step |
| Set step sequencer step |
| Get full pattern |
| Set full pattern |
Plugins
Tool | Description |
| Check if plugin exists |
| Get plugin name |
| Get parameter count |
| List all parameters |
| Get parameter value |
| Set parameter value |
| Get preset count |
| Next preset |
| Previous preset |
| Get plugin color |
Piano Roll
Tool | Description |
| Add notes to the piano roll |
| Add a chord (multiple notes at same time) |
| Delete specific notes |
| Clear all notes |
| Read current piano roll notes |
| Manually trigger the FL Studio script |
| Get piano roll system info |
Example Workflows
Adjusting a Mix
Creating a Drum Pattern
Adding a Melody to Piano Roll
Adding Chords
Automating Plugin Parameters
Troubleshooting
"Not connected to FL Studio"
Ensure FL Studio is running
Check that the FLStudioMCP controller is enabled in MIDI Settings
On Mac, verify IAC Driver is enabled in Audio MIDI Setup
On Windows, verify loopMIDI is running
Restart FL Studio after enabling the controller
"Timeout waiting for FL Studio response"
Make sure FL Studio is in focus
Check the Script output window in FL Studio (View > Script output)
Verify the controller is receiving MIDI (look for activity in MIDI Settings)
Piano Roll script not triggering
First time: manually run Tools > Scripting > ComposeWithLLM in FL Studio
On macOS: grant Accessibility permissions when prompted
Ensure FL Studio is in focus when triggering
Try pressing Cmd+Opt+Y (macOS) or Ctrl+Alt+Y (Windows) manually
No MIDI ports available
macOS: Enable IAC Driver in Audio MIDI Setup
Windows: Install and run loopMIDI
Architecture
This MCP server uses a hybrid approach:
How It Works
Transport/Mixer/Channels/Plugins:
MCP server writes command to JSON file
Sends MIDI trigger note to FL Studio
FL Studio controller script reads JSON, executes API, writes response
MCP server reads response
Piano Roll:
MCP server writes note requests to JSON file
Sends keystroke (Cmd+Opt+Y) to trigger FL Studio script
Piano Roll script reads JSON and modifies notes
Credits
FL Studio API Stubs - API documentation
FastMCP - MCP server framework
mido - MIDI library for Python
calvinw/fl-studio-mcp - Piano Roll integration approach
Image-Line - FL Studio
License
MIT