Skip to main content
Glama
MuseScore MCP Server

MuseScore MCP Server

by ghchen99

MuseScore MCP-Server

Ein Model Context Protocol (MCP)-Server, der eine programmgesteuerte Kontrolle über MuseScore durch ein WebSocket-basiertes Plugin-System ermöglicht. Dies erlaubt KI-Assistenten wie Claude, Musik zu komponieren, Liedtexte hinzuzufügen, durch Partituren zu navigieren und MuseScore direkt zu steuern.

Demo GIF

Voraussetzungen

  • MuseScore 3.x oder 4.x

  • Python 3.8+

  • Claude Desktop oder ein kompatibler MCP-Client

Related MCP server: Mureka MCP Server

Einrichtung

1. Installieren des MuseScore-Plugins

Speichern Sie zuerst den QML-Plugin-Code in Ihrem MuseScore-Plugin-Verzeichnis:

macOS: ~/Documents/MuseScore4/Plugins/musescore-mcp-websocket.qml Windows: %USERPROFILE%\Documents\MuseScore4\Plugins\musescore-mcp-websocket.qml Linux: ~/Documents/MuseScore4/Plugins/musescore-mcp-websocket.qml

2. Aktivieren des Plugins in MuseScore

  1. Öffnen Sie MuseScore

  2. Gehen Sie zu Plugins → Plugin-Manager

  3. Suchen Sie "MuseScore API Server" und aktivieren Sie das Kontrollkästchen

  4. Klicken Sie auf OK

3. Einrichten der Python-Umgebung

git clone <your-repo>
cd mcp-agents-demo
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install fastmcp websockets

4. Konfigurieren von Claude Desktop

Fügen Sie dies Ihrer Claude Desktop-Konfigurationsdatei hinzu:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "musescore": {
      "command": "/path/to/your/project/.venv/bin/python",
      "args": [
        "/path/to/your/project/server.py"
      ]
    }
  }
}

Hinweis: Aktualisieren Sie die Pfade, damit sie Ihrem tatsächlichen Projektstandort entsprechen.

Ausführen des Systems

Reihenfolge der Vorgänge

  1. Starten Sie zuerst MuseScore mit einer geöffneten Partitur

  2. Starten Sie das MuseScore-Plugin: Gehen Sie zu Plugins → MuseScore API Server

    • Sie sollten eine Konsolenausgabe sehen: "Starting MuseScore API Server on port 8765"

  3. Starten Sie dann den Python MCP-Server oder starten Sie Claude Desktop neu

[Fügen Sie hier Screenshots verschiedener Funktionen ein, wie Harmonisierung, Melodieschreiben, als gezoomte GIFs]

Entwicklung und Tests

Verwenden Sie für die Entwicklung die MCP-Entwicklungstools:

# Install MCP dev tools
pip install mcp

# Test your server
mcp dev server.py

# Check connection status
mcp dev server.py --inspect

Anzeigen der Konsolenausgabe

Um die Konsolenausgabe des MuseScore-Plugins zu sehen, starten Sie MuseScore über das Terminal:

macOS:

/Applications/MuseScore\ 4.app/Contents/MacOS/mscore

Windows:

cd "C:\Program Files\MuseScore 4\bin"
MuseScore.exe

Linux:

musescore4

Funktionen

Dieser MCP-Server bietet eine umfassende Steuerung von MuseScore.

🌟 NEU in diesem Fork: Integrierte automatische, fehlerfreie mehrstimmige Polyphonie & temporales Layout-Mapping zu LilyPond!

Navigation & Cursor-Steuerung

  • get_cursor_info() - Aktuelle Cursorposition und Auswahl-Informationen abrufen

  • go_to_measure(measure) - Zu einem bestimmten Takt navigieren

  • go_to_beginning_of_score() / go_to_final_measure() - Zum Anfang/Ende navigieren

  • next_element() / prev_element() - Cursor Element für Element bewegen

  • next_staff() / prev_staff() - Zwischen Notensystemen wechseln

  • select_current_measure() - Den gesamten aktuellen Takt auswählen

  • select_custom_range(start_tick, end_tick, start_staff, end_staff) - Werkzeug zum Extrahieren von Phrasierungen über Takte und Notensysteme hinweg

