play_note
Play a single test note (quick sanity check). Not for full DJ segments—use queue_segment for those.
Push Sonic Pi code into a running session over OSC segment by segment, so a generated set hands off with a crossfade instead of restarting.
LABSCO SUMMARY
The tool descriptions steer you toward queue_segment for anything long and warn against ad-hoc snippets, with run_code kept as its compatibility alias and play_note reduced to a sanity check. stop_all is the emergency exit and the descriptions say so — it kills every running job rather than fading out. Nothing reads back what is currently playing, so the session state stays in Sonic Pi.
A bridge to a live Sonic Pi session runner: code goes over OSC to a session that is already playing.
Sonic Pi installed and running, with the v2 DJ session runner listening for OSC — every call is sent into that session rather than rendered on its own.
One command — npx -y sonic-pi-mcp
USE CASES
Queue each segment into the running session so transitions crossfade instead of restarting, and keep the hard stop for when something has gone wrong rather than for musical endings.
One note with a chosen synth, sustain and cutoff tells you the session runner is listening and the audio path works.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
play_notePlay a single test note (quick sanity check). Not for full DJ segments—use queue_segment for those.
queue_segmentPush the next music segment to Sonic Pi. Use with the v2 DJ session runner for crossfaded handoffs. Prefer this over ad-hoc snippets for long sets.
run_codeAlias of queue_segment for compatibility. Sends Sonic Pi code over OSC to the session runner.
stop_allHard stop: stop all running Sonic Pi jobs (like the Stop button). Use sparingly; prefer queue_segment for musical transitions.
BEFORE YOU INSTALL
4 tools when we connected.
npx on PATH
CONTEXT COST
Rated by the size of the 4 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"sonic-pi-mcp": {
"command": "npx",
"args": [
"-y",
"sonic-pi-mcp"
]
}
}
}npx -y sonic-pi-mcp