midi
MIDI MCP Server is a Model Context Protocol (MCP) server that enables AI models to generate MIDI files from text-based music data. This tool allows for programmatic creation of musical compositions through a standardized interface.
claude mcp add --transport stdio tubone24-midi-mcp-server node /path/to/midi-mcp-server/build/index.js
How to use
The MIDI MCP Server lets AI models generate MIDI files from structured, music-focused JSON data. After building the server, you can register it with an MCP client so that clients can request MIDI creation via a standardized interface. The server exposes a tool called create_midi which accepts a title, a JSON representation of the composition, and an output path for the resulting MIDI file. You can customize tempo, time signature, tracks, instruments, and note properties to compose multi-track MIDI using the provided data format. To use it, configure your MCP client to point to the server's entry point (the built index.js) and invoke the create_midi tool with the appropriate input payload. This enables automated MIDI generation as part of your AI-assisted music workflows.
Example workflow: after starting the MCP server locally, add it to your MCP client configuration under a server key (e.g., musicComposer) with command set to node and the path to build/index.js. Then, send a request that includes a composition JSON (bpm, timeSignature, tracks with name, instrument, and notes having pitch, startTime, duration, velocity) and an output_path where the MIDI should be written. The server will generate the MIDI file and save it to the specified location, enabling downstream use such as playback, rendering, or further processing.
How to install
Prerequisites:
- Node.js and npm (or pnpm/yarn) installed on your system
- Access to the project repository
Installation steps:
- Clone or download the MIDI MCP Server repository
- Install dependencies: npm install
- Build the project: npm run build
- Run the server from the built entry point (example): node /path/to/midi-mcp-server/build/index.js
- In your MCP client configuration, register the server (see example in the README): { "mcpServers": { "musicComposer": { "command": "node", "args": ["/path/to/midi-mcp-server/build/index.js"] } } }
Additional notes
Notes and tips:
- The server operates over stdio, so it is designed to be started by an MCP client which will communicate via standard input/output. No additional network configuration is required.
- The core tool is create_midi, which takes a title, a JSON composition, and an output path to save the resulting MIDI file.
- Composition format supports multiple tracks, each with a name, a MIDI instrument number, and an array of notes defined by pitch, startTime (in beats), duration (in beats), and velocity (0-127).
- Ensure the output_path is writable by the process running the server.
- The server depends on the midi-writer-js library (as described in dependencies) for MIDI file creation.
- If you modify paths, ensure your MCP client uses the exact built index.js location to avoid startup errors.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.