Polyphonie & LilyPond-Integration

  • Temporales Rhythmus-Padding: Stimmen mit Lücken oder Pausen erhalten automatisch LilyPond-Platzhaltersequenzen (s4.), um ihren mathematischen Platz präzise zu halten.

  • Gleichzeitiges Stimmen-Rendering: Vollständige 4-stimmige (\voiceOne, \voiceTwo usw.) Arrays, die korrekt strukturiert und pro Notensystem für die erweiterte Agentenverarbeitung aufgeteilt sind.

Erstellen von Noten & Pausen

  • add_note(pitch, duration, advance_cursor_after_action) - Noten mit MIDI-Tonhöhe hinzufügen

  • add_rest(duration, advance_cursor_after_action) - Pausen hinzufügen

  • add_tuplet(duration, ratio, advance_cursor_after_action) - Triolen/N-tolen hinzufügen

Taktverwaltung

  • insert_measure() - Takt an der aktuellen Position einfügen

  • append_measure(count) - Takte am Ende der Partitur anhängen

  • delete_selection(measure) - Aktuelle Auswahl oder bestimmten Takt löschen

Liedtexte & Text

  • add_lyrics_to_current_note(text) - Liedtext zur aktuellen Note hinzufügen

  • add_lyrics(lyrics_list) - Liedtexte stapelweise zu mehreren Noten hinzufügen

  • set_title(title) - Titel der Partitur festlegen

Partitur-Informationen

  • get_score() - Vollständige Partituranalyse und -struktur abrufen

  • ping_musescore() - Verbindung zu MuseScore testen

  • connect_to_musescore() - WebSocket-Verbindung herstellen

Dienstprogramme

  • undo() - Letzte Aktion rückgängig machen

  • set_time_signature(numerator, denominator) - Taktart ändern

  • processSequence(sequence) - Mehrere Befehle stapelweise ausführen

Musikbeispiele

Schauen Sie im Ordner /examples nach MuseScore-Beispieldateien, die verschiedene Musikstile demonstrieren:

  • Asian Instrumental - Traditionelles, asiatisch inspiriertes Instrumentalstück

  • String Quartet - Klassisches Streichquartett-Arrangement

Jedes Beispiel enthält:

  • .mscz - MuseScore-Datei (bearbeitbar)

  • .pdf - Notenblatt

  • .mp3 - Audio-Vorschau

Anwendungsbeispiele

Erstellen einer einfachen Melodie

# Set up the score
await set_title("My First Song")
await go_to_beginning_of_score()

# Add notes (MIDI pitch: 60=C, 62=D, 64=E, etc.)
await add_note(60, {"numerator": 1, "denominator": 4}, True)  # Quarter note C
await add_note(64, {"numerator": 1, "denominator": 4}, True)  # Quarter note E
await add_note(67, {"numerator": 1, "denominator": 4}, True)  # Quarter note G
await add_note(72, {"numerator": 1, "denominator": 2}, True)  # Half note C

# Add lyrics
await go_to_beginning_of_score()
await add_lyrics_to_current_note("Do")
await next_element()
await add_lyrics_to_current_note("Mi")
await next_element()
await add_lyrics_to_current_note("Sol")
await next_element()
await add_lyrics_to_current_note("Do")

Stapelverarbeitung

# Add multiple lyrics at once
await add_lyrics(["Twin-", "kle", "twin-", "kle", "lit-", "tle", "star"])

# Use sequence processing for complex operations
sequence = [
    {"action": "goToBeginningOfScore", "params": {}},
    {"action": "addNote", "params": {"pitch": 60, "duration": {"numerator": 1, "denominator": 4}, "advanceCursorAfterAction": True}},
    {"action": "addNote", "params": {"pitch": 64, "duration": {"numerator": 1, "denominator": 4}, "advanceCursorAfterAction": True}},
    {"action": "addRest", "params": {"duration": {"numerator": 1, "denominator": 4}, "advanceCursorAfterAction": True}}
]
await processSequence(sequence)

Star-Verlauf

Star History Chart

Fehlerbehebung

Verbindungsprobleme

  • "Not connected to MuseScore":

    • Stellen Sie sicher, dass MuseScore mit einer geöffneten Partitur läuft

    • Führen Sie das MuseScore-Plugin aus (Plugins → MuseScore API Server)

    • Überprüfen Sie, ob Port 8765 nicht durch eine Firewall blockiert wird

