midi-mcp
Captures what you play on a MIDI keyboard as notes (with timing, velocity and CCs) and plays note sequences, chord progressions and arpeggios back into a synth over plain MIDI ports. Provides tools to list and select MIDI ports, listen until a pause, replay the last take transposed or at a different speed, loop backing tracks in the background while listening, send CC/program changes, and save takes to or play back .mid files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@midi-mcpharmonize what I just played, then loop it at 80 bpm"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
midi-mcp 🎹
Give your AI agent ears and fingers. An MCP server that lets Claude (or any MCP client) listen to what you play on a MIDI keyboard and play back into your synth: harmonize your melody, loop a backing track while you solo, or just guess the tune you're playing (results may vary).
It works at the plain MIDI level, so there's no DAW and no plugin: any controller, any synth.
you: *plays a folk tune on the keyboard*
claude: "C major pentatonic, rising to a long A, settling home on C...
my best guess is Auld Lang Syne?"
you: "Down by the Salley Gardens."
claude: "Close! Want me to harmonize it?" *plays it back with chords*Install
Requires uv. Tested on macOS; other platforms should work with a virtual MIDI port (e.g. loopMIDI on Windows) but are untested.
Create a virtual MIDI bus so the agent can reach your synth: Audio MIDI Setup → Window → Show MIDI Studio → IAC Driver → Device is online.
Let your synth listen to it: enable IAC Driver Bus 1 as a MIDI input (in Arturia Analog Lab: ☰ → Audio MIDI Settings → MIDI Devices).
Add the server to Claude Code:
claude mcp add midi --scope user -- uvx --from git+https://github.com/thias42/midi-mcp midi-mcpFor other MCP clients, run
uvx --from git+https://github.com/thias42/midi-mcp midi-mcpas a stdio server.
Output goes to the first IAC bus and input comes from the first non-IAC port (your controller). Override with the MIDI_OUT / MIDI_IN environment variables (substring match) or the port argument on any tool.
Related MCP server: ableton-live-mcp
Things to try
"Listen to what I play and tell me what key it's in."
"Harmonize what I just played, then do it again in A minor with an arpeggio."
"Loop Am, F, C, G as an arpeggio at 80 bpm while I improvise, then tell me what I played."
"Play back my take a fifth higher and half as fast."
"Save that as salley.mid."
Tools
Tool | What it does |
| Show MIDI inputs/outputs and the defaults |
| Capture what you play (notes, timing, velocity, CCs); stops after a pause |
| Play a note sequence in beats at a given tempo |
| Play a progression ( |
| Play back the last take, optionally transposed or at a different speed |
| Stop background playback and silence all notes |
| Send a CC or program change |
| Write the last take to |
play_notes, play_chords, replay and play_midi_file take wait=false to play in the background, and the note and chord tools take loops=0 to repeat until stop, so the agent can listen while a backing track loops.
Note names use C4 = MIDI 60.
Related projects
Other MIDI MCP servers do different jobs, and some do them better:
Composing files: tubone24/midi-mcp-server creates MIDI from structured JSON, with a piano-roll preview in the chat. TripleAt/midi-mcp edits and transforms existing
.midfiles.Composing and playing out: mikeborozdin/vibe-composer-midi-mcp composes multi-track "whole band" arrangements and plays them on a synth. michelkro/midi-mcp adds music theory and genre tools.
Raw MIDI in and out: ugufru/apple-midi-mcp is a native CoreMIDI bridge that can also read incoming messages and handles SysEx. pnilan/midi-mcp sends notes, CC and SysEx to hardware.
Specific gear: feamster/digitakt-midi-mcp for the Elektron Digitakt.
midi-mcp focuses on playing along: it captures what you play as notes rather than raw messages, and it can loop a backing track while it listens.
How it started
With an Arturia Minilab3 and Analog Lab, I asked Claude Code "can you access my keyboard?" One session later it had guessed a tune (wrongly), harmonized it (nicely), researched whether any DAW already does this (none quite do), and written this server.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Autonomous music production for AI agents with MIDI generation, QC and provenance.
Deterministic music theory for agents: analyze, voice, reharmonize, conduct — computed, not guessed
AI music and podcast platform for autonomous agents. SoundCloud for AI bots.
AI music, video, image, and voice tools callable by agents with USDC payments via x402 on Base.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables LLMs to compose and play multi-track MIDI music through natural language prompts. Supports outputting to software or hardware synthesizers for enhanced audio quality.226 npm24MIT
- AlicenseCqualityCmaintenanceEnables AI agents to control Ableton Live by evaluating arbitrary Python code and using predefined tools for common tasks, supporting voice and text commands for music production.27227MIT
- AlicenseNot gradedqualityBmaintenanceIntegrates AI-powered music generation with professional production tools, enabling autonomous music creation workflows from MIDI input to live streaming.5MIT
- AlicenseAqualityFmaintenanceEnables AI-driven MIDI composition with chord name support, interactive piano-roll preview, and multiple deployment modes.252MIT