🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@chrischall/musescore-mcp

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chrischall/musescore-mcp

MuseScore MCP server for Claude — search sheet music and read score metadata via your signed-in browser

latest
Source
npmnpm
Version
0.15.4
Version published
Maintainers
1
Created
Source

musescore-mcp

CI npm license

MCP server for MuseScore — search sheet music and read score metadata from Claude. MuseScore has no public API and sits behind Cloudflare, so every request rides your signed-in musescore.com browser tab via the fetchproxy extension — Cloudflare sees a real browser session, not a Node process.

Private, personal-use server (not published to any registry). Developed and maintained by AI (Claude). Use at your own discretion.

Tools

ToolWhat it does
musescore_searchSearch scores. Defaults to the "Free to view, play & download" facet (free_only=true). Returns id, title, uploader, composer, instrumentation, difficulty, page/part counts, view/save/download counts, and downloadability flags.
musescore_get_scoreOne score's metadata — title, license, measures, key, parts, duration, upload/update dates — by URL or user_id + score_id.
musescore_downloadResolve the official download URL (pdf/mid/mscz/mxl) for a free or entitled score, from the store's type_download_list. Read-only: returns the link to open in your browser (the MCP can't stream the file — see Downloads).
musescore_score_to_pdfCreate a PDF for a score at output_path. Downloads the official PDF bytes when MuseScore exposes one; otherwise fetches the page SVG and stitches it into a PDF (pure JS — no system deps).
musescore_healthcheckRound-trip a public MuseScore URL through the fetchproxy bridge and report which hop failed.
musescore_register_session / _set_active_session / _get_session_contextSession registry bookkeeping.
musescore_svg_to_pdfConvert local .svg / .svgz files that already exist on disk into a PDF, one file per page. Pure JS (pdfkit + svg-to-pdfkit) — no system dependencies.

How it works

The server-rendered HTML has no result cards — MuseScore hydrates them client-side from an entity-encoded JSON store embedded in the page (its analogue of Next.js __NEXT_DATA__). The parsers recover that JSON and read the score objects directly. See docs/MUSESCORE-API.md.

Downloads

Download links live in the store's type_download_list ({type, url} for pdf / mid / mscz / mxl / mp3 …). Free scores (is_free) download fine — and they almost all report hasAccess: false, which is an entitlement flag (purchased / PRO), not the free-download signal. So the gate is is_free === true or hasAccess === true; paid scores you haven't bought are refused.

musescore_download is a resolver, not a fetcher: the download endpoint is Cloudflare-walled and 302-redirects cross-origin to presigned S3, which only a browser navigation can follow — neither a server-side fetch nor the fetchproxy bridge can. So the tool returns the official download_url (gated to free/entitled scores) for you to open in your signed-in browser; it never streams or writes the file, and never scrapes the page tiles. Full verified mechanism: docs/MUSESCORE-API.md.

Use musescore_score_to_pdf when you want the best available PDF path for a score. If MuseScore exposes a full pdf entry, the tool downloads the official PDF bytes to output_path (the same capture-redirect → presigned-S3 byte path musescore_download uses). If no full pdf format is present, it falls back to fetching the page SVG (/static/musescore/scoredata/g/<hash>/score_<n>.svg) and stitching it into output_path with pdfkit + svg-to-pdfkit (pure JS, no external binary). The hash is extracted from the h= parameter of a pdf or pdf-sample download URL.

Setup

  • Install the fetchproxy extension and open musescore.com signed in, with the Cloudflare check cleared.

  • Point your MCP host at the built bundle:

    {
      "mcpServers": {
        "musescore": {
          "command": "node",
          "args": ["/absolute/path/to/musescore-mcp/dist/bundle.js"]
        }
      }
    }
    

Development

npm install
npm run build      # tsc --noEmit + esbuild → dist/bundle.js
npm test           # vitest, mocked client, no network

No env vars required. Optional: MUSESCORE_WS_PORT (default 37149), MUSESCORE_DEBUG=1.

SVG→PDF conversion is pure JavaScript (pdfkit + svg-to-pdfkit) — no system binary or native dependency to install.

License

MIT

Keywords

mcp

FAQs

Package last updated on 06 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts