sonic-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sonic-mcpplay a four-on-the-floor beat with a synth lead"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sonic-mcp
MCP server that connects Claude Code to Sonic Pi for AI-assisted beat making.
Requirements
Setup
1. Add to Claude Code
Add this to ~/.claude/mcp.json for global use, or a project's .mcp.json to keep it scoped:
{
"mcpServers": {
"sonic-pi": {
"command": "uvx",
"args": ["--from", "git+https://github.com/AJBogo9/sonic-mcp.git", "sonic-mcp"],
"env": {
"SONIC_PI_PATTERNS_DIR": "/home/yourname/patterns"
}
}
}
}SONIC_PI_PATTERNS_DIR defaults to ~/patterns if not set.
2. Start the Sonic Pi listener
Paste this into a Sonic Pi buffer and hit Run before using any MCP tools. It listens for incoming code over OSC and evaluates it live:
live_loop :mcp_runner do
use_real_time
code = sync "/osc*/run-code"
begin
eval(code[0].to_s)
rescue Exception => e
puts "Error: #{e.message}"
end
endThat's it. You can now ask Claude to write and play Sonic Pi code directly.
Tools
Tool | Description |
| Send Sonic Pi code to execute |
| Stop all playing sounds |
| Read Sonic Pi's output log so Claude can see errors and self-correct |
| Save a pattern to the library |
| List patterns in the library |
| Load a pattern as a starting point for iteration |
| Start Sonic Pi's built-in recording |
| Stop recording and save to disk |
How it works
Claude Code calls tools over the MCP protocol. The server translates each tool call into an OSC message sent to Sonic Pi on localhost:4560. The get_log tool reads ~/.sonic-pi/log/server-output.log so Claude can catch errors and fix them without you needing to copy-paste them.
Local development
git clone https://github.com/yourusername/sonic-mcp.git
cd sonic-mcp
pip install -e .License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AJBogo9/sonic-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server