MCP Server for playing Sonic Pi from Claude Code or Cursor

I made an MCP server to play music on Sonic Pi from Claude Code and Cursor!

Here’s a music video/demo: https://x.com/itisyev/status/1960111501764948170

Here’s a link to the Github repo: GitHub - yevbar/live-prompting: MCP Server for playing music via Sonic Pi OSC commands

Whilst this is fun and I’m definitely in favour of people extending and playing around with Sonic Pi - it’s really important to clearly communicate the risks with this approach.

If you give any agent MCP access to Sonic Pi to evaluate code - you are giving the agent full access to your entire machine.

This is probably not what you want to be doing.

This is because Sonic Pi uses Ruby under the hood and Ruby has full access to your machine - it can spawn programs, read your emails, send messages to other computers, start web servers, etc. etc.

This is why you should always read any Sonic Pi code carefully and check to see if there’s anything unexpected in the code - before you evaluate it. Don’t run untrusted code in Sonic Pi! Whilst AI agents are definitely interesting, they also fit right into my untrusted category.

This is also one of the core reasons I’m working on Tau5 - to build a safe and trusted execution environment for music code - which means you’ll be able to download and run anyone else’s code without worry - including code from AI Agents should you wish: https://tau5.live

1 Like