loading…
Search for a command to run...
loading…
An MCP server that connects AI assistants to FL Studio for music production via Virtual MIDI. It enables users to control transport, manage the mixer, write not
An MCP server that connects AI assistants to FL Studio for music production via Virtual MIDI. It enables users to control transport, manage the mixer, write notes, and manipulate plugin parameters through natural language.
MCP server that connects Claude to FL Studio for AI-assisted music production.
Status: Alpha — functional core, actively developed. Contributions welcome.
Claude Code / Claude Desktop / Cursor
│ MCP (stdio)
▼
flai-mcp server (Python)
│
Virtual MIDI (SysEx)
(IAC Driver / loopMIDI)
│
device_flai.py
(MIDI controller script
running inside FL Studio)
| Category | Capabilities |
|---|---|
| Transport | Play, stop, record, get/set tempo, seek to bar/beat |
| Mixer | Get/set volume, pan, mute, solo, name, color for any track |
| Channel Rack | Get/set volume, pan, pitch, name, mute, mixer routing |
| Patterns | List, rename, recolor, clone, navigate between patterns |
| Notes | Write notes into patterns with pitch, velocity, timing via step sequencer API |
| Plugins | List parameters, get/set values, cycle presets |
| Arrangement | Add/list timeline markers, get playhead position |
| Playlist | Name and color playlist tracks |
"Write a four-on-the-floor kick pattern in pattern 1"
"Add a rolling bassline in A minor to pattern 5 on the FLEX Bass channel"
"Turn down the kick on mixer track 2 by 3dB and hard-pan the hi-hats"
"Set the cutoff on channel 4 to 60% and resonance to 25%"
"Add arrangement markers for Intro, Buildup, Drop, Breakdown, and Outro"
setGridBit + setStepParameterByIndex. This works for drums and melodic patterns with 1/16th note quantization. Sub-step timing is supported via the shift parameter, but it's not as flexible as the Piano Roll.open() is broken on macOS, so the file-based piano roll bridge doesn't work. The step sequencer approach is the current workaround.macOS (IAC Driver — built-in, free)
FLAI In and FLAI OutWindows (loopMIDI — free)
FLAI In and FLAI Out# Clone
git clone https://github.com/kaupau/flai-mcp.git
cd flai-mcp
# Create venv and install (requires Python 3.11+)
uv venv --python 3.11 .venv
uv pip install -e .
# Or with pip
python -m venv .venv
source .venv/bin/activate
pip install -e .
python scripts/install_fl_bridge.py
Or manually copy fl_bridge/device_flai.py to:
~/Documents/Image-Line/FL Studio/Settings/Hardware/FLAI/device_flai.py%USERPROFILE%\Documents\Image-Line\FL Studio\Settings\Hardware\FLAI\device_flai.pyIAC Driver FLAI In (or FLAI In on Windows)1IAC Driver FLAI Out (or FLAI Out on Windows)1Verify it works: open View → Script output — you should see:
[FLAI] MCP Bridge initialized. Ready.
[FLAI] Input port: IAC Driver FLAI In
Claude Code — add to ~/.claude/settings.json:
{
"mcpServers": {
"flai": {
"command": "/path/to/flai-mcp/.venv/bin/flai-mcp",
"args": ["--midi-in", "IAC Driver FLAI In", "--midi-out", "IAC Driver FLAI Out"]
}
}
}
Cursor — add to ~/.cursor/mcp.json (same format).
Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"flai": {
"command": "/path/to/flai-mcp/.venv/bin/flai-mcp",
"args": ["--midi-in", "IAC Driver FLAI In", "--midi-out", "IAC Driver FLAI Out"]
}
}
}
# List available MIDI ports
flai-mcp --list-ports
# Run with debug logging
flai-mcp --log-level DEBUG
src/flai_mcp/
├── server.py — MCP server assembly
├── __main__.py — CLI entry point (flai-mcp)
├── bridges/
│ └── midi_bridge.py — async SysEx ↔ asyncio bridge via mido
├── protocol/
│ ├── commands.py — command/status enums
│ └── encoding.py — SysEx ↔ JSON serialization
└── tools/
├── transport.py — play/stop/tempo/position
├── mixer.py — mixer track controls
├── channels.py — channel rack controls
├── patterns.py — pattern management
├── piano_roll.py — note writing (step sequencer API)
├── plugins.py — plugin parameters & presets
└── arrangement.py — timeline markers
fl_bridge/
└── device_flai.py — FL Studio MIDI Controller Script
Commands are SysEx messages with JSON payloads:
Request: [0xF0, 0x7D, CMD_ID, REQ_ID, <ascii-json>, 0xF7]
Response: [0xF0, 0x7D, 0x70, REQ_ID, STATUS, <ascii-json>, 0xF7]
0x7D — SysEx manufacturer ID reserved for non-commercial/educational useensure_ascii=True so all payload bytes are 0x00–0x7F (SysEx-safe)REQ_ID (0–127, rotating counter)FL Studio's MIDI Controller Scripting API doesn't expose piano roll note editing. The flpianoroll module only works in Piano Roll Scripts, which run in a separate Python context with broken file I/O on macOS.
flai-mcp writes notes via the step sequencer API:
channels.setGridBit(channel, step, on/off) — enable/disable stepschannels.setStepParameterByIndex(channel, pattern, step, param, value) — set pitch, velocity, pan, timing per stepThis gives per-note control over pitch (param 0), velocity (param 1), pan (param 4), and micro-timing (param 7).
git clone https://github.com/kaupau/flai-mcp.git
cd flai-mcp
uv venv --python 3.11 .venv
uv pip install -e ".[dev]"
# Run protocol tests (no FL Studio needed)
pytest
# Check ports
flai-mcp --list-ports
src/flai_mcp/protocol/commands.pyfl_bridge/device_flai.py → _HANDLERS dispatch tablesrc/flai_mcp/tools/*.pypython scripts/install_fl_bridge.pyContributions welcome! Some areas that need work:
flpianoroll.score.addNote() programmatically (the subprocess IPC approach from music-copilot is promising)playlist.addClip() API, or explore .flp file manipulation via PyFLPmixer.setCurrentTempo() doesn't exist in all versionsMIT
Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"flai-mcp": {
"command": "npx",
"args": []
}
}
}