Skip to content
Back to search

fl-studio-mcp

MCP Server for FL Studio

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/karl-andres--fl-studio-mcp/badge.svg)](/listings/karl-andres--fl-studio-mcp)

HTML

<a href="/listings/karl-andres--fl-studio-mcp"><img src="/api/listings/karl-andres--fl-studio-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

macOS / Linux

git clone https://github.com/karl-andres/fl-studio-mcp.git
cd fl-studio-mcp
./install.sh

Windows

git clone https://github.com/karl-andres/fl-studio-mcp.git
cd fl-studio-mcp

# Allow running local scripts for this user (one-time)
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force

.\install.ps1

`install.ps1` is the Windows counterpart to `install.sh` — same steps, PowerShell instead of bash. It installs Python 3.12 specifically (required for prebuilt `python-rtmidi` wheels on Windows).

Both installers will:

1. Install [uv](https://github.com/astral-sh/uv) if not present 2. Install Python dependencies 3. Guide you through enabling virtual MIDI ports (IAC Driver on Mac, loopMIDI on Windows) 4. Install the FL Studio MIDI controller script 5. Install the Piano Roll script (ComposeWithLLM) 6. Configure Claude Desktop or Claude Code automatically (`scripts/install_mcp_for_claude.sh` / `scripts/install_mcp_for_claude.ps1`)

> **Windows piano-roll note:** The Piano Roll script is launched by sending FL Studio a keystroke (`Ctrl+Alt+Y`). On Windows this briefly foregrounds the FL Studio window, so **FL Studio will pop to the front for a moment** each time a tool like `fl_send_notes` runs. This is expected. See [Piano Roll script not triggering](#piano-roll-script-not-triggering) if it doesn't fire at all.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 537 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # FL Studio MCP Server
  2. **Control FL Studio with plain language.** An MCP (Model Context Protocol) server that lets AI assistants drive FL Studio through MIDI communication and Piano Roll scripts — compose melodies, adjust mixes, and automate plugins without touching the mouse.
  3. [![Listed on mcpservers.org](https://mcpservers.org/badge.svg)](https://mcpservers.org/servers/karl-andres/fl-studio-mcp)
  4. [![Listed on awesome-mcp-servers](https://img.shields.io/badge/awesome--mcp--servers-listed-blue)](https://github.com/punkpeye/awesome-mcp-servers)
  5. [![GitHub stars](https://img.shields.io/github/stars/karl-andres/fl-studio-mcp?style=flat)](https://github.com/karl-andres/fl-studio-mcp/stargazers)
  6. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
  7. [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org)
  8. ---
  9. ## Table of Contents
  10. - [Demo](#demo)
  11. - [Features](#features)
  12. - [Limitations](#limitations)
  13. - [Requirements](#requirements)
  14. - [Quick Installation](#quick-installation)
  15. - [Manual Installation](#manual-installation)
  16. - [Which AI Clients Work With This?](#which-ai-clients-work-with-this)
  17. - [Usage](#usage)
  18. - [Available Tools](#available-tools)
  19. - [Example Workflows](#example-workflows)
  20. - [Troubleshooting](#troubleshooting)
  21. - [Architecture](#architecture)
  22. - [Development](#development)
  23. - [Credits](#credits)
  24. ---
  25. ## Demo
  26. Ask Claude to analyze your project and compose a melody — notes appear in the Piano Roll in real time:
  27. ![Claude composing a dark bell melody in FL Studio via MCP](assets/demo.gif)
  28. dont mind the scuffed audio, i had to clip with my mic bc apple wouldnt let me record desktop audio lol
  29. https://github.com/user-attachments/assets/d4fc668f-9fe5-4ab4-9f18-76cd661029c6
  30. Hear the original audio if you'd like
  31. https://github.com/user-attachments/assets/c2b1a5e7-1640-41fa-82bc-18ca7cbae9e8
  32. ---
  33. ## Features
  34. ### Transport Control
  35. - Play, pause, stop playback
  36. - Toggle recording
  37. - Set playback position
  38. - Get song length and position
  39. - Control loop mode (pattern/song)
  40. - Adjust playback speed
  41. ### Mixer Control
  42. - Get/set track volume and pan
  43. - Mute/solo tracks
  44. - Arm tracks for recording
  45. - Set track names and colors
  46. - Stereo separation control
  47. ### Channel Rack Control
  48. - List all channels
  49. - Get/set channel properties (volume, pan, name, color)
  50. - Mute/solo channels
  51. - Route channels to mixer tracks
  52. - Trigger MIDI notes in real-time
  53. - Step sequencer control (get/set grid bits)
  54. ### Plugin Control
  55. - List plugin parameters
  56. - Get/set parameter values
  57. - Navigate presets (next/previous)
  58. - Query plugin info
  59. ### Piano Roll Control
  60. - **Add notes** to the piano roll with precise timing
  61. - **Add chords** with a single command
  62. - **Delete specific notes** by MIDI number and time
  63. - **Clear all notes** from the piano roll
  64. - **Read piano roll state** to see all existing notes
  65. - Auto-triggering via keystroke (Cmd+Opt+Y on macOS, Ctrl+Alt+Y on Windows)
  66. ---
  67. ## Limitations
  68. > **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.
  69. > **No pattern management (yet)** — The server can write notes and step-sequencer steps into a pattern, but it has no tools to create, switch, rename, or clone patterns. Everything goes into whichever pattern is currently selected in FL Studio, so pick or create the pattern yourself before asking for notes. (FL Studio's scripting API does support this through the `patterns` module, so it could be added.)
  70. ---
  71. ## Requirements
  72. - **FL Studio 20.7+** (MIDI Controller Scripting API)
  73. - **Python 3.10+**
  74. - **macOS** or **Windows**
  75. - macOS: IAC Driver (built-in, needs to be enabled)
  76. - Windows: [loopMIDI](https://www.tobias-erichsen.de/software/loopmidi.html)
  77. ---
  78. ## Quick Installation
  79. ### macOS / Linux
  80. ```bash
  81. git clone https://github.com/karl-andres/fl-studio-mcp.git
  82. cd fl-studio-mcp
  83. ./install.sh
  84. ```
  85. ### Windows
  86. ```powershell
  87. git clone https://github.com/karl-andres/fl-studio-mcp.git
  88. cd fl-studio-mcp
  89. # Allow running local scripts for this user (one-time)
  90. Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force
  91. .\install.ps1
  92. ```
  93. `install.ps1` is the Windows counterpart to `install.sh` — same steps, PowerShell instead of bash. It installs Python 3.12 specifically (required for prebuilt `python-rtmidi` wheels on Windows).
  94. Both installers will:
  95. 1. Install [uv](https://github.com/astral-sh/uv) if not present
  96. 2. Install Python dependencies
  97. 3. Guide you through enabling virtual MIDI ports (IAC Driver on Mac, loopMIDI on Windows)
  98. 4. Install the FL Studio MIDI controller script
  99. 5. Install the Piano Roll script (ComposeWithLLM)
  100. 6. Configure Claude Desktop or Claude Code automatically (`scripts/install_mcp_for_claude.sh` / `scripts/install_mcp_for_claude.ps1`)
  101. > **Windows piano-roll note:** The Piano Roll script is launched by sending FL Studio a keystroke (`Ctrl+Alt+Y`). On Windows this briefly foregrounds the FL Studio window, so **FL Studio will pop to the front for a moment** each time a tool like `fl_send_notes` runs. This is expected. See [Piano Roll script not triggering](#piano-roll-script-not-triggering) if it doesn't fire at all.
  102. ---
  103. ## Manual Installation
  104. ### 1. Install Python Dependencies
  105. ```bash
  106. # Using uv (recommended)
  107. uv sync
  108. # Or using pip
  109. pip install -e .
  110. ```
  111. ### 2. Enable Virtual MIDI Ports
  112. #### macOS (IAC Driver)
  113. 1. Open **Audio MIDI Setup** (search in Spotlight)
  114. 2. Press **Cmd+2** or go to **Window > Show MIDI Studio**
  115. 3. Double-click on **IAC Driver**
  116. 4. Check **"Device is online"**
  117. 5. Click **Apply**
  118. #### Windows (loopMIDI)
  119. 1. Download and install [loopMIDI](https://www.tobias-erichsen.de/software/loopmidi.html)
  120. 2. Create a virtual port (any name works)
  121. 3. Keep loopMIDI running while using FL Studio
  122. ### 3. Install FL Studio Scripts
  123. Copy the controller script to FL Studio's Hardware folder:
  124. ```bash
  125. # macOS
  126. mkdir -p ~/Documents/Image-Line/FL\ Studio/Settings/Hardware/FLStudioMCP
  127. cp fl_controller/device_FLStudioMCP.py ~/Documents/Image-Line/FL\ Studio/Settings/Hardware/FLStudioMCP/
  128. # Windows
  129. mkdir "%USERPROFILE%\Documents\Image-Line\FL Studio\Settings\Hardware\FLStudioMCP"
  130. copy fl_controller\device_FLStudioMCP.py "%USERPROFILE%\Documents\Image-Line\FL Studio\Settings\Hardware\FLStudioMCP\"
  131. ```
  132. Copy the Piano Roll script:
  133. ```bash
  134. # macOS
  135. cp scripts/ComposeWithLLM.pyscript ~/Documents/Image-Line/FL\ Studio/Settings/Piano\ roll\ scripts/
  136. # Windows
  137. copy scripts\ComposeWithLLM.pyscript "%USERPROFILE%\Documents\Image-Line\FL Studio\Settings\Piano roll scripts\"
  138. ```
  139. ### 4. Configure FL Studio
  140. 1. **Restart FL Studio** (if it's running)
  141. 2. Go to **Options > MIDI Settings**
  142. 3. Under **Input**, find your virtual MIDI port (e.g., "IAC Driver Bus 1")
  143. 4. Set the **Controller type** to **FLStudioMCP**
  144. 5. Enable the port (click to highlight it)
  145. ### 5. Configure Your MCP Client
  146. Add to your Claude Desktop config:
  147. - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
  148. - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
  149. ```json
  150. {
  151. "mcpServers": {
  152. "fl-studio": {
  153. "command": "uv",
  154. "args": ["run", "--directory", "/path/to/fl-studio-mcp", "fl-studio-mcp"]
  155. }
  156. }
  157. }
  158. ```
  159. For Claude Code, add to your MCP settings (`~/.claude.json`, or run `claude mcp add`).
  160. ---
  161. ## Which AI Clients Work With This?
  162. This is a standard [MCP](https://modelcontextprotocol.io) server that talks to clients over stdio — it isn't hardcoded to any one AI vendor. In principle, **any MCP-compatible client can connect**: Claude Desktop, Claude Code, Cursor, Windsurf, Gemini CLI, OpenAI's Codex CLI/Agents SDK, etc.
  163. **What's actually tested and auto-configured:** only **Claude Desktop** and **Claude Code**, via `scripts/install_mcp_for_claude.sh` (macOS/Linux) and `scripts/install_mcp_for_claude.ps1` (Windows). Other clients have no installer support — you'd need to manually add the following MCP server entry to that client's own config:
  164. ```json
  165. {
  166. "command": "uv",
  167. "args": ["run", "--directory", "/path/to/fl-studio-mcp", "fl-studio-mcp"]
  168. }
  169. ```
  170. Replace `/path/to/fl-studio-mcp` with your local clone path. If you try this with a non-Claude client, please open an issue with what worked or didn't — the protocol should support it, but it hasn't been verified here.
  171. ---
  172. ## Usage
  173. ### Running the Server Manually
  174. ```bash
  175. # Using uv
  176. uv run fl-studio-mcp
  177. # Or after installation
  178. fl-studio-mcp
  179. ```
  180. ### Piano Roll Workflow
  181. 1. Open FL Studio and select a channel
  182. 2. Open the Piano Roll (F7 or double-click the channel)
  183. 3. The first time, manually run the script: **Tools > Scripting > ComposeWithLLM**
  184. 4. After that, the MCP tools will auto-trigger the script
  185. ---
  186. ## Available Tools
  187. ### Connection
  188. | Tool | Description |
  189. |------|-------------|
  190. | `fl_connect` | Connect/reconnect to FL Studio |
  191. | `fl_connection_status` | Get connection status |
  192. ### Transport
  193. | Tool | Description |
  194. |------|-------------|
  195. | `fl_play` | Start/pause playback |
  196. | `fl_stop` | Stop playback |
  197. | `fl_record` | Toggle recording |
  198. | `fl_get_transport_status` | Get playback/recording state |
  199. | `fl_set_song_position` | Set playback position |
  200. | `fl_get_song_length` | Get song duration |
  201. | `fl_set_loop_mode` | Switch between pattern/song mode |
  202. | `fl_set_playback_speed` | Adjust playback speed (0.25x–4x) |
  203. ### Mixer
  204. | Tool | Description |
  205. |------|-------------|
  206. | `fl_get_mixer_track_count` | Get number of mixer tracks |
  207. | `fl_get_mixer_track_info` | Get track details |
  208. | `fl_get_all_mixer_tracks` | List all tracks |
  209. | `fl_set_track_volume` | Set track volume |
  210. | `fl_set_track_pan` | Set track pan |
  211. | `fl_mute_track` | Mute/unmute track |
  212. | `fl_solo_track` | Solo/unsolo track |
  213. | `fl_arm_track` | Arm track for recording |
  214. | `fl_set_track_name` | Rename track |
  215. | `fl_set_track_color` | Set track color |
  216. | `fl_set_stereo_separation` | Adjust stereo width |
  217. ### Channels
  218. | Tool | Description |
  219. |------|-------------|
  220. | `fl_get_channel_count` | Get number of channels |
  221. | `fl_get_channel_info` | Get channel details |
  222. | `fl_get_all_channels` | List all channels |
  223. | `fl_get_selected_channel` | Get selected channel |
  224. | `fl_select_channel` | Select/deselect channel |
  225. | `fl_select_one_channel` | Select channel exclusively |
  226. | `fl_trigger_note` | Trigger MIDI note (real-time) |
  227. | `fl_set_channel_volume` | Set channel volume |
  228. | `fl_set_channel_pan` | Set channel pan |
  229. | `fl_mute_channel` | Mute/unmute channel |
  230. | `fl_solo_channel` | Solo/unsolo channel |
  231. | `fl_set_channel_name` | Rename channel |
  232. | `fl_set_channel_color` | Set channel color |
  233. | `fl_route_channel_to_mixer` | Route to mixer track |
  234. | `fl_get_grid_bit` | Get step sequencer step |
  235. | `fl_set_grid_bit` | Set step sequencer step |
  236. | `fl_get_step_sequence` | Get full pattern |
  237. | `fl_set_step_sequence` | Set full pattern |
  238. ### Plugins
  239. | Tool | Description |
  240. |------|-------------|
  241. | `fl_is_plugin_valid` | Check if plugin exists |
  242. | `fl_get_plugin_name` | Get plugin name |
  243. | `fl_get_plugin_param_count` | Get parameter count |
  244. | `fl_get_plugin_params` | List all parameters |
  245. | `fl_get_plugin_param_value` | Get parameter value |
  246. | `fl_set_plugin_param_value` | Set parameter value |
  247. | `fl_get_preset_count` | Get preset count |
  248. | `fl_next_preset` | Next preset |
  249. | `fl_prev_preset` | Previous preset |
  250. | `fl_get_plugin_color` | Get plugin color |
  251. ### Piano Roll
  252. | Tool | Description |
  253. |------|-------------|
  254. | `fl_send_notes` | Add notes to the piano roll |
  255. | `fl_send_chord` | Add a chord (multiple notes at same time) |
  256. | `fl_delete_notes` | Delete specific notes |
  257. | `fl_clear_piano_roll` | Clear all notes |
  258. | `fl_get_piano_roll_state` | Read current piano roll notes |
  259. | `fl_trigger_script` | Manually trigger the FL Studio script |
  260. | `fl_get_piano_roll_info` | Get piano roll system info |
  261. | `fl_clear_request_queue` | Cancel pending queued changes |
  262. ---
  263. ## Example Workflows
  264. ### Adjusting a Mix
  265. ```text
  266. "Set the volume of mixer track 1 to 80% and pan it slightly left"
  267. ```
  268. ### Creating a Drum Pattern
  269. ```text
  270. "Create a basic kick pattern on channel 0 with kicks on steps 0, 4, 8, and 12"
  271. ```
  272. ### Adding a Melody to Piano Roll
  273. ```text
  274. "Add a C major arpeggio starting at beat 0: C4, E4, G4, C5 - each note quarter duration"
  275. ```
  276. ### Adding Chords
  277. ```text
  278. "Add a C major chord at beat 0, then F major at beat 2, then G major at beat 4"
  279. ```
  280. ### Automating Plugin Parameters
  281. ```text
  282. "List the parameters of the plugin on channel 0 and set the filter cutoff to 50%"
  283. ```
  284. ---
  285. ## Troubleshooting
  286. ### "Not connected to FL Studio"
  287. 1. Ensure FL Studio is running
  288. 2. Check that the FLStudioMCP controller is enabled in MIDI Settings
  289. 3. On Mac, verify IAC Driver is enabled in Audio MIDI Setup
  290. 4. On Windows, verify loopMIDI is running
  291. 5. Restart FL Studio after enabling the controller
  292. ### "Timeout waiting for FL Studio response"
  293. 1. Make sure FL Studio is in focus
  294. 2. Check the Script output window in FL Studio (**View > Script output**)
  295. 3. Verify the controller is receiving MIDI (look for activity in MIDI Settings)
  296. ### Piano Roll script not triggering
  297. 1. First time: manually run **Tools > Scripting > ComposeWithLLM** in FL Studio
  298. 2. On macOS: grant Accessibility permissions when prompted
  299. 3. On Windows: the MCP server foregrounds the FL Studio window automatically before sending the hotkey — if FL Studio isn't running or is minimized to the system tray, the trigger can't find it and will fall back to a warning telling you to press the hotkey manually
  300. 4. Try pressing Cmd+Opt+Y (macOS) or Ctrl+Alt+Y (Windows) manually to confirm the hotkey is bound to the script in FL Studio
  301. 5. If you just updated the server code (e.g. pulled a fix), **fully restart** your MCP client (Claude Desktop/Code) — reconnecting the MCP server alone does not respawn the underlying process
  302. ### No MIDI ports available
  303. - **macOS**: Enable IAC Driver in Audio MIDI Setup
  304. - **Windows**: Install and run loopMIDI
  305. ---
  306. ## Architecture
  307. This MCP server uses a hybrid approach:
  308. ```
  309. ┌─────────────────┐ ┌─────────────────────────────────────────┐
  310. │ MCP Client │────▶│ FastMCP Server │
  311. │ (Claude, etc) │ │ │
  312. └─────────────────┘ │ ┌─────────────────┐ ┌──────────────┐ │
  313. │ │ MIDI + JSON │ │ Piano Roll │ │
  314. │ │ Tools │ │ Tools (JSON) │ │
  315. │ └────────┬────────┘ └──────┬───────┘ │
  316. └───────────┼──────────────────┼──────────┘
  317. │ │
  318. MIDI + JSON JSON Files +
  319. │ Keystroke
  320. ▼ ▼
  321. ┌─────────────────────────────────────────┐
  322. │ FL Studio │
  323. │ ┌──────────────┐ ┌──────────────────┐ │
  324. │ │FLStudioMCP │ │ Piano Roll Script│ │
  325. │ │(MIDI Ctrl) │ │ (ComposeWithLLM) │ │
  326. │ └──────────────┘ └──────────────────┘ │
  327. └─────────────────────────────────────────┘
  328. ```
  329. ### How It Works
  330. **Transport / Mixer / Channels / Plugins:**
  331. 1. MCP server writes command to JSON file
  332. 2. Sends MIDI trigger note to FL Studio
  333. 3. FL Studio controller script reads JSON, executes API, writes response
  334. 4. MCP server reads response
  335. **Piano Roll:**
  336. 1. MCP server writes note requests to JSON file
  337. 2. Sends keystroke (Cmd+Opt+Y on macOS, Ctrl+Alt+Y on Windows) to trigger FL Studio script — on Windows, the FL Studio window is foregrounded first so the keystroke actually reaches it
  338. 3. Piano Roll script reads JSON and modifies notes
  339. ---
  340. ## Development
  341. ### Prerequisites
  342. - Python 3.10+
  343. - [uv](https://github.com/astral-sh/uv) (recommended)
  344. ### Setup
  345. ```bash
  346. # Install all dependencies including dev extras
  347. uv sync --dev
  348. # Or with pip
  349. pip install -e ".[dev]"
  350. ```
  351. ### Available Commands
  352. | Command | Description |
  353. |---------|-------------|
  354. | `uv run fl-studio-mcp` | Run the MCP server |
  355. | `uv run ruff check .` | Lint the codebase |
  356. | `uv run ruff check --fix .` | Lint and auto-fix |
  357. | `uv run pytest` | Run tests |
  358. ### Project Structure
  359. ```
  360. fl-studio-mcp/
  361. ├── fl_controller/
  362. │ └── device_FLStudioMCP.py # FL Studio MIDI controller script (runs inside FL Studio)
  363. ├── scripts/
  364. │ ├── setup.sh # FL Studio script installer
  365. │ ├── install_mcp_for_claude.sh # Claude config installer (macOS/Linux)
  366. │ ├── install_mcp_for_claude.ps1# Claude config installer (Windows)
  367. │ └── ComposeWithLLM.pyscript # Piano Roll script (runs inside FL Studio)
  368. ├── src/fl_studio_mcp/
  369. │ ├── server.py # FastMCP server entry point
  370. │ ├── tools/ # MCP tool implementations
  371. │ │ ├── channels.py
  372. │ │ ├── mixer.py
  373. │ │ ├── piano_roll.py
  374. │ │ ├── plugins.py
  375. │ │ └── transport.py
  376. │ └── utils/
  377. │ ├── connection.py # FL Studio connection wrapper
  378. │ ├── fl_trigger.py # Piano roll keystroke trigger
  379. │ └── midi_connection.py # MIDI + JSON communication layer
  380. ├── install.sh # One-command installer (macOS/Linux)
  381. └── install.ps1 # One-command installer (Windows)
  382. ```
  383. ---
  384. ## Credits
  385. - [FL Studio API Stubs](https://github.com/IL-Group/FL-Studio-API-Stubs) — API documentation
  386. - [FastMCP](https://github.com/jlowin/fastmcp) — MCP server framework
  387. - [mido](https://github.com/mido/mido) — MIDI library for Python
  388. - [calvinw/fl-studio-mcp](https://github.com/calvinw/fl-studio-mcp) — Piano Roll integration approach
  389. - [Image-Line](https://www.image-line.com/) — FL Studio
  390. ## Contributing
  391. Contributions are welcome! Feel free to open an issue or a pull request.
  392. Just a heads-up: this project doesn't have a proper test suite, CI, or review process for PRs yet. I'm a student maintaining this in my spare time, so changes are mostly tested by hand in FL Studio. If you'd like to help set up testing or a smoother contribution workflow, that help is especially welcome.
  393. ## License
  394. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.