Plugin-Probleme

  • Plugin erscheint nicht: Überprüfen Sie, ob sich die .qml-Datei im richtigen Plugin-Verzeichnis befindet

  • Plugin lässt sich nicht aktivieren: Starten Sie MuseScore neu, nachdem Sie die Plugin-Datei platziert haben

  • Keine Konsolenausgabe: Starten Sie MuseScore über das Terminal, um Debug-Meldungen zu sehen

Python-Server-Probleme

  • "No server object found": Das Server-Objekt muss auf Modulebene mcp, server oder app heißen

  • WebSocket-Fehler: Stellen Sie sicher, dass das MuseScore-Plugin läuft, bevor Sie den Python-Server starten

  • Verbindungs-Timeout: Das MuseScore-Plugin muss aktiv laufen, nicht nur aktiviert sein

API-Einschränkungen

  • Liedtexte: Nur die erste Strophe wird in der MuseScore 3.x Plugin-API unterstützt

  • Titel-Einstellung: Verwendet aufgrund von Frame-Zugriffsbeschränkungen mehrere Fallback-Methoden

  • Auswahl-Persistenz: Einige Vorgänge können die aktuelle Auswahl beeinflussen

Dateistruktur

mcp-agents-demo/
├── .venv/
├── server.py                           # Python MCP server entry point
├── musescore-mcp-websocket.qml         # MuseScore plugin
├── requirements.txt
├── README.md
└── src/                                # Source code modules
    ├── __init__.py
    ├── client/                         # WebSocket client functionality
    │   ├── __init__.py
    │   └── websocket_client.py
    ├── tools/                          # MCP tool implementations
    │   ├── __init__.py
    │   ├── connection.py               # Connection management tools
    │   ├── navigation.py               # Score navigation tools
    │   ├── notes_measures.py           # Note and measure manipulation
    │   ├── sequences.py                # Batch operation tools
    │   ├── staff_instruments.py        # Staff and instrument tools
    │   └── time_tempo.py               # Timing and tempo tools
    └── types/                          # Type definitions
        ├── __init__.py
        └── action_types.py             # WebSocket action type definitions

MIDI-Tonhöhenreferenz

Allgemeine MIDI-Tonhöhenwerte als Referenz:

  • Eingestrichenes C (Middle C): 60

  • C-Dur-Tonleiter: 60, 62, 64, 65, 67, 69, 71, 72

  • Chromatisch: C=60, C#=61, D=62, D#=63, E=64, F=65, F#=66, G=67, G#=68, A=69, A#=70, B=71

Dauer-Referenz

Dauerformat: {"numerator": int, "denominator": int}

  • Ganze Note: {"numerator": 1, "denominator": 1}

  • Halbe Note: {"numerator": 1, "denominator": 2}

  • Viertelnote: {"numerator": 1, "denominator": 4}

  • Achtelnote: {"numerator": 1, "denominator": 8}

  • Punktierte Viertelnote: {"numerator": 3, "denominator": 8}

Available Tools

65 tools
add_articulationAdd ArticulationA

Add an articulation to the chords that contain the chosen drums in a range of bars (and beats): 'half_open' (half-open hi-hat), 'open', 'closed' (hi-hat), 'accent', 'marcato', 'staccato', 'tenuto'. E.g. drums=['hi-hat'], symbol='half_open' marks the hi-hats of bars 72-85 as half-open. Chords that already have it are left alone. Remove with remove_articulations.

Inputs: start_measure (required), drums, symbol, pitches, +5 more.

add_instrumentAdd InstrumentC

Add a new staff/instrument to the score.

Inputs: instrument_id (required).

add_labelAdd LabelA

Add a label in a colored box (a boxed staff text) at the start of a measure, e.g. a section tag like 'Groove x7' or 'Fill'. Saved in the score; remove with clear_highlights.

Inputs: text (required), measure (required), staff, border, +1 more.

add_lyricsAdd LyricsA

Add lyrics to consecutive notes starting from the current cursor position, one entry per note (rests are skipped). End a syllable with '-' to hyphenate it to the next one ("Hel-", "lo"). Use "_" (or "") for a note that continues the previous syllable: no lyric is placed there and the previous syllable gets an extender line over it, as MuseScore draws a melisma.

Inputs: lyrics (required), verse.

add_noteAdd NoteA

Add a note at the current cursor position with the specified pitch and duration. Sequential notes write a melody. Set add_to_chord=True to stack a pitch on the current chord.

Inputs: pitch, duration, add_to_chord, advance_cursor_after_action.

add_rehearsal_markAdd Rehearsal MarkB

