Skip to main content
Glama
MuseScore MCP Server

MuseScore MCP Server

by ghchen99

MuseScore MCP 服务器

一个模型上下文协议 (MCP) 服务器,通过基于 WebSocket 的插件系统提供对 MuseScore 的程序化控制。这允许像 Claude 这样的 AI 助手直接创作音乐、添加歌词、导航乐谱并控制 MuseScore。

演示 GIF

先决条件

  • MuseScore 3.x 或 4.x

  • Python 3.8+

  • Claude Desktop 或兼容的 MCP 客户端

Related MCP server: Mureka MCP Server

设置

1. 安装 MuseScore 插件

首先,将 QML 插件代码保存到您的 MuseScore 插件目录中:

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. 在 MuseScore 中启用插件

  1. 打开 MuseScore

  2. 转到 插件 (Plugins) → 插件管理器 (Plugin Manager)

  3. 找到“MuseScore API Server”并勾选复选框以启用它

  4. 点击 确定 (OK)

3. 设置 Python 环境

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. 配置 Claude Desktop

添加到您的 Claude Desktop 配置文件中:

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"
      ]
    }
  }
}

注意:更新路径以匹配您的实际项目位置。

运行系统

操作顺序

  1. 先启动 MuseScore 并打开一个乐谱

  2. 运行 MuseScore 插件:转到 插件 (Plugins) → MuseScore API Server

    • 您应该会看到控制台输出:"Starting MuseScore API Server on port 8765"

  3. 然后启动 Python MCP 服务器 或重启 Claude Desktop

[插入不同功能、和声、旋律编写的截图,作为缩放的 GIF]

开发与测试

对于开发,请使用 MCP 开发工具:

# Install MCP dev tools
pip install mcp

# Test your server
mcp dev server.py

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

查看控制台输出

要查看 MuseScore 插件的控制台输出,请从终端运行 MuseScore:

macOS:

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

Windows:

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

Linux:

musescore4

功能

此 MCP 服务器提供全面的 MuseScore 控制。

🌟 此分支新增:内置自动、完美的复调多声部 & 映射到 LilyPond 的时间布局!

导航与光标控制

  • get_cursor_info() - 获取当前光标位置和选择信息

  • go_to_measure(measure) - 导航到特定小节

  • go_to_beginning_of_score() / go_to_final_measure() - 导航到乐谱开头/结尾

  • next_element() / prev_element() - 逐个元素移动光标

  • next_staff() / prev_staff() - 在五线谱之间移动

  • select_current_measure() - 选择当前整个小节

  • select_custom_range(start_tick, end_tick, start_staff, end_staff) - 用于提取跨小节、多五线谱乐句的切片工具

复调 & LilyPond 集成

  • 时间节奏填充:带有间隙或休止符的声部会自动接收 LilyPond 间隔序列 (s4.) 以准确保持其数学位置。

  • 并发声部渲染:完整的 4 声部 (\voiceOne, \voiceTwo 等) 数组结构正确,并按五线谱分片,以便进行高级代理处理。

音符 & 休止符创建

  • add_note(pitch, duration, advance_cursor_after_action) - 使用 MIDI 音高添加音符

  • add_rest(duration, advance_cursor_after_action) - 添加休止符

  • add_tuplet(duration, ratio, advance_cursor_after_action) - 添加连音符(三连音等)

小节管理

  • insert_measure() - 在当前位置插入小节

  • append_measure(count) - 在乐谱末尾添加小节

  • delete_selection(measure) - 删除当前选择或特定小节

歌词 & 文本

  • add_lyrics_to_current_note(text) - 为当前音符添加歌词

  • add_lyrics(lyrics_list) - 批量为多个音符添加歌词

  • set_title(title) - 设置乐谱标题

乐谱信息

  • get_score() - 获取完整的乐谱分析和结构

  • ping_musescore() - 测试与 MuseScore 的连接

  • connect_to_musescore() - 建立 WebSocket 连接

实用工具

  • undo() - 撤销上一步操作

  • set_time_signature(numerator, denominator) - 更改拍号

  • processSequence(sequence) - 批量执行多个命令

音乐示例

查看 /examples 文件夹以获取展示各种音乐风格的 MuseScore 示例文件:

  • 亚洲器乐 - 传统的亚洲风格器乐曲

  • 弦乐四重奏 - 古典弦乐四重奏编曲

每个示例包括:

  • .mscz - MuseScore 文件(可编辑)

  • .pdf - 乐谱

  • .mp3 - 音频预览

使用示例

创建简单的旋律

# 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")

批量操作

# 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 History Chart

故障排除

连接问题

  • "Not connected to MuseScore":

    • 确保 MuseScore 正在运行并打开了乐谱

    • 运行 MuseScore 插件 (Plugins → MuseScore API Server)

    • 检查 8765 端口是否未被防火墙阻止

插件问题

  • 插件未显示:检查 .qml 文件是否在正确的插件目录中

  • 插件无法启用:放置插件文件后重启 MuseScore

  • 无控制台输出:从终端运行 MuseScore 以查看调试消息

Python 服务器问题

  • "No server object found":服务器对象必须在模块级别命名为 mcp、server 或 app

  • WebSocket 错误:在启动 Python 服务器之前,确保 MuseScore 插件正在运行

  • 连接超时:MuseScore 插件必须处于活动运行状态,而不仅仅是已启用

API 限制

  • 歌词:MuseScore 3.x 插件 API 仅支持第一段歌词

  • 标题设置:由于框架访问限制,使用了多种回退方法

  • 选择持久性:某些操作可能会影响当前选择

文件结构

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 音高参考

常用的 MIDI 音高值参考:

  • 中央 C: 60

  • C 大调音阶: 60, 62, 64, 65, 67, 69, 71, 72

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

时值参考

时值格式: {"numerator": int, "denominator": int}

  • 全音符: {"numerator": 1, "denominator": 1}

  • 二分音符: {"numerator": 1, "denominator": 2}

  • 四分音符: {"numerator": 1, "denominator": 4}

  • 八分音符: {"numerator": 1, "denominator": 8}

  • 附点四分音符: {"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