Enables generation and export of musical compositions to MIDI format, including melody generation, musical transformations, chord realization, and voice addition using the music21 library.
Music21 Composer MCP
A composition-focused MCP server built on music21, designed for generative workflows.
Features
generate_melody - Constraint-based melody generation
transform_phrase - Musical transformations (sequence, inversion, retrograde, etc.)
reharmonize - Generate alternative chord progressions
add_voice - Counterpoint and voice generation
realize_chord - Chord symbol to voicing
export_midi - Export to MIDI format
Installation
Quick Start
Start the HTTP server
API Usage
API Documentation
With the server running, visit http://localhost:8000/docs for interactive API documentation.
Input Formats
The API accepts three input formats:
1. Note List (simplest)
2. ABC Notation
3. MusicXML
Standard MusicXML format.
Development
Implementation Status
Tool | Status |
| Implemented |
| Phase 2 |
| Phase 2 |
| Phase 3 |
| Phase 4 |
| Phase 5 |
MCP adapter | Phase 6 |
License
MIT