Add a rehearsal mark (section label such as 'A' or 'Verse') at the start of a measure. Experimental: check the score afterwards.

Inputs: text (required), measure (required).

add_restAdd RestC

Add a rest at the current cursor position.

Inputs: duration, advance_cursor_after_action.

add_textAdd TextB

Add free text at a bar (optionally at a beat) with its own look: size, italic/bold, color, above or below the staff. Defaults give a small, italic, light-grey cue, e.g. the first words of a section's lyrics as a reminder for the player. kind='expression' makes it an expression text. Use the text the user provides. Remove with Ctrl+Z, or select the texts in MuseScore and delete them.

Inputs: text (required), measure (required), beat, bold, +6 more.

add_tieAdd TieA

Tie notes of the chord at the cursor to the same pitches in the next chord of that staff. A tie joins two notes of the same pitch into one longer sound. Only pitches in both chords can be tied: by default every such pitch is tied; pass pitches to tie only some of them (e.g. tie C and E of C-E-G into C-E-A with pitches=[60, 64]). Afterwards the cursor is on the second chord, so calling add_tie again continues a tie chain. Note that after add_note the cursor is already on the next position: move back to the first note (e.g. with prev_element) before calling add_tie. Write both chords completely before tying: MuseScore treats tied chords as one, so a pitch added afterwards with add_note(add_to_chord=True) to the second chord is also added, tied, to the first. While writing music, add_tied_note is usually simpler. Fails without changing the score when no pitch can be tied, e.g. when the next element is a rest.

Inputs: pitches.

add_tied_noteAdd Tied NoteA

Write the next note or chord at the cursor, tied to the chord before the cursor: like pressing + in MuseScore's note input. Use it after add_note to hold a note longer, e.g. across a barline. By default the new chord repeats every pitch of the chord before it, all tied; pass pitches to tie only some of them, and extra_pitches for new pitches in the same chord without a tie (e.g. C-E-G into C-E-A: pitches=[60, 64], extra_pitches=[69]). Add new pitches this way, not with add_note(add_to_chord=True) afterwards: MuseScore treats tied chords as one and would also add the pitch, tied, to the chord before. A note longer than the rest of the bar is split at the barline into tied notes, and the cursor moves past all of it. Fails without changing the score when there is no note before the cursor or a pitch is not in it.

Inputs: duration (required), pitches, extra_pitches, advance_cursor_after_action.

add_tupletAdd TupletC

Add a tuplet at the current cursor position.

Inputs: ratio, duration, advance_cursor_after_action.

add_voltaAdd VoltaA

Add a volta (1st/2nd ending bracket) over a range of measures. Experimental: the plugin API has no dedicated volta call, so check the result; if it fails, the measures are selected and the reply says which palette item to click.

Inputs: start_measure (required), text, endings, end_measure.

append_measureAppend MeasureC

Append measures to the end of the score.

Inputs: count.

apply_measure_repeatsApply Measure RepeatsA

Turn bars of one staff into measure-repeat signs (1-, 2- or 4-bar) automatically. MuseScore's plugin API cannot place these signs, so this saves the score, backs the file up, writes the signs into the file and reloads it in MuseScore. The reload resets MuseScore's undo history: use restore_backup to undo. Each sign repeats the bars just before it, and the replaced bars' notes are deleted. Bars with ties or slurs crossing their barlines are skipped and reported. Pass all groups for a staff in one call.

Inputs: staff (required), groups (required), score_path.

beam_over_restsBeam Over RestsA

Beam eighths and shorter across rests inside a beat group (a dotted quarter in 12/8, a beat in 4/4), as drum charts write them: one beamed group per beat with the rest under the beam, instead of separate flags broken at every rest. Only rests with beamable notes before and after them in the same group change. Run it over the whole drum staff once the chart is done. clear=True puts the rests back on automatic beaming.

Inputs: clear, last_staff, end_measure, first_staff, +1 more.

clear_colorClear ColorB

Reset notes and rests in a range of measures and staves (optionally only some beats) to the default black.

Inputs: start_measure (required), end_beat, last_staff, start_beat, +2 more.

clear_highlightsClear HighlightsA

Remove highlights from a range of measures and staves. kinds: 'highlights' = bands and boxes from highlight_bars, highlight_notes and highlight_symbols; 'markings' = boxes behind dynamics (highlight_markings); 'labels' = boxed labels (add_label); 'notes' = small notehead boxes made by older versions. Recolored notes and symbols are reset with clear_color / highlight_symbols(mode='color', clear=True).

