MCP MIDI Server
Sends MIDI messages to the user's MIDI output ports: Control Change, Program Change, Note On/Off, and timed musical sequences, allowing targeting of all or specific ports and channels, plus discovery of available MIDI ports.
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.
MCP MIDI Server
A Model Context Protocol (MCP) server for sending MIDI messages. This server allows you to send MIDI Control Change (CC), Program Change (PC), and Note On/Off messages to MIDI devices.
Features
Control Change (CC): Send CC messages to control parameters on MIDI devices
Program Change (PC): Change presets/programs on MIDI devices
Note On/Off: Send MIDI notes with velocity control
Flexible Targeting: Send to all devices or specific devices, all channels or specific channels
Port Discovery: List all available MIDI output ports
Related MCP server: Vibe Composer MIDI MCP
Installation
Install using uv:
cd mcp_server_midi
uv venv
source .venv/bin/activate # On macOS/Linux
# or
.venv\Scripts\activate # On Windows
uv pip install -e .Install MIDI backend (required by mido):
# macOS
brew install portmidi
# Linux
sudo apt-get install libasound2-dev # For ALSA
# or
sudo apt-get install libjack-dev # For JACK
# Windows - no additional installation needed (uses built-in winmm)Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"midi": {
"command": "mcp-server-midi"
}
}
}Or if using uv directly:
{
"mcpServers": {
"midi": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp_server_midi",
"run",
"mcp-server-midi"
]
}
}
}Available Tools
list_midi_outputs
List all available MIDI output ports on your system.
Example:
List available MIDI portssend_midi_cc
Send a MIDI Control Change message.
Parameters:
cc_number(required): Control Change number (0-127)cc_value(required): Control Change value (0-127)channel(optional): MIDI channel (1-16), omit to send to all channelsport_name(optional): Specific port name, omit to send to all ports
Examples:
Send CC#22 with value 64 to all devices on all channels
Send CC#7 (volume) with value 100 to channel 1
Send CC#1 (modulation) with value 127 to "IAC Driver Bus 1" on channel 3send_midi_pc
Send a MIDI Program Change message.
Parameters:
program_number(required): Program number (0-127)channel(optional): MIDI channel (1-16), omit to send to all channelsport_name(optional): Specific port name, omit to send to all ports
Examples:
Send Program Change 5 to all devices
Change to preset 10 on channel 2send_midi_note_on
Send a MIDI Note On message.
Parameters:
note(required): MIDI note number (0-127, where 60 = Middle C)velocity(optional): Note velocity (1-127, default 64)channel(optional): MIDI channel (1-16), omit to send to all channelsport_name(optional): Specific port name, omit to send to all ports
Examples:
Play Middle C (note 60) with default velocity
Play note 72 with velocity 100 on channel 1send_midi_note_off
Send a MIDI Note Off message.
Parameters:
note(required): MIDI note number (0-127, where 60 = Middle C)velocity(optional): Release velocity (0-127, default 64)channel(optional): MIDI channel (1-16), omit to send to all channelsport_name(optional): Specific port name, omit to send to all ports
Examples:
Stop note 60 (Middle C)
Stop note 72 on channel 1send_musical_sequence
Send a musical sequence with tempo and note durations. This allows you to play basic melodies and musical ideas by specifying notes with their durations in beats.
Parameters:
notes(required): Array of note objects, each containing:note(required): MIDI note number (0-127, where 60 = Middle C)velocity(optional): Note velocity (1-127, default 64)duration(required): Note duration in beats (1.0 = quarter note, 0.5 = eighth note, 2.0 = half note, etc.)
bpm(optional): Tempo in beats per minute (20-300, default 120)channel(required): MIDI channel (1-16) - must be specified for sequencesport_name(optional): Specific port name, omit to send to all ports
Duration Reference:
4.0= Whole note2.0= Half note1.0= Quarter note0.5= Eighth note0.25= Sixteenth note1.5= Dotted quarter note0.75= Dotted eighth note
Examples:
// Play a simple C major scale at 120 BPM on channel 1
{
"notes": [
{"note": 60, "velocity": 80, "duration": 1.0},
{"note": 62, "velocity": 80, "duration": 1.0},
{"note": 64, "velocity": 80, "duration": 1.0},
{"note": 65, "velocity": 80, "duration": 1.0},
{"note": 67, "velocity": 80, "duration": 1.0},
{"note": 69, "velocity": 80, "duration": 1.0},
{"note": 71, "velocity": 80, "duration": 1.0},
{"note": 72, "velocity": 80, "duration": 2.0}
],
"bpm": 120,
"channel": 1
}
// Play "Mary Had a Little Lamb" at 100 BPM
{
"notes": [
{"note": 64, "duration": 1.0},
{"note": 62, "duration": 1.0},
{"note": 60, "duration": 1.0},
{"note": 62, "duration": 1.0},
{"note": 64, "duration": 1.0},
{"note": 64, "duration": 1.0},
{"note": 64, "duration": 2.0}
],
"bpm": 100,
"channel": 1
}
// Play a rhythm pattern with varying velocities
{
"notes": [
{"note": 60, "velocity": 100, "duration": 0.5},
{"note": 60, "velocity": 60, "duration": 0.5},
{"note": 60, "velocity": 80, "duration": 0.5},
{"note": 60, "velocity": 60, "duration": 0.5}
],
"bpm": 140,
"channel": 10
}Use Cases:
Test musical ideas and melodies
Send simple musical phrases to MIDI devices
Create rhythmic patterns with specific timing
Prototype musical sequences before implementing in DAW
MIDI Note Reference
Common MIDI note numbers:
60 = Middle C (C4)
61 = C#4
62 = D4
63 = D#4
64 = E4
65 = F4
66 = F#4
67 = G4
68 = G#4
69 = A4 (440 Hz)
70 = A#4
71 = B4
72 = C5
Common MIDI CC Numbers
CC#1: Modulation Wheel
CC#7: Volume
CC#10: Pan
CC#11: Expression
CC#64: Sustain Pedal (0-63 = off, 64-127 = on)
CC#71: Resonance/Timbre
CC#74: Brightness/Cutoff
Troubleshooting
No MIDI devices found
Ensure you have MIDI devices connected or virtual MIDI ports set up
On macOS, you can create virtual MIDI ports using Audio MIDI Setup
On Linux, use
aconnect -lto list ALSA MIDI portsOn Windows, check Device Manager for MIDI devices
mido import error
Make sure mido is installed:
uv pip install midoInstall the appropriate MIDI backend for your OS (see Installation section)
Permission errors
On Linux, you may need to add your user to the
audiogroup:sudo usermod -a -G audio $USERThen log out and back in.
Development
Run the server directly for testing:
python -m mcp_server_midi.serverLicense
MIT License - See LICENSE file for details
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
OSC ↔ MIDI bridge for synthesizers and DAWs, with the SyntHub catalogue. A MIDI MCP and OSC MCP.
Create, co-edit, analyze, publish, and export collaborative step-sequencer sessions through MCP.
Compose, save and print music box tunes for 15, 20 and 30-note music boxes.
Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…
Related MCP Servers
- -licenseBqualityNot gradedmaintenanceEnables AI assistants to control MIDI devices and synthesizers through WebMidi.js integration. Provides tools for sending notes, control changes, creating virtual ports, and executing complex musical sequences.11-
- 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.225MIT
- FlicenseNot gradedqualityCmaintenanceEnables control of the Elektron Digitakt II drum machine through MIDI commands. Supports triggering drum sounds, adjusting parameters, switching patterns, and sending note sequences programmatically.12-
- FlicenseAqualityDmaintenanceAn MCP server that enables AI models to control electronic music instruments by sending MIDI messages to hardware synths and drum machines. It supports various MIDI commands including notes, control changes, and system exclusive messages through USB or DIN MIDI interfaces.10-