p5midi
Supports using OpenAI or OpenAI-compatible models to generate and revise song specs from an idea, enabling automated composition in the Studio and CLI workflows.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Project5pi MIDI for Claude
Give Claude a song idea. Get back a real FL Studio project, a mastered MP3 and a MIDI file.
Claude (or any AI, or you) writes a short JSON description of a song: key, tempo,
chords, drum grids, melody, arrangement. p5midi writes it straight into an
FL Studio .flp, using your own FL Studio template for the sound, renders it with
FL Studio's command line, masters it, and measures the result, so an AI that
cannot hear still gets told "the intro is louder than the drop" or "the mix is
13 dB bass-heavy" and can fix it.
Not a terminal person? A one-click desktop app (type an idea, click Make; free for 5 songs a month) is in the works: join the waitlist.
No clicking, no MIDI loopback driver, no controller script. The .flp opens in FL
Studio with every note, pattern and playlist clip editable.
Listen: three songs written from the example specs, rendered by FL Studio 2026 with only its stock template instruments: trap · lo-fi · house
idea --> Claude --> song.json --> p5midi build --> song.flp (+ song.mid)
|
FL64.exe /R <-------+ (your FL Studio renders it)
|
song.wav --> master --> song.mp3 --> analyze --> notes back to ClaudeWhy this exists
FL Studio has a Python API, but it only runs inside the app and only for MIDI controller and piano-roll scripts: it can't create channels, place playlist clips or render. Existing AI bridges drive the open app over a virtual MIDI port, so someone has to have FL open and export by hand. This project goes around the app instead: it reads and writes the project file directly (we worked out the format changes up to FL 2026; see docs/FLP-FORMAT.md) and uses FL's own headless render. One command goes from text to MP3 in about 20 seconds.
Related MCP server: GreanTeaDawy MCP Server
Quick start
Needs Python 3.10+. Rendering needs Windows, FL Studio (20.7 or newer; tested up to FL Studio 2026) and ffmpeg on PATH.
pip install "project5pi-midi-for-claude[mcp] @ git+https://github.com/ProjectFlowmar/project5pi-midi-for-claude"
p5midi templates # FL Studio templates on this machine
p5midi inspect HipHop-Trap # their channels (instruments)
p5midi make examples/night-drive-trap.json -o out/night-drive.flpmake writes night-drive.flp, .mid, .wav and a mastered .mp3, then prints
a report like this (trimmed):
"master": {"lufs": -10.3, "true_peak_db": -1.4},
"sections": [["intro", -14.8], ["hook 1", -8.8], ["break", -12.2], ["hook 2", -8.8], ["outro", -15.5]],
"notes": []FL Studio must be closed while rendering; an open FL grabs the command instead.
Studio app: type an idea, click Make
pip install "project5pi-midi-for-claude @ git+https://github.com/ProjectFlowmar/project5pi-midi-for-claude"
p5midi studio # opens http://127.0.0.1:47390 in your browser
Describe the song and click Make it. About 40 seconds later you have the FL Studio project, MP3 and MIDI. If the mix check finds a problem, the AI fixes it and renders again before you hear it. Then use More energy / Darker / Simpler drums... or type any change; every version is kept. Open in FL Studio opens the project, and Export stems writes one aligned WAV per instrument for mixing anywhere.
The Studio writes songs with any OpenAI-compatible model. Paste a DeepSeek key in
Settings (about half a cent per song with deepseek-v4-flash), or point it at OpenAI,
OpenRouter or a local model. Same from the command line:
export DEEPSEEK_API_KEY=sk-...
p5midi create "Lo-fi study beat, 80 BPM, dusty piano, swung drums" --seconds 90
p5midi change "songs/20261107-...-dusty-piano" "darker, slower"Pick a genre pack (Boom Bap, Atlanta Trap, West Coast G-Funk, Drill, Neptunes Bounce, Timbaland Rhythm, Lo-fi Chill, Afrobeats, Reggaeton, R&B Slow Jam) to give the AI that genre's recipe: template, tempo range, drum patterns, harmony and arrangement rules, plus the producer techniques from the influence database. Ask for 2 or 3 versions to get different takes on the same idea, each in its own folder:
p5midi packs
p5midi create "Smooth cruise for a barbershop promo" --pack g-funk --versions 2 --seconds 60The Windows app needs no key: free for 5 songs a month (Boom Bap and Atlanta Trap packs included); Unlimited adds every pack and several versions per idea. With your own key, everything here is free and open source.
Use it from Claude
Claude Code / Claude Desktop (MCP). Register the server:
claude mcp add p5midi -- p5midi-mcpor in Claude Desktop's claude_desktop_config.json:
{ "mcpServers": { "p5midi": { "command": "p5midi-mcp" } } }Tools: list_templates, inspect_template, spec_format, build_song,
make_song, render, analyze_audio, master_audio. Then ask:
"Make me a dark 140 BPM trap beat in A minor with a sliding 808, about a minute long."
Claude Code skill. Copy skills/fl-studio-composer into ~/.claude/skills/
to teach Claude the compose → make → read the report → fix loop with the CLI.
The song spec
{
"template": "HipHop-Trap", "bpm": 140, "key": "A minor",
"progression": ["i", "VI", "III", "VII"],
"parts": {
"drums": {"type": "drums", "channel": "Drums",
"lanes": {"kick": "x......x..x.....", "clap": "........x.......", "hat": "x.x.x.x.x.x.x.x."}},
"808": {"type": "bass", "channel": "Sub 1", "octave": 1, "rhythm": "x-----.x--.x----"},
"pad": {"type": "chords", "channel": "Pad", "progression": ["i7", "VImaj7", "III", "VII"]},
"hook": {"type": "melody", "channel": "Synth 1", "notes": [[0, "E5", 0.75], [0.75, "D5", 0.25], [1, "C5", 1]]}
},
"arrangement": [
{"name": "intro", "bars": 4, "parts": ["pad"]},
{"name": "hook", "bars": 8, "parts": ["drums", "808", "pad", "hook"]}
]
}Part types: drums (step grids with accents, ghosts, holds and hat rolls),
chords (roman numerals with 7/9/sus/borrowed chords, automatic voice leading,
optional rhythm), bass (follows chord roots on a rhythm grid, octave jumps),
arp (up/down/updown/random, rate, span, gate), melody/notes (note names,
MIDI numbers or scale degrees). Plus humanize, swing, velocity, transpose.
Full reference: SPEC.md.
Commands
Command | Does |
| list FL Studio templates (FL's own and yours) |
| channels, plugins, tempo, version |
| write the project (works on any OS) |
| whole arrangement as MIDI, for any DAW |
| render with FL Studio (Windows) |
| static gain + limiter to a loudness target, true peak under -1 dBFS |
| LUFS, true peak, six-band balance, stereo width, per-section loudness, plain-language problems |
| all of the above in one go |
| AI writes the spec, then make + one automatic mix fix |
| AI revises the latest version, keeps the old one |
| the genre packs, and the composer/producer influence database |
| the local app |
| music for a video. 3 minutes and longer: an original underscore timed to the narration (AI cue sheet, composed and rendered in FL Studio). Shorter: a fitting free-license track (Mixkit), trimmed or looped to length, license logged. |
| one WAV per part, all the same length and aligned, for any DAW |
What it checks for you
The analysis is how a model with no ears gets feedback: integrated loudness and true peak, tonal balance in six bands (sub to air), stereo width and whether the low end is mono, loudness per arrangement section, and band-by-band difference from a reference track you like. It turns these into notes such as:
Section 'intro' (chords, keys) is 3.3 LU louder than the fuller 'break'. Likely too loud: one of chords, keys.Very bass-heavy: lows are 13 dB above the mids (1-4 kHz). Melody and chords may be buried.Clipping risk: true peak 0.5 dBFS.
(The first one caught a real problem in our first example; the fix was one velocity value.)
Limits, honestly
The sound is whatever the template's instruments and mixer give you. The tool writes notes and arrangement; it does not load plugins, change presets, or automate mixer knobs (yet). Pick or make a template you like the sound of.
Rendering is Windows-only (FL's command-line render). Building
.flpand.midfiles works anywhere.Numbers are not taste. The AI can avoid obvious mix mistakes; whether the song is good still needs a human ear.
The
.flpformat is undocumented. It's tested on FL Studio 20.5 to 2026 project files (51 files round-trip byte-for-byte; renders verified on 20.7, 24.0, 24.1, 24.2, 25.2 and 26.1 formats). A future FL update may change it; please open an issue with the version.
Development
pip install -e ".[dev,mcp]" mido
pytest # no FL Studio needed: tests build synthetic projectsCredits and legal
Thanks to PyFLP for documenting much of the older FLP event map, which made the newer findings possible.
Other approaches worth knowing: MCP servers that drive a running FL Studio over virtual MIDI, such as flstudio-mcp.
This project ships no Image-Line files. It uses your own licensed FL Studio installation and templates. FL Studio is a trademark of Image-Line Software; Claude is a trademark of Anthropic. This project is not affiliated with or endorsed by either.
MIT licensed. Made by Project5pi.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Autonomous music production for AI agents with MIDI generation, QC and provenance.
Compose, mix, master and export in Logic Pro, REAPER or Ableton Live by talking to an AI engineer.
Browser DAW for AI assistants: build multitrack songs with MIDI, effects, stems and generation.
Make full songs with vocals, split stems, transcribe and analyze audio from your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables Claude Desktop to drive FL Studio 2025 and 2026 through natural language, diagnosing and repairing mixes, configuring plugins, writing notes and chords in any scale, exporting arrangements to MIDI, and analyzing audio for tempo, key, and melody.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to co-produce music in a self-hosted browser DAW by creating and editing patterns, chords, basslines and melodies, arranging and automating tracks, mixing with effects and spatial placement, analyzing and editing samples, rendering mixes with mastering feedback, and exporting MIDI and stems — all reflected live in the studio.MIT
- AlicenseAqualityBmaintenanceLets a model write FL Studio projects (notes, any installed plugin and preset, mixer, sidechain, automation), open them in a running FL, and render them.158MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to compose and mix directly inside FL Studio: writing and clearing notes, setting tempo, levels and plugin parameters, inspecting what FL currently holds, checking which channels sound, and rendering the arrangement to WAV.3MIT