Inputs: kinds, last_staff, end_measure, first_staff, +1 more.

collapse_to_repeatCollapse To RepeatA

Collapse a run of repeated bars or phrases into one played N times: keeps the first phrase_bars bars from start, deletes the rest of the run, and puts start/end repeat barlines with a play count around the kept bars (shown as e.g. '7x'). With phrase_bars=2, bars start..end must be a 2-bar phrase repeated (e.g. 28-35 becomes 28-29 x4). This changes every staff, so use it in a score that contains only the part being charted (make_part_score). It refuses when any staff's copies differ in anything but ghost notes and crashes on beat 1, unless force=True. Later measures are renumbered: collapse from the end of the score backwards. Needs MuseScore 4.6+.

Inputs: end (required), start (required), force, phrase_bars.

color_rangeColor RangeA

Color the notes and rests (with their stems, beams, accidentals, dots, ties and grace notes such as flams) in a range of measures and staves, e.g. to highlight a passage. Use start_beat/end_beat to color only part of a bar, e.g. a fill on beats 3-4: notes and rests starting in that span are colored.

Inputs: start_measure (required), color, voices, end_beat, +4 more.

connect_to_musescoreConnect To MusescoreC

Connect to the MuseScore WebSocket API.

Inputs: no named parameters.

delete_measuresDelete MeasuresA

Remove whole measures (on every staff) from the score, like MuseScore's Remove selected range (Ctrl+Del). Works with multi-measure rests on (they are switched off meanwhile) and reports an error if MuseScore deleted fewer measures than asked. Later measures are renumbered, so when removing several ranges start from the last one.

Inputs: start_measure (required), end_measure.

delete_selectionDelete SelectionB

Delete the current selection, or the specified measure.

Inputs: measure.

find_groove_sectionsFind Groove SectionsA

Map the sections of a groove-based part (drums by default): for each section the groove bar, the bars that copy it exactly, near copies (with the hits that differ), and fills. Proposes measure-repeat signs for exact copies only, as ready-made apply_measure_repeats groups, and a collapse_to_repeat range for a 'groove bar x N' chart. Show near copies to the user and only replace them once approved: a repeat sign deletes their differences.

Inputs: staves, tolerance, end_measure, start_measure.

find_repeated_measuresFind Repeated MeasuresA

Find repeated material in the score. Returns (1) per-staff bars that repeat the previous 1, 2 or 4 bars, candidates for measure-repeat signs (these declutter the page but keep the length), and (2) whole-score passages played again right away, candidates for repeat barlines and 1st/2nd endings (these shorten the score once the duplicate measures are deleted). Each passage lists the tool calls that apply it. Reads the score in small chunks, so it works on large scores. Measure numbers refer to the score as it is now: apply passages from the last one backwards.

Inputs: staves, highlight, end_measure, start_measure.

get_cursor_infoGet Cursor InfoB

Get information about the current cursor position.

Inputs: no named parameters.

get_scoreGet ScoreA

Get the notes of the current score as LilyPond (or raw JSON), a range of measures at a time. Without end_measure, returns at most 16 measures starting at start_measure; the header says how many measures the score has, so page through long scores. Use staves to read only some staves of a large score. Each bar ends with '% m.N': N is the bar's position, which is what every tool's measure parameters mean. When the score's displayed bar numbers differ (e.g. they count repeats), the displayed number follows as '(bar M)'; repeat barlines show as '|:' and ':|xN'.

Inputs: format, staves, end_measure, start_measure.

get_styleGet StyleA

Read score style settings (Format → Style) by MuseScore's internal key, e.g. "createMultiMeasureRests", "chordSymbolAFontSize", "minMeasureWidth". Returns the current values, and lists under "unknown" the keys MuseScore does not have.

Inputs: keys (required). Returns: object

ghost_notesGhost NotesA

List the ghost notes (notes in parentheses) per bar, or remove them (mode='remove'). A chord made only of ghost notes becomes a rest. Show the list to the user before removing: whether a chart keeps ghost notes is their choice.

Inputs: mode, drums, pitches, last_staff, +3 more.

go_to_beginning_of_scoreGo To Beginning Of ScoreB

Navigate to the beginning of the score.

Inputs: no named parameters.

go_to_final_measureGo To Final MeasureA

Navigate to the final measure of the score.

Inputs: no named parameters.

