
# MIDIRestyle
### Your melody, in someone else's tuning.
Drop in a MIDI file, choose a target musical style, and MIDIRestyle converts it. A melody written in
Ionian can come back as Chinese pentatonic, Javanese pelog, Arabic maqam, or any of the **171 scales**
that ship with it. Rhythm and phrasing stay exactly as you played them — only pitch is re-mapped.
[](https://github.com/aaronbrataaditama/MIDIRestyle/releases/latest)
[](https://github.com/aaronbrataaditama/MIDIRestyle/releases)



[](https://mcpservers.org/servers/aaronbrataaditama/midirestyle)
[](LICENSE)

**[midirestyle.netlify.app](https://midirestyle.netlify.app/)** ·
[Download for Windows](https://github.com/aaronbrataaditama/MIDIRestyle/releases/latest) ·
[Release notes](https://github.com/aaronbrataaditama/MIDIRestyle/releases)
## Or just ask — MIDIRestyle speaks MCP
The same `.exe` doubles as a [Model Context Protocol](https://modelcontextprotocol.io) server. Point
Claude — or any MCP client — at it, and your agent can search the scale library, read your MIDI,
restyle it and export the result. Nothing extra to install, and your files never leave your machine.
Three lines in `claude_desktop_config.json`:
```json
{ "mcpServers": {
"midirestyle": { "command": "C:\\Tools\\MIDIRestyle.exe", "args": ["--mcp"] }
} }
```
Or one line in Claude Code:
```
claude mcp add midirestyle -- "C:\Tools\MIDIRestyle.exe" --mcp
```
> *Help ▸ Agent access (MCP)…* inside the app shows both snippets with **this** exe's real path
> already filled in — worth using, because a portable exe can live anywhere and be renamed.
An agent host spawns the server; you never run `--mcp` by hand. It speaks over stdin/stdout only —
no window, no network, no second copy of the app installed.
> **You** — take `ballad_sketch.mid` and try it in a few Middle Eastern styles. Keep whichever one
> holds the melody's shape best.
```text
inspect_midi ballad_sketch.mid → 148 notes · D minor · 72 bpm · 4 tracks
list_scales query: "maqam" → 16 scales
describe_scale middleeast.arabic.maqam-rast → 7 degrees · ±50¢ from 12-TET · 2 bend clusters
restyle_midi → Maqam Rast → ballad_sketch.middleeast.arabic.maqam-rast.mid
restyle_midi → Maqam Hijaz → ballad_sketch.middleeast.arabic.maqam-hijaz-notated.mid
```
> **Agent** — Hijaz is the one: its lowered 2nd lands right on your hook, and the descending motif in
> bars 5–8 survives intact. Rast smoothed it out too much. Written with per-channel pitch bend, so
> the tuning holds up in your DAW.
### The tools it exposes
| Tool | What it does |
| --- | --- |
| `inspect_midi` | Tracks, notes, tempo, time signature and the detected key of a file on disk, as structured data. |
| `list_scales` | Browse and filter all 171 scales — by tradition, degree count, whether they notate, how far they sit from 12-TET. |
| `describe_scale` | One scale in detail: degrees in cents, its spelling, its deviation, and what it will cost in MIDI channels. |
| `restyle_midi` | Runs the desktop app's own pipeline and writes the restyled `.mid`, pitch bend included. |
| `export_musicxml` | Writes notation, for scales that can honestly be spelled on a staff. |
Plus a `choose_a_style` prompt that walks a user to a scale one question at a time.
Every path passed to the tools must be absolute. Outputs default to `