Skip to main content
Glama

FL Codex

Tests License: MIT

Type a request in Codex, such as "a little more reverb on the guitar", and let Codex inspect the actual FL Studio project and adjust exposed plugin knobs.

This is an FL Studio MIDI controller extension + local MCP server for Windows. The extension runs inside FL, selected in MIDI settings > Controller type. It is not a VST DLL to put in a mixer effect slot. Codex supplies the language reasoning; no additional AI API account or API key is needed.

Current status

Experimental. Live connection and discovery have been verified on FL Studio 25.2.5. A real plugin knob write/readback/undo acceptance test is still pending; automated tests use a simulated host. Universal plugin compatibility is not claimed.

Implemented: live track/plugin discovery, paginated parameter inspection, normalized parameter writes with readback, and undo of bridge changes. Live connection verified with FL Studio 25.2.5: version, selection, tracks and loaded-plugin discovery. Automated tests cover guarded edits and undo, MIDI framing, and local TCP/MCP transports. Plugin knob acceptance is recorded in docs/ARCHITECTURE.md.

Scope: loaded effects and instruments that expose parameters through FL's scripting API. Not every visual knob is exposed. Patcher internals need exposed controls. This version does not insert plugins, listen to audio, create notes, or save projects. An existing distortion plugin can be adjusted; adding a new distortion effect is not implemented.

Related MCP server: FL Studio MCP Server

Windows setup

Prerequisites: Windows, FL Studio 2025 (development target: 25.2.5), Python 3.11+, uv, Codex with its CLI, and loopMIDI. The MIDI transport currently uses Windows WinMM; macOS and Linux are unsupported.

Clone the repository and open PowerShell in it:

git clone https://github.com/Radishoux/fl-codex.git
cd fl-codex
  1. Install Python dependencies from this directory:

    uv sync --locked
  2. Install our extension in FL's user-data folder:

    uv run --locked python install.py

    Custom location: uv run --locked python install.py --user-data 'D:\Music\FL Studio'. The installer detects Windows' Documents folder, including OneDrive redirection. It copies only our controller and pairing configuration.

  3. In loopMIDI, create a dedicated virtual port named exactly FL Codex. The relay looks up this name. Keep loopMIDI running: the virtual port exists only while it runs. No MIDI notes are sent by this bridge.

  4. In FL Studio, press F10 > MIDI, refresh the device list if needed, select the FL Codex input, enable it, and choose FL Codex Bridge under Controller type. Set its input Port to 0. Select FL Codex in the Output list and set its Port to the same 0; leave Send master sync off. Use another matching number if 0 belongs to another device. Check View > Script output for FL Codex Bridge ready via MIDI SysEx; output assigned: True. If the new controller type is absent, refresh/reopen MIDI settings or restart FL after saving your own work. The installer never closes FL.

  5. Verify the live connection:

    uv run --locked python bridge_client.py status

    The client starts the local MIDI relay automatically when needed. Keep loopMIDI running. Startup errors go to .local/relay.log. To run the relay visibly for diagnosis: uv run --locked python relay.py (only one relay can own port 32123).

  6. Register the MCP server with Codex (one-time, from this directory):

    $flCodexRoot = (Get-Location).Path
    codex mcp add fl-studio -- "$flCodexRoot\.venv\Scripts\python.exe" "$flCodexRoot\server.py"

    Reload Codex's MCP connections or open a new chat if the new tools are not available in the current chat. The CLI remains usable immediately.

Use

Name mixer tracks clearly, for example Guitar, Lead vocal, and Drums. Select the target track or include its name in the instruction:

  • "List the effects on Guitar and their wet/mix parameters."

  • "Increase the guitar reverb wet amount slightly."

  • "Add a little drive using the distortion effect already on Guitar."

  • "Undo your last knob change."

Codex first reads the actual plugin and parameter names. Writes use a fresh handle and refuse to overwrite a knob that changed after inspection. Small requests default to a maximum normalized movement of 0.1; this is not a dB or percentage-of-perceived-loudness scale. Changes are refused while recording.

No manual MIDI CC assignment is needed for exposed plugin parameters. MIDI SysEx carries commands and replies; the FL script calls FL's parameter API. The virtual input is reserved for this bridge and consumes musical MIDI messages.

Verify / develop

uv run --locked python -m unittest discover -s tests -v
uv run --locked python scripts/check_mcp.py
uv run --locked python scripts/list_midi.py

check_mcp.py regenerates tool_manifest.json from the real server. Tests bind localhost sockets; a sandbox that prohibits loopback needs host permission.

The live acceptance procedure and implementation details are in docs/ARCHITECTURE.md.

See CONTRIBUTING.md for development and compatibility reports.

License

MIT. FL Studio, loopMIDI and other dependencies remain under their respective licenses and are not included in this repository. This is an independent project, not an official Image-Line or OpenAI product.

Available Tools

6 tools
get_fl_parametersB
Read-only

Read parameter names, normalized values, display units and short-lived edit handles. Follow next_start.

Inputs: kind (required), index (required), slot, limit, +1 more.

get_fl_statusA
Read-only

Check the live FL bridge, version, current selection, recording state and capabilities.

Inputs: no named parameters.

list_fl_pluginsA
Read-only

Discover loaded effects on a mixer track, or the instrument at a global channel index.

Inputs: kind (required), index (required).

list_fl_tracksA
Read-only

List track names and indices; channel results also show mixer routing. Follow next_start.

Inputs: kind, limit, start.

set_fl_parameterA

Change one freshly inspected knob and return actual readback. Refuses stale values and recording; stores bridge undo.

Inputs: value (required), handle (required), max_delta.

undo_fl_changeA

Restore the latest bridge knob change, provided the plugin and value still match. Does not invoke FL's global undo.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: status inspection, track listing, plugin listing, parameter reading, parameter writing, and undo. The boundary between inspecting a plugin and reading its parameters is clear from the descriptions.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_fl_noun pattern. The verbs are used predictably: get for reads, list for collections, set for mutation, and undo for reversal.

    Tool Count5/5

    Six tools are well-scoped for an FL Studio bridge focused on safely inspecting and editing parameters. Each tool has a clear role and no obvious redundancy.

    Completeness4/5

    The parameter-editing lifecycle is covered: check status, discover tracks and plugins, read parameters, set a parameter, and undo a change. Minor gaps exist around broader FL Studio control such as transport actions, plugin loading, or redo.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to control FL Studio on Windows through a local MCP server without cloud dependencies. Bridges MCP clients to FL Studio's Python scripting environment via file-based IPC for project management, transport control, and UI workflow automation.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI agent to drive FL Studio 2025 through the DAW's own state rather than screenshots: reading project, mixer and plugin state, measuring and diagnosing the mix, moving faders, applying effects, and writing notes into the piano roll via natural language. Changes can be previewed with dry runs, snapshotted and rolled back so edits stay verifiable and safe.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to control a running FL Studio project — transport, mixer routing and levels, channel rack, plugins, patterns, step sequencer, and piano roll — through a virtual MIDI trigger plus JSON command channel, with optional Windows UI automation and offline audio analysis of bounces. Also exposes raw access to the FL scripting API for undo history, markers, and device and project info.
      MIT