go_to_measureGo To MeasureA

Navigate to a specific measure and select it across all staves. The cursor moves to beat 1 of that measure on the first staff, so the next cursor tool (add_note, add_rest, add_lyrics, set_time_signature...) acts there; use next_staff to move down to another staff.

Inputs: measure (required).

highlight_barsHighlight BarsA

Highlight bars like a highlighter pen: a thick, semi-transparent band behind the notes of each staff in the range, following the bars across line breaks. start_beat/end_beat limit it to part of a bar. Saved in the score; remove with clear_highlights. Experimental: check the result in the score.

Inputs: start_measure (required), color, opacity, end_beat, +4 more.

highlight_markingsHighlight MarkingsA

Highlight markings such as dynamics (f, mf, ff) with a translucent box behind each one. get_score lists the markings in each measure. Remove with clear_highlights.

Inputs: color, types, opacity, last_staff, +3 more.

highlight_notesHighlight NotesA

Highlight individual hits like a highlighter pen: a translucent box around each matching note, as wide as the note and as tall as the whole staff (taller if the note sits above or below it). Hits close enough for their boxes to touch share one box. Use drums (e.g. ["crash"]) or pitches to pick notes in a chord. start_beat/end_beat limit it to part of a bar. Boxes are sized to the current layout: if the layout changes a lot, clear and highlight again. Remove with clear_highlights.

Inputs: start_measure (required), color, drums, opacity, +6 more.

highlight_symbolsHighlight SymbolsA

Highlight or recolor time signatures, repeat barlines (start/end repeat signs with their dots) and measure-repeat signs. mode='highlight' draws a full-staff-height translucent box around each one (pastel light blue by default); mode='color' recolors the symbol itself (clear=True resets it to black).

Inputs: mode, clear, color, kinds, +5 more.

insert_measureInsert MeasureB

Insert a measure at the current position.

Inputs: no named parameters.

label_section_countsLabel Section CountsA

Write each section's bar count (e.g. '2x4+2'). placement='label' (default, the chart style the user chose) puts it in parentheses in the section label (rehearsal mark): 'Chorus 1 (2x4)', and sets the labels to label_size points with label_clearance spaces around them, so MuseScore places and spaces them. placement='beside' writes it in bold red right of the label at the label's height (moved past a text already there or up over notes); MuseScore doesn't leave room for it between systems, so it can run into dynamics of the system above: only on request. Without counts, uses song_structure's counts (the ones already written in the labels where they still add up). Running it again replaces the counts in either form; clear=True removes them.

Inputs: size, clear, color, staff, +4 more.

make_part_scoreMake Part ScoreA

Make a separate score containing only some parts (e.g. the drum kit) to build a chart in: saves the current score, writes a copy of its file without the other instruments (tempo, rehearsal marks, repeats and the title move to the kept staff), closes the original and opens the copy in its place (the plugin can only work in its own window). The original is saved and unchanged; if the copy can't be opened, the original is reopened. Works even when another instrument has a damaged bar. in_place=True instead removes the other instruments from the open score itself, without saving anything first (so a damaged bar in another instrument is never written again) and after backing up the full score (MusicXML export, plus a copy of its .mscz when it can be identified); it reports bars left that don't add up. Staff indices in the new score start again from 0.

Inputs: staves (required), in_place, score_path, output_path.

next_elementNext ElementB

Move cursor to the next element.

Inputs: no named parameters.

next_staffNext StaffB

Move cursor to the next staff.

Inputs: no named parameters.

number_bars_as_playedNumber Bars As PlayedA

Make the displayed bar numbers count repeated bars, as played: after a passage between repeat barlines played N times, the next bar's number jumps by (N - 1) x the passage length. Recomputes all bars (MuseScore's 'Add to measure number'), so it can be run again after changing repeats. exclude_from_count leaves bars out of the count, e.g. [1] for a silent pickup or intro bar. reset=True removes all offsets and exclusions instead (plain 1..N numbering). Voltas are not taken into account. Needs MuseScore 4.6+. Tools keep addressing bars by position.

Inputs: reset, exclude_from_count.

ping_musescorePing MusescoreA

Ping the MuseScore WebSocket API to check connection.

Inputs: no named parameters.

prepare_measure_repeatPrepare Measure RepeatA

Prepare measure-repeat signs: selects the measures that should become repeat signs, on the given staves, and returns what to click in MuseScore. The plugin API cannot place measure-repeat signs itself.

Inputs: start_measure (required), bars, last_staff, end_measure, +1 more.

prev_elementPrev ElementC

Move cursor to the previous element.

Inputs: no named parameters.

prev_staffPrev StaffB

Move cursor to the previous staff.

Inputs: no named parameters.

processSequenceProcesssequenceA

Run several score commands in order in a single call. Each item is {"action": , "params": {...}}, using the same camelCase action names and parameters as the plugin (e.g. "addNote" with pitch, duration, advanceCursorAfterAction). Allowed actions: getScore, addNote, addTie, addTiedNote, addRest, addTuplet, appendMeasure, deleteSelection, getCursorInfo, goToMeasure, nextElement, prevElement, nextStaff, prevStaff, selectCurrentMeasure, insertMeasure, goToFinalMeasure, goToBeginningOfScore, setTimeSignature, addLyrics, addInstrument, setStaffMute, setInstrumentSound, setTempo, selectMeasures, deleteMeasures, setRepeatBarlines, addVolta, colorRange, setStyle, addRehearsalMark, removeParts, addHighlight, addLabel, clearHighlights, highlightNotes, highlightMarkings, highlightSymbols, setMeasureNumbering, numberAsPlayed, addText, removeAnnotations, addArticulation, removeArticulations, ghostNotes, beamOverRests, addSectionCounts. Measure ranges use startMeasure/endMeasure (1-based, inclusive) and startStaff/endStaff (0-based, endStaff exclusive). Processing stops at the first invalid action or failing step, and the error names it; the steps before it stay applied.

Inputs: sequence (required).

remove_annotationsRemove AnnotationsA

Remove texts and marks from a range of bars, e.g. to redo part of a chart. kinds: 'texts' (add_text: cues, '*' marks, legends), 'labels' (boxed add_label texts), 'rehearsal_marks', 'tempo' (tempo markings, which also changes playback), 'voltas'. contains limits it to texts containing that string, e.g. '**'. Defaults to the whole score. Highlights and note colors are removed with clear_highlights / clear_color instead.

Inputs: exact, kinds, contains, last_staff, +3 more.

remove_articulationsRemove ArticulationsC

Remove articulations (by default the hi-hat symbols half_open, open, closed) from the chords that contain the chosen drums in a range of bars.

Inputs: drums, pitches, symbols, last_staff, +3 more.

renderRenderA

Show the score as MuseScore engraves it, as an image: what get_score's text cannot show, such as overlapping chord symbols, marker placement, system and page breaks and spacing. page=N gives a whole page (for layout); measures='X-Y' crops those bars from their page at higher detail, with everything attached to them (chord symbols, texts, lyrics, markers), as they stand on their systems: the other bars of those systems are left blank, so a blank space before the first bar means the system starts earlier. Measures are positions in the score, as in get_score's '% m.N', not printed bar numbers: with a pickup bar, printed bar 49 is measure 50. The caption gives the printed numbers when they differ. Render again after a change to check it.

Inputs: page, measures.

restore_backupRestore BackupA

Bring back the version of the open score saved before an apply_measure_repeats edit (the newest backup by default) and reload it in MuseScore. The current version is backed up first.

Inputs: backup, score_path.

select_current_measureSelect Current MeasureC

Select the current measure.

Inputs: no named parameters.

select_custom_rangeSelect Custom RangeA

Select a custom range of ticks across staves. Useful for retrieving continuous phrasing that spans measure boundaries.

Inputs: end_tick (required), end_staff (required), start_tick (required), start_staff (required).

set_end_notesSet End NotesA

Print notes at the end of the score, in a text frame after the last bar: a bold heading and one line per item, e.g. a summary of how a chart differs from the original (what was collapsed, which differences were dropped, what stays written out). Replaces notes added before (the report's previous lists them), so it can be re-run; append=True keeps their lines and adds the new ones; no heading and no lines removes them. Edits the score file and reloads it (undo with restore_backup).

Inputs: lines (required), append, heading, score_path.

set_instrument_soundSet Instrument SoundC

Change the sound of an instrument on a staff.

Inputs: staff (required), instrument_id (required).

set_measure_numberSet Measure NumberA

Set the displayed number of one bar: add_to_number is MuseScore's 'Add to measure number' (the offset carries on to all later bars), exclude_from_count is 'Exclude from measure count'.

Inputs: measure (required), add_to_number, exclude_from_count.

set_repeat_barlinesSet Repeat BarlinesA

Put start and end repeat barlines around a range of measures, or remove them. Needs MuseScore 4.6 or newer; on older versions the measures are selected and the reply says which palette items to click.

Inputs: end_measure (required), start_measure (required), clear, play_count.

set_score_headerSet Score HeaderA

Tidy the title frame at the top of the score: title, subtitle, composer, lyricist and the part name shown top-left in part scores (a long part name such as 'Player | Kit | Drums' runs into the title). Leave a field out to keep it, pass an empty string to remove it. Edits the score file and reloads it (undo with restore_backup).

Inputs: title, composer, lyricist, subtitle, +2 more.

set_song_structureSet Song StructureA

Print the song structure as a table on a new page at the end of the score, after the end notes: the song and artist under the heading (taken from the title frame unless given), then one row per section with its bars (as played), groove and fills, and the total. Get the rows from song_structure and give grooves and fills musical names. Replaces a structure page added before; no rows removes it. Edits the score file and reloads it (undo with restore_backup).

Inputs: rows (required), song, artist, heading, +1 more.

set_staff_muteSet Staff MuteC

Mute or unmute a staff.

Inputs: mute (required), staff (required).

set_styleSet StyleA

Change score style settings (Format → Style), given as {key: value} with MuseScore's internal keys. An unknown key is refused, and the settings before it stay applied. Returns each value as MuseScore reads it back after the change; check it with get_style or render when unsure.

Inputs: styles (required). Returns: object

set_tempoSet TempoA

Set the tempo with a tempo marking (in quarter-note beats per minute) at the current cursor position, or at the start of the given measure.

Inputs: bpm (required), measure.

set_time_signatureSet Time SignatureC

Set the time signature.

Inputs: numerator, denominator.

simplify_rollSimplify RollA

Rewrite a cymbal roll (a run of repeated or tied cymbal notes, e.g. a crash swell) as one long note per bar, tied across barlines, with a tremolo: the same sound with far fewer symbols. The roll starts on start_beat of start_measure (default beat 1; earlier notes in that bar stay as written) and ends at the end of end_measure, or after end_beat in it. Lengths that no single note value can hold are written as tied notes. Notes of the first chord that are not part of the roll (e.g. a kick) move to voice 2 with their own length. Refuses (changing nothing) if other notes or rests sit inside the roll or it doesn't start and end where notes do. Edits the score file and reloads it (undo with restore_backup).

Inputs: staff (required), end_measure (required), start_measure (required), drums, +5 more.

song_structureSong StructureA

Outline the song for a structure page: the sections (from the rehearsal marks) with how many bars each lasts as played (repeats counted), the grooves in it (bars that recur, named Groove A, B... with the drums they use; hi-hat openings, crashes and ghost notes don't make a new groove) and the fills (bars that don't recur). Each section's count is its length in fours as drummers count it (6 -> '4+2', 12 -> '3x4', bars before the first groove bar counted on their own: '2+4+2'); bars excluded from the bar count (a count-in) are left out. suggested_rows can go to set_song_structure as they are, but give the grooves and fills musical names first (e.g. 'Verse shuffle', 'Tom fill into chorus').

Inputs: staff, tolerance.

undoUndoC

Undo the last action.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 65 tools

    Disambiguation2/5

    The set contains many tools with overlapping or nested purposes: processSequence duplicates most individual action tools, add_tie vs add_tied_note is subtle, add_text/add_label/add_rehearsal_mark overlap, and several highlight/clear tools target similar visual annotations. Descriptions are detailed and help, but an agent still faces many plausible tool choices for the same operation.

    Naming Consistency4/5

    Most tool names use readable snake_case with clear action-oriented names, such as add_note, delete_measures, and highlight_notes. The main deviations are processSequence using camelCase and a few noun-only names like song_structure and render, but the overall convention remains mostly predictable.

    Tool Count1/5

    With 65 tools, the server is far beyond the appropriate range for a coherent MCP tool surface. Even for a complex notation domain, this many tools creates heavy selection burden and encourages redundancy, especially with processSequence acting as a meta-tool over many actions.

    Completeness4/5

    The surface is unusually broad for score editing, navigation, annotation, drum-chart workflows, structure pages, and backup/restore, with workarounds for plugin API limitations. Gaps remain around core score lifecycle operations such as creating/opening/saving/exporting scores and some basic notation controls like key signatures or dynamics, but many are workable in an open-score workflow.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers