Home / MCP / MCP MIDI Server

MCP MIDI Server

Provides a virtual MIDI output and API to send MIDI notes and CC messages via MCP, enabling LLM-driven MIDI control across apps.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "midi_http": {
            "url": "http://localhost:8123/sse"
        }
    }
}

You can run a dedicated MCP MIDI Server that exposes a virtual MIDI output you can connect to from any MIDI-enabled application. This lets you feed MIDI note events and control changes from an LLM or automated workflow into DAWs, soft synths, or hardware via your computer’s MIDI interface.

How to use

Set up the MCP MIDI Server so you can send MIDI events from an automation client. The server creates a virtual MIDI output port named "MCP MIDI Out" that you select as a MIDI input in your target application. Use the HTTP MCP URL to subscribe to events and the local stdio endpoint to run the server locally.

How to install

Prerequisites: Python 3.7 or newer, pip, and a Python environment. You will also need access to a virtual MIDI host library.

# 1) Clone the project repository
git clone <repository-url>
cd mcp-server-midi

# 2) Create a Python virtual environment
python -m venv .venv
source .venv/bin/activate

# 3) Install dependencies
pip install -r requirements.txt

# 4) Create your configuration file
PORT=8123
echo "PORT=$PORT" > .env

Run the server to start accepting MIDI messages and exposing a virtual MIDI port for your applications.

python mcp_midi_server.py

Configuration and MCP integration

Connections can be made in two ways: a remote MCP URL for streaming events and a local stdio command to start the server.

{
  "mcpServers": {
      "midi": {
          "url": "http://localhost:8123/sse"
      }
   }
}

To run the server locally, execute the following command from the project root (you may need to adjust the Python path if your environment differs): start the server with Python.

Available tools

Send Note On

Sends a MIDI Note On message with specified note, velocity, and channel.

Send Note Off

Sends a MIDI Note Off message for a given note, velocity, and channel.

Send Control Change

Sends a MIDI Control Change (CC) message with a controller number, value, and channel.

Send MIDI Sequence

Sends a sequence of MIDI events with defined notes, durations, and start times.