{"id":26793377,"url":"https://github.com/abhishekjairath/sonic-pi-mcp","last_synced_at":"2026-08-27T15:45:37.806Z","repository":{"id":283940381,"uuid":"953362120","full_name":"abhishekjairath/sonic-pi-mcp","owner":"abhishekjairath","description":"Model Context Protocol (MCP) server for controlling Sonic Pi through AI assistants","archived":false,"fork":false,"pushed_at":"2026-03-22T13:49:25.000Z","size":124,"stargazers_count":15,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-08-09T09:15:35.174Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhishekjairath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-23T07:15:25.000Z","updated_at":"2026-07-29T20:23:31.000Z","dependencies_parsed_at":"2025-03-23T07:29:05.623Z","dependency_job_id":"808ec09b-6eed-437e-84e2-6e5ad91e2b68","html_url":"https://github.com/abhishekjairath/sonic-pi-mcp","commit_stats":null,"previous_names":["abhishekjairath/sonic-pi-mcp"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/abhishekjairath/sonic-pi-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekjairath%2Fsonic-pi-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekjairath%2Fsonic-pi-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekjairath%2Fsonic-pi-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekjairath%2Fsonic-pi-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhishekjairath","download_url":"https://codeload.github.com/abhishekjairath/sonic-pi-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekjairath%2Fsonic-pi-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36944061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-22T15:14:58.755Z","status":"online","status_checked_at":"2026-08-27T02:00:07.166Z","response_time":96,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-29T16:30:20.921Z","updated_at":"2026-08-27T15:45:37.794Z","avatar_url":"https://github.com/abhishekjairath.png","language":"TypeScript","funding_links":[],"categories":["MCP Servers for Creative Work","Art \u0026 Culture","Real-Time Collaboration","🌐 Web Development","Smart Home \u0026 IoT Mcp Servers","TypeScript"],"sub_categories":["Music \u0026 Live Coding","How to Submit"],"readme":"# Sonic Pi MCP\n\nModel Context Protocol (MCP) server for **[Sonic Pi](https://sonic-pi.net/)**. 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.\n\n## Features\n\n- **`queue_segment`** — send the next full musical segment (named `live_loop`s, `use_bpm`, etc.).\n- **`run_code`** — same as `queue_segment` (compatibility).\n- **`stop_all`** — hard stop via OSC (`/stop-all-jobs`), like Sonic Pi’s Stop.\n- **`play_note`** — quick test note.\n- **Resource** — DJ session craft, vocabulary, and tool usage (read from the MCP client).\n- **Prompt** `next_performance_segment` — help frame the next block for longer sets.\n- **Env** — `OSC_HOST`, `OSC_PORT`, `OSC_CODE_PATH`, `OSC_STOP_ALL_PATH`.\n\n## Prerequisites\n\n- [Sonic Pi](https://sonic-pi.net/) v4.x  \n- [Node.js](https://nodejs.org/) 18+ (`npx` / `node`)  \n- An MCP-capable client (Cursor, Claude Desktop, VS Code with MCP, etc.)\n\nOptional: [Bun](https://bun.sh) for local development (`bun run dev`).\n\n## One-time Sonic Pi setup (queue runner)\n\n1. Open Sonic Pi.  \n2. Copy **[sonic-pi-queue.rb](sonic-pi-queue.rb)** into a buffer.  \n3. Press **Run** and leave it running.\n\nThe buffer listens on the default OSC port and crossfades between segments sent by the MCP.\n\n## Install the MCP server\n\n```bash\nnpx -y sonic-pi-mcp\n```\n\nPoint your client at this command over **stdio** (see below).\n\n### Cursor\n\nUse **`~/.cursor/mcp.json`** and/or **`.cursor/mcp.json`** in a project:\n\n```json\n{\n  \"mcpServers\": {\n    \"sonic_pi_mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"sonic-pi-mcp\"]\n    }\n  }\n}\n```\n\n**Local clone** (after `npm install` or `bun install` and `bun run build`):\n\n```json\n{\n  \"mcpServers\": {\n    \"sonic_pi_mcp\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/sonic-pi-mcp/bin/cli.mjs\"]\n    }\n  }\n}\n```\n\n**Bun without building** — some clients ignore `cwd`; use an **absolute** path to `src/server.ts`, or use the launcher:\n\n```json\n{\n  \"mcpServers\": {\n    \"sonic_pi_mcp\": {\n      \"command\": \"/absolute/path/to/sonic-pi-mcp/bin/mcp-dev.sh\",\n      \"args\": []\n    }\n  }\n}\n```\n\nRun `chmod +x bin/mcp-dev.sh` once. The script changes into the repo and runs `bun run src/server.ts`.\n\n### Claude Desktop\n\n`~/Library/Application Support/Claude/claude_desktop_config.json` (paths differ on Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"sonic_pi_mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"sonic-pi-mcp\"]\n    }\n  }\n}\n```\n\nFor a **local clone**, prefer **`bin/mcp-dev.sh`** (see above) if you see `Module not found \"src/server.ts\"` or **`spawn bunx ENOENT`**. Remove and re-add the MCP in the app if an old definition is cached.\n\n### VS Code\n\nConfigure your MCP extension to run `npx` with `-y` and `sonic-pi-mcp`, **stdio** transport, per the extension’s docs.\n\n## Environment variables\n\n| Variable | Default | Meaning |\n| -------- | ------- | ------- |\n| `OSC_HOST` | `127.0.0.1` | Sonic Pi host |\n| `OSC_PORT` | `4560` | Sonic Pi OSC port |\n| `OSC_CODE_PATH` | `/run-code` | OSC path for code (must match your Sonic Pi buffer) |\n| `OSC_STOP_ALL_PATH` | `/stop-all-jobs` | Hard stop path |\n\nAllow **incoming OSC** in Sonic Pi if you connect from another machine; set `OSC_HOST` accordingly.\n\n## Development\n\n```bash\ngit clone https://github.com/abhishekjairath/sonic-pi-mcp.git\ncd sonic-pi-mcp\nbun install   # or npm install\nbun run build\nbun run dev\n```\n\nOSC smoke test (Sonic Pi + runner running):\n\n```bash\nbun run test\n```\n\n### MCP Inspector\n\n```bash\nnpx @modelcontextprotocol/inspector\n```\n\nUse `node` with argument `bin/cli.mjs` and this directory as the working directory (after `bun run build`).\n\n## Troubleshooting\n\n- **No sound** — Sonic Pi open? Queue buffer running? Port **4560** reachable?  \n- **Nothing happens** — OSC enabled in Sonic Pi; `OSC_HOST` / `OSC_PORT` match.  \n- **Layers pile up** — Use **`queue_segment`** with **named** `live_loop`s; use **`stop_all`** only for a full reset.  \n- **`Module not found \"src/server.ts\"` (Claude)** — Use **`bin/mcp-dev.sh`** as `command` with empty `args`, or absolute paths; don’t rely on `cwd` alone.  \n- **`resources/list` / `prompts/list` → Method not found** — You’re on an older build that only exposed tools. Reinstall/restart the MCP from this repo or npm so resources and prompts are registered.  \n- **Ruby errors in Sonic Pi log** — The generated code failed to parse or run; fix the snippet (brackets, samples, syntax) and send again. The queue runner prints a code snippet on failure.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhishekjairath%2Fsonic-pi-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhishekjairath%2Fsonic-pi-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhishekjairath%2Fsonic-pi-mcp/lists"}