This project has been archived by its maintainers, and is no longer receiving any updates.
🎹 FL Studio MCP Server
A Model Context Protocol (MCP) server for FL Studio (Fruity Loops), enabling AI assistants like Claude to compose music and control FL Studio through natural language.
✨ Features
- FL Studio API Integration via Flapi: Control transport, mixer, channels, patterns, and more
- MIDI Interface: Send MIDI notes and messages to FL Studio via loopMIDI
- MCP Protocol: Standard interface for AI assistants (Claude, etc.)
- Dual Communication: Uses both Flapi (for API calls) and MIDI (for notes/CC)
- Type Safe: Full type hints and validation
🏗️ Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Claude Desktop │────▶│ MCP Server │────▶│ FL Studio │
│ (AI Assistant) │ │ (External) │ │ (Internal) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ ▲
│ │
┌──────┴──────┐ │
│ │ │
▼ ▼ │
┌──────────┐ ┌────────────┐ │
│ Flapi │ │ MIDI │ │
│ Bridge │ │ Interface │ │
└────┬─────┘ └─────┬──────┘ │
│ │ │
│ MIDI │ │
└─────────────┴──────────────────┘
- Flapi Bridge: Forwards FL Studio API calls (transport, mixer, channels) via MIDI to FL Studio's internal Python
- MIDI Interface: Sends MIDI notes, CC, program changes directly to FL Studio
📦 Installation
Prerequisites
- Python 3.10+
- FL Studio (version 20.7+ for MIDI scripting support)
- loopMIDI (Windows) - Download
Quick Start
# Install the MCP server
pip install fruityloops-mcp
# Install Flapi for FL Studio API access
pip install flapi
flapi install
Virtual MIDI Port Setup (Windows)
- Install loopMIDI
- Create these virtual MIDI ports:
FLStudio_MIDI- For sending MIDI notes/CC to FL StudioFlapi Request- For Flapi API requestsFlapi Response- For Flapi API responses
FL Studio Configuration
For MIDI Control:
- Open FL Studio → Options → MIDI Settings
- Enable the
FLStudio_MIDIport as an input - Route the MIDI input to your desired channel/instrument
For Flapi (API Access):
- Run
flapi installto install the Flapi script - Restart FL Studio
- Go to Options → MIDI Settings
- In the Output section, assign unique port numbers to
Flapi RequestandFlapi Response - In the Input section, set the same port numbers for the corresponding inputs
- Assign
Flapi Requestinput to the "Flapi Request" script - Assign
Flapi Responseinput to the "Flapi Response" script
🚀 Usage
With Claude Desktop
Add to your Claude Desktop configuration (%APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"fruityloops": {
"command": "uvx",
"args": ["fruityloops-mcp"]
}
}
}
Or using pip:
{
"mcpServers": {
"fruityloops": {
"command": "fruityloops-mcp"
}
}
}
First Steps in Claude
-
Connect to FL Studio:
"Connect to FL Studio via Flapi" -
Check connection:
"What's the Flapi connection status?" -
Start composing:
"Start playback in FL Studio" "Set the tempo to 120 BPM" "Play a C major chord"
🎛️ Available Tools
Flapi Connection
flapi_connect- Connect to FL Studio via Flapiflapi_disconnect- Disconnect from Flapiflapi_status- Check connection status
MIDI Tools
midi_connect- Connect to MIDI portmidi_disconnect- Disconnect from MIDI portmidi_list_ports- List available MIDI portsmidi_send_note- Send note with durationmidi_send_note_on/midi_send_note_off- Note messagesmidi_send_cc- Control change messagesmidi_send_program_change- Program changemidi_send_pitch_bend- Pitch bend
Transport Controls
transport_start/transport_stop- Playback controltransport_record- Toggle recordingtransport_get_bpm/transport_set_bpm- Tempo controltransport_get_song_pos/transport_set_song_pos- Position control
Mixer Controls
mixer_get_track_volume/mixer_set_track_volumemixer_get_track_name/mixer_set_track_namemixer_get_track_pan/mixer_set_track_panmixer_mute_track/mixer_solo_track
Channel Controls
channels_channel_count- Get number of channelschannels_get_channel_name- Get channel namechannels_set_channel_volume- Set volumechannels_mute_channel- Mute/unmutechannels_get_channel_color/channels_set_channel_color
Pattern Controls
patterns_pattern_count- Get number of patternspatterns_get_pattern_name/patterns_set_pattern_namepatterns_get_pattern_lengthpatterns_jump_to_pattern
Playlist Controls
playlist_get_track_name/playlist_set_track_name
General Controls
general_get_version- FL Studio versiongeneral_get_project_titlegeneral_save_projectgeneral_undo
UI Controls
ui_show_window- Show FL Studio windows (Mixer, Channel Rack, Piano Roll, etc.)ui_get_visible- Check window visibility
🛠️ Development
Setup
# Clone repository
git clone https://github.com/quinnjr/fruityloops-mcp.git
cd fruityloops-mcp
# Install dependencies
uv sync --all-extras
# Install git hooks
./install-hooks.ps1 # On Windows
./install-hooks.sh # On Unix/macOS
Testing
# Run tests
uv run pytest
# Run with coverage
uv run pytest --cov
# Run linting
uv run ruff check .
# Run formatting
uv run ruff format .
🐛 Troubleshooting
Flapi Connection Issues
- "Flapi not available": Run
pip install flapi - "Failed to connect":
- Ensure loopMIDI ports
Flapi RequestandFlapi Responseexist - Restart FL Studio after installing Flapi
- Check FL Studio MIDI settings are configured correctly
- Ensure loopMIDI ports
- "FL Studio connection test failed":
- Verify FL Studio is running
- Check the Flapi script is loaded (look for it in the MIDI scripts panel)
MIDI Issues
- "MIDI port not found": Create
FLStudio_MIDIport in loopMIDI - "Failed to send MIDI": Ensure MIDI port is connected first using
midi_connect - No sound: Check FL Studio has the MIDI port enabled and routed to an instrument
📖 Documentation
- Installation Guide - Detailed installation instructions
- Contributing Guide - How to contribute
- Usage Examples - Practical examples
- API Documentation - Auto-generated API docs
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Joseph Quinn
🙏 Acknowledgments
- Flapi by Maddy Guthridge - FL Studio remote control
- FL Studio Python API
- Model Context Protocol
- loopMIDI by Tobias Erichsen
Made with ❤️ for the FL Studio and AI community
Metadata
Release files for fruityloops-mcp 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fruityloops_mcp-1.1.0.tar.gz | 168.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fruityloops_mcp-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 184.5 kB
Release files / fruityloops_mcp-1.1.0.tar.gz
| Download URL | fruityloops_mcp-1.1.0.tar.gz |
|---|---|
| Size | 168.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25e9d36b6f69b8a495a21eb066fa65236dfe09910e1aee3f34e9e9b15bd6c1b6
|
|
BLAKE2b-256 checksum How to use checksums |
763e31a9a1b5c91e4314be8588f63d1e16b6f9d95dc8b94c2b93e7b563746767
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / fruityloops_mcp-1.1.0-py3-none-any.whl
| Download URL | fruityloops_mcp-1.1.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65354f14e8a403b3c1d6ee6b89d1567d0ae917f39a4fbd701399350de94d9ab7
|
|
BLAKE2b-256 checksum How to use checksums |
b4b8d451b898815c26c4f7e8d6e7425921b46af0fd5a5c8d902149e6b3661d0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|