Play Sheet Music MCP Server
Demonstration MCP App that converts ABC notation into rendered sheet music with interactive audio playback, using the abcjs library.
Play Sheet Music is one of the official example servers in the modelcontextprotocol/ext-apps repository, which provides reference implementations of the MCP Apps specification. MCP Apps extend traditional text-based tool results with interactive, sandboxed UI resources that render inline inside compliant chat clients such as Claude or ChatGPT. This particular server demonstrates how to surface a graphical, audio-capable music experience from a single MCP tool call.
The server exposes a single tool, play-sheet-music, which accepts a string of ABC notation. On the server side, the notation is validated and returned to the host. On the client side, an embedded abcjs-powered viewer renders the notation as formatted sheet music and provides an audio player with play, pause, and loop controls. The agent can therefore compose music in ABC notation and have the user immediately see and hear the result without leaving the chat interface.
Because it is part of the official MCP Apps examples, this server is primarily intended as a learning sample for developers building their own interactive MCP Apps, but it is also directly usable in any MCP host that supports the MCP Apps UI extension. It requires no API keys or external services.
Tools
| Tool | Description |
|---|---|
play-sheet-music |
Renders an ABC notation string as formatted sheet music in the MCP host UI and provides an interactive audio player with play, pause, and loop controls. The server validates the ABC notation; the client component handles visualization and playback via abcjs. |
Prerequisites
- Node.js and npm installed
- An MCP client that supports the MCP Apps UI extension (e.g. the
basic-hostexample included inext-apps, or a compatible chat client)
Option 1: Run via npx (stdio transport)
Add the following to your MCP client configuration:
{
"mcpServers": {
"sheet-music": {
"command": "npx",
"args": [
"-y",
"--silent",
"--registry=https://registry.npmjs.org/",
"@modelcontextprotocol/server-sheet-music",
"--stdio"
]
}
}
}
Option 2: Local development
Clone the repository and build locally:
git clone https://github.com/modelcontextprotocol/ext-apps.git
cd ext-apps/examples/sheet-music-server
npm install
npm run start:stdio # stdio transport
# or
npm run start:http # HTTP transport
Local-development MCP client config:
{
"mcpServers": {
"sheet-music": {
"command": "bash",
"args": [
"-c",
"cd ~/code/ext-apps/examples/sheet-music-server && npm run build >&2 && node dist/index.js --stdio"
]
}
}
}
Using the tool
Call play-sheet-music with an ABC notation string:
{
"abcNotation": "X:1\nT:Twinkle Twinkle\nM:4/4\nL:1/4\nK:C\nC C G G | A A G2 | F F E E | D D C2 |"
}
The host will render the score and expose play, pause, and loop controls.
- Generate a short melody in ABC notation from a natural-language description and have the agent render and play it back inline in the chat.
- Teach music theory interactively: ask an agent to produce examples of scales, intervals, or chord progressions and listen to each one.
- Prototype simple compositions or motifs and iterate on them with the agent, hearing changes immediately.
- Demonstrate MCP Apps capabilities (inline UI plus audio) when evaluating or building MCP host clients.
- Convert text descriptions of folk or classical tunes into playable, printable sheet music.
- "Write a 4-bar melody in C major in ABC notation and play it for me."
- "Show me the C major scale as sheet music and play it."
- "Compose a simple waltz in 3/4 time and render the score so I can hear it."
- "Transcribe Twinkle Twinkle Little Star to ABC notation and play it on loop."
- "Generate a short two-voice canon and render it as sheet music with playback."
- Official example maintained in the
modelcontextprotocol/ext-appsrepository. - Renders real, interactive sheet music with audio playback inline in the MCP host, not just text output.
- No API keys, accounts, or paid services required.
- Small, focused codebase that doubles as a reference implementation for building custom MCP Apps.
- Single-tool server: only does ABC-notation rendering and playback, with no library, search, or export features.
- Requires an MCP host that supports the MCP Apps UI extension; plain text-only clients cannot display the sheet music or play audio.
- Positioned as a demonstration example rather than a production-hardened product, so behavior may change as the MCP Apps spec evolves.
- linxule/mcp-music-studio: a richer ABC notation plus Strudel live-coding music studio MCP server with style presets and multiple instruments.
- Other example apps in modelcontextprotocol/ext-apps such as the Three.js or Map servers if you want to explore interactive MCP Apps beyond music.