- Home
- MCP servers
- MIDI File
MIDI File
- javascript
8
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"xiaolaa2-midi-file-mcp": {
"command": "npx",
"args": [
"-y",
"midi-file-mcp"
]
}
}
}MIDI File MCP provides a set of MCP services to read, analyze, and manipulate MIDI files using Tone.js, enabling you to inspect track data, modify tempo, add notes, and extend MIDI files without low-level MIDI parsing.
How to use
You can use MIDI File MCP with an MCP client to read and modify MIDI files. Install the MCP, then configure your client to communicate with the local or remote server. Once connected, you can query MIDI information, inspect tracks and notes, adjust tempo, and append notes or control changes to existing tracks.
Typical workflows include loading a MIDI file, inspecting each track for notes, control changes, and pitch bends, then adding new notes or changes at specific positions. You can also set the file tempo and add new tracks if you need to expand the composition.
When working with prompts or automation, ensure you provide the full path to the MIDI file to avoid path resolution issues. Use absolute paths to prevent ambiguity across different working directories.
How to install
Prerequisites you need to prepare before installing: you should have Node.js installed so that npx can run commands reliably.
Install MIDI File MCP for your MCP client using Smithery. This will install the MIDI File MCP package and set it up for use with your client Claude Desktop.
npx -y @smithery/cli install @xiaolaa2/midi-file-mcp --client claude
Configuration and usage with clients
Configure the MIDI File MCP with your MCP client to enable command execution and data exchange.
"midi-file-mcp": {
"command": "npx",
"args": [
"-y",
"midi-file-mcp"
]
}
Available tools
get_midi_info
Retrieve general MIDI file information such as format, ticks per beat, and tempo hints.
set_tempo
Set the MIDI file tempo (BPM) to a desired value.
get_tracks_info
Get information about all tracks in the MIDI file, including track count and basic metadata.
get_track_info_by_index
Obtain detailed information about a specific track by its index.
get_notes_by_index
Retrieve all notes from a specific track by index.
get_pitchbends_by_index
Retrieve all pitch bend events from a specific track by index.
get_controlchanges_by_index
Retrieve all control change events from a specific track by index.
add_notes_by_index
Add one or more notes to a specific track.
add_controlchanges_by_index
Add control change events to a specific track.
add_pitchbends_by_index
Add pitch bend events to a specific track.
add_track
Add a new track to the MIDI file.