Sonic Pi MCP Server

MCP server for Sonic Pi: natural-language DJ sessions, OSC, queue runner, tools and prompts

Local serverstdio

What is the Sonic Pi MCP Server?

MCP server for Sonic Pi: natural-language DJ sessions, OSC, queue runner, tools and prompts

The short version

Model Context Protocol (MCP) server for Sonic Pi. Describe music in natural language in your LLM client; the model generates Sonic Pi code and this server sends it over OSC. Use the included queue runner in Sonic Pi for crossfades between segments.

  • queue_segment — — send the next full musical segment (named live_loops, use_bpm, etc.)
  • run_code — — same as queue_segment (compatibility)
  • stop_all — — hard stop via OSC (/stop-all-jobs), like Sonic Pi’s Stop
  • play_note — — quick test note
  • Resource — — DJ session craft, vocabulary, and tool usage (read from the MCP client)
  • Prompt — next_performance_segment — help frame the next block for longer sets

What it needs from you

  • Sonic Pi v4.x - Node.js 18+ (npx / node) - An MCP-capable client (Cursor, Claude Desktop, VS Code with MCP, etc.) Optional: Bun for local development (bun run dev).

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Sonic Pi MCP Server

{
  "mcpServers": {
    "sonic_pi_mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sonic-pi-mcp"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Sonic Pi v4.x - Node.js 18+ (npx / node) - An MCP-capable client (Cursor, Claude Desktop, VS Code with MCP, etc.) Optional: Bun for local development (bun run dev).

Example prompts to try

  • “Use Sonic Pi MCP to Resource.”
  • “Use Sonic Pi MCP to Env.”
  • “Use Sonic Pi MCP to Variable.”

Frequently asked questions

MCP server for Sonic Pi: natural-language DJ sessions, OSC, queue runner, tools and prompts Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.