sonic-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SONIC_PI_PATTERNS_DIR | No | Directory for patterns, defaults to ~/patterns if not set. | ~/patterns |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| run_codeC | Run Sonic Pi code. Sonic Pi must be running (GUI or headless). |
| run_in_bufferA | Save and run code in a specific Sonic Pi buffer slot (0-9). Mirrors the GUI buffer tabs. Useful for organizing live_loops across multiple slots. Args: buffer_id: Buffer index 0-9 code: The Sonic Pi Ruby code to run |
| stop_allA | Stop all currently playing sounds, including buffers started from the GUI. |
| pingA | Check whether Sonic Pi is running and which port it is on. Reads the boot log and checks that the Spider server port is open. Does not send any OSC message -- safe to call at any time. |
| get_logA | Read the tail of Sonic Pi's server errors log. Captures runtime errors and warnings from eval'd code. Call this after run_code to check for errors. |
| set_master_volumeA | Set the master output volume. Args: amp: Amplitude multiplier. 1.0 is unity gain, 0.0 is silence, up to 5.0 (may clip). |
| mixer_hpf_enableA | Enable a high-pass filter on the master output. Args: freq: Cutoff frequency in Hz (e.g. 80.0 removes low rumble). |
| mixer_hpf_disableA | Disable the master high-pass filter. |
| mixer_lpf_enableA | Enable a low-pass filter on the master output. Args: freq: Cutoff frequency in Hz (e.g. 8000.0 softens the high end). |
| mixer_lpf_disableA | Disable the master low-pass filter. |
| mixer_stereo_modeA | Switch master output to stereo mode (default). |
| mixer_mono_modeA | Switch master output to mono mode (sums left and right channels). |
| send_cueA | Send an OSC cue to trigger a sync point in running Sonic Pi code. Use to trigger live_loops or one_shot blocks waiting on sync. Path must start with /. Example: /trigger/drop Args: path: OSC address, e.g. "/trigger/drop" or "/scene/chorus" value: Optional value passed as the cue argument. Integers and floats are sent as their native OSC types; anything else as a string. |
| save_patternA | Save a reusable Sonic Pi snippet to the pattern library. For full songs, use save_song instead. Args: name: File name without extension (e.g. "boom_bap_basic") category: Subfolder (e.g. "drums", "melodic", "bass") code: The Sonic Pi Ruby code to save |
| list_patternsA | List saved patterns in the pattern library. Args: category: Optional subfolder to filter by (e.g. "drums"). Leave empty to list all. |
| load_patternA | Load a saved pattern from the library, returning its code. Args: path: Relative path from the patterns root (e.g. "drums/boom_bap_basic.rb") |
| save_songA | Save a full song to the songs library with auto-incrementing version number. Creates songs/{name}/v{N}.rb where N is one higher than the current latest version. Args: name: Song folder name in snake_case (e.g. "dark_pop_em", "aurora_borealis") code: The Sonic Pi Ruby code to save |
| list_songsA | List songs in the songs library. Args: name: Optional song name to list versions of (e.g. "dark_pop_em"). Leave empty to list all songs and versions. |
| load_songA | Load a song from the songs library. Args: name: Song folder name (e.g. "dark_pop_em") version: Version number to load (e.g. 3 loads v3.rb). Use 0 (default) to load the latest version. |
| record_startA | Start recording Sonic Pi's audio output via PipeWire. Returns the output path -- pass it to record_stop when done. Requires pw-record and pw-link (pipewire-utils package). |
| record_stopA | Stop the PipeWire recording and save to disk. Args: output_path: The path returned by record_start. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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