MuseScoreBLOCK
A Model Context Protocol (MCP) server that provides programmatic control over MuseScore!
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A Model Context Protocol (MCP) server that provides programmatic control over MuseScore, via a WebSocket-based plugin system. This allows AI assistants like Claude to compose music, add lyrics, navigate scores, and control MuseScore directly.
Prerequisites
- MuseScore 3.x or 4.x
- Python 3.8+
- Claude Desktop or compatible MCP client
Setup
1. Install the MuseScore Plugin
First, save the QML plugin code to your MuseScore plugins directory:
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. Enable the Plugin in MuseScore
- Open MuseScore
- Go to Plugins → Plugin Manager
- Find "MuseScore API Server" and check the box to enable it
- Click OK
3. Setup Python Environment
git clone cd mcp-agents-demo python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txt
4. Configure Claude Desktop
Add to your Claude Desktop configuration file:
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"
]
}
}
}Note: Update the paths to match your actual project location.
Running the System
Order of Operations
- Start MuseScore first with a score open
- Run the MuseScore plugin: Go to Plugins → MuseScore API Server
- You should see console output:
"Starting MuseScore API Server on port 8765" - Then start the Python MCP server or restart Claude Desktop
[insert screenshot of different functionality, harmonisation, melodywriting, as
cf2b0fe6b17bOBSERVED · 2026-10-07Exposed tools (26)
12 read · 13 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
add_instrument | write | Add a new staff/instrument to the score. |
add_lyrics | write | Add lyrics to consecutive notes starting from the current cursor position. |
add_note | write | Add a note at the current cursor position with the specified pitch and duration. |
add_rest | write | Add a rest at the current cursor position. |
add_tuplet | write | Add a tuplet at the current cursor position. |
append_measure | read | Append measures to the end of the score. |
connect_to_musescore | read | Connect to the MuseScore WebSocket API. |
delete_selection | destructive | Delete the current selection or specified measure. |
get_cursor_info | read | Get information about the current cursor position. |
get_score | read | Get information about the current score. |
go_to_beginning_of_score | read | Navigate to the beginning of the score. |
go_to_final_measure | read | Navigate to the final measure of the score. |
go_to_measure | read | Navigate to a specific measure. |
insert_measure | write | Insert a measure at the current position. |
next_element | write | Move cursor to the next element. |
next_staff | write | Move cursor to the next staff. |
ping_musescore | read | Ping the MuseScore WebSocket API to check connection. |
prev_element | write | Move cursor to the previous element. |
prev_staff | write | Move cursor to the previous staff. |
processSequence | read | Process a sequence of commands. |
select_current_measure | read | Select the current measure. |
select_custom_range | read | |
set_instrument_sound | write | Change the sound of an instrument on a staff. |
set_staff_mute | write | Mute or unmute a staff. |
set_time_signature | write | Set the time signature. |
undo | read | Undo the last action. |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (5 observation(s))
- Shell
- declared (1 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (6)
new Function(code);
delete_selection
Asian Instrumental.mscz
String Quartet.mscz
mcp, websockets
assets/mcp-muse.gif
Gates applied: no_behavioural_pass.
cf2b0fe6b17bfull audit observations/trust-audit/mcp-server/ghchen99__musescore.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | cf2b0fe6b17b | BLOCK | D | 69 | first audit |
Questions
What is the MuseScore MCP server?
A Model Context Protocol (MCP) server that provides programmatic control over MuseScore!
What tools does MuseScore expose?
26 in total: 12 read-only, 13 that write, and 1 that can delete or overwrite (delete_selection). Every one is listed on this page with its risk.
Is MuseScore safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does MuseScore need?
No credential environment variables were found in its source, so it appears to need none.
How current is this page?
The grade is for one exact copy of the source (cf2b0fe6b17b), read on 2026-10-07. The repository is watched and re-audited when it changes.