SuperCollider Headless MCP Server
Click on "Deploy 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., "@SuperCollider Headless MCP Server render a 30-second ambient pad track and export it as a WAV"
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.
SuperCollider Headless MCP Server
β οΈ Active Development β This project is under active development. APIs may change between versions. Use in production at your own risk.
An Model Context Protocol (MCP) server that gives any MCP-compatible LLM unrestricted access to SuperCollider audio synthesis (scsynth) and algorithmic composition (sclang) β zero manual installation required.
π One-Command Installation
npx -y supercollider-headless-mcpThat's it. The server automatically:
Downloads the latest official SuperCollider release for your platform (Windows/macOS/Linux)
Extracts it to
~/.supercollider-mcp/runtime/(no admin rights needed)Prunes IDE/GUI bloat, keeping only
sclang,scsynth,SCClassLibrary,plugins, and runtime librariesBoots
scsynthin headless mode with a versatile starter SynthDef libraryExposes 6 MCP tools + 2 reusable prompts for audio synthesis and algorithmic composition
Related MCP server: SuperCollider MCP Server
π¦ Supported MCP Clients
Client | Configuration |
Claude Code |
|
VS Code (Copilot) | Add to |
Cursor | Settings β MCP β Add server |
Cline | Settings β MCP Servers β Add |
Windsurf | Settings β MCP β Add server |
VS Code / Copilot Configuration (.vscode/mcp.json)
{
"servers": {
"supercollider": {
"command": "npx",
"args": ["-y", "supercollider-headless-mcp"],
"env": {}
}
}
}Cursor Configuration (.cursor/mcp.json)
{
"mcpServers": {
"supercollider": {
"command": "npx",
"args": ["-y", "supercollider-headless-mcp"]
}
}
}Cline Configuration (.cline/mcp_settings.json)
{
"mcpServers": {
"supercollider": {
"command": "npx",
"args": ["-y", "supercollider-headless-mcp"]
}
}
}π Available Tools
1. setup_engine
Provision SuperCollider runtime, boot scsynth, load SynthDef library.
await mcp.callTool("setup_engine", {
forceReprovision: false, // Force re-download
sampleRate: 48000, // Sample rate
blockSize: 64, // Block size
device: "default" // Audio device (optional)
});Returns: Runtime paths, version, sample rate, audio device, block size, loaded SynthDefs.
2. play_code
Evaluate arbitrary sclang code β SynthDefs, Pdefs, Tdefs, Ndefs, patterns, buffers, microtonal scales.
await mcp.callTool("play_code", {
code: `
s.sync;
Pdef(\\ambient, Pbind(
\\instrument, \\warmStrings,
\\degree, Pseq([0, 2, 4, 5, 7, 9, 11, 12], inf),
\\dur, 0.5,
\\amp, 0.3
)).play;
`,
timeout: 60000
});Returns: Console output, errors, return value. Automatically wraps code with s.sync before/after for safe SynthDef compilation.
3. stop_all
Immediately silence all sound (CmdPeriod.run) while keeping scsynth booted.
await mcp.callTool("stop_all", {});4. list_and_set_audio_device
List available output devices (ServerOptions.outDevices). Optionally switch device and reboot scsynth.
// List devices
await mcp.callTool("list_and_set_audio_device", {});
// Switch device
await mcp.callTool("list_and_set_audio_device", { setDevice: "Headphones" });5. export_wav
Render a self-contained pattern/score to a 24-bit .wav file using Non-Real-Time mode (Score.recordNRT).
await mcp.callTool("export_wav", {
code: `
Pdef(\\render, Pbind(
\\instrument, \\warmStrings,
\\degree, Pseq([0, 2, 4, 5, 7, 9, 11, 12], 2),
\\dur, 0.5,
\\amp, 0.4
)).play;
`,
outputPath: "./output/ambient-track.wav",
duration: 30,
sampleRate: 48000
});6. get_status
Get server boot state, CPU load, active synths, loaded SynthDefs, audio device info.
await mcp.callTool("get_status", {});π΅ Built-in SynthDef Library
SynthDef | Description | Key Parameters |
| Rich analog-style pads | freq, amp, gate, attack, decay, sustain, release, cutoff, res, pan |
| Expressive flute with vibrato/breath | freq, amp, gate, vibratoRate, vibratoDepth, breathiness, pan |
| Deep sub-bass with drive | freq, amp, gate, attack, decay, sustain, release, drive, pan |
| Karplus-Strong plucked strings | freq, amp, gate, attack, decay, coef, pan |
| Punchy kick drum | freq, amp, gate, attack, decay, pitchDecay, drive, pan |
| Snare with tone/noise mix | freq, amp, gate, attack, decay, tone, noiseMix, pan |
| Closed/open hi-hat | freq, amp, gate, attack, decay, open, pan |
| Master safety limiter (always active) | threshold, dur |
π§ Reusable Prompts
compose_track
Generate complete multi-track compositions.
await mcp.getPrompt("compose_track", {
style: "ambient", // ambient, techno, experimental, etc.
duration: "120", // seconds
bpm: "90", // tempo
key: "C major", // musical key
instruments: "warmStrings, soloFlute, subBass, pluckSynth"
});design_synth
Design custom SynthDefs with best practices.
await mcp.getPrompt("design_synth", {
type: "pad", // pad, lead, bass, drum, texture, etc.
features: "subtractive, filter modulation",
controls: "freq, amp, gate, cutoff, res, attack, decay, sustain, release",
polyphony: "8"
});π‘ Example Prompts for LLMs
Simple Ambient Pad
"Create a slow-evolving ambient pad using the warmStrings synth, with notes from a C major scale, 8-second attack/release, and subtle filter modulation."
Generative Drum Pattern
"Make a generative drum pattern using kick, snare, and hihat with Pbrown for kick placement, Pseq for snare on 2 and 4, and Pwhite for hi-hat density. 120 BPM."
Microtonal Composition
"Compose a piece using 19-EDO tuning (19 equal divisions of the octave) with the soloFlute synth. Use Scale.new to define the tuning."
NRT Render to WAV
"Render a 60-second ambient track to output.wav at 48kHz/24-bit using Score.recordNRT. Use Pdef patterns with warmStrings and subBass."
Custom SynthDef Design
"Design a FM synthesis bass SynthDef with 2 operators, configurable ratio, index, and ADSR envelope. Include example Pbind usage."
π§ Advanced Usage
Environment Variables
Variable | Description |
| Override auto-detected sclang path |
Runtime Location
Managed runtime: ~/.supercollider-mcp/runtime/supercollider-{platform}-{arch}/
Manual Provisioning
# Force re-download latest SuperCollider
npx -y supercollider-headless-mcp --force-reprovisionπ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Client (LLM) β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β JSON-RPC over stdio
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β supercollider-headless-mcp Server β
β βββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββ β
β β Provisioner β β SC Session β β MCP Tools/Prompts β β
β β (download, ββββ (sclang + ββββ (setup, play, β β
β β extract, β β scsynth, β β stop, device, β β
β β prune) β β SynthDefs) β β export, status) β β
β βββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββ β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β spawn
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SuperCollider Runtime β
β ββββββββββββ ββββββββββββ ββββββββββββββββββββββββββββ β
β β sclang ββββ scsynth β β SCClassLibrary + plugins β β
β β (lang) β β (audio) β β (pruned, headless) β β
β ββββββββββββ ββββββββββββ ββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββπ Requirements
Node.js β₯ 18
No SuperCollider installation needed (auto-provisioned)
π Troubleshooting
"sclang not found" / Provisioning fails
# Set custom path if auto-detection fails
export SUPERCOLLIDER_PATH="/path/to/sclang"
npx -y supercollider-headless-mcpAudio device issues
// List devices first
await mcp.callTool("list_and_set_audio_device", {});
// Then set specific device
await mcp.callTool("list_and_set_audio_device", { setDevice: "Your Device Name" });Permission errors (Windows)
Run terminal as Administrator for first run, or ensure ~/.supercollider-mcp is writable.
macOS Gatekeeper
If extraction fails: xattr -d com.apple.quarantine ~/.supercollider-mcp/runtime/...
π License
MIT License β see LICENSE for details.
π Acknowledgments
SuperCollider β The amazing audio synthesis engine
Model Context Protocol β For the open protocol
@modelcontextprotocol/sdk β TypeScript SDK
π Links
Available Tools
6 toolsexport_wavA
Render a self-contained SuperCollider pattern/score to a 24-bit WAV file using Non-Real-Time (Score.recordNRT) mode.
Inputs: code (required), outputPath (required), duration, sampleRate.
get_statusA
Get server status: boot state, CPU load, active synths, loaded SynthDefs, audio device info.
Inputs: no named parameters.
list_and_set_audio_deviceA
List available audio output devices (ServerOptions.outDevices). Optionally switch device and reboot scsynth.
Inputs: setDevice.
play_codeA
Evaluate arbitrary sclang code (SynthDef, Pdef, Tdef, Ndef, patterns, buffers, microtonal scales, etc.) and return console output/errors. Automatically syncs before/after for safe SynthDef compilation.
Inputs: code (required), timeout.
setup_engineA
Provision headless SuperCollider runtime (downloads if missing), boot scsynth, and load SynthDef library. Returns sample rate, audio device info, and version.
Inputs: device, blockSize, sampleRate, forceReprovision.
stop_allA
Immediately silence all sound (CmdPeriod.run) while keeping scsynth booted and session alive.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 6 tools
Each tool has a distinct primary purpose: setup, code evaluation, global stop, device management, NRT export, and status reporting. Minor overlap existsβsetup_engine loads SynthDefs which play_code can also do, and get_status reports audio device info that list_and_set_audio_device also exposesβbut descriptions clarify the boundaries.
All tools use snake_case with a verb-first pattern (setup_engine, play_code, stop_all, export_wav, get_status), which is predictable. list_and_set_audio_device is a longer compound verb but still follows the convention; stop_all lacks an explicit object but remains readable.
Six tools cover the core lifecycle of a headless SuperCollider runtime without redundancy. The set is tightly scoped and each tool earns its place.
The surface covers setup, arbitrary code execution, global silence, device switching, WAV export, and statusβsufficient for most workflows. Minor gaps remain, such as no explicit engine shutdown/quit or per-node stop, though play_code can work around these via sclang.
Related MCP Connectors
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
MCP server for Producer/Riffusion AI music generation
Remote MCP server for audio stem separation, denoise, reverb, and MIDI export.
ScoreStarling is an all-in-one AI sheet music assistant. Ask for anything to do with sheet music: transcribe a song from audio, video or a link, read a PDF or photo, add chords, change the key, make it easier, turn it into guitar TAB or jianpu, or arrange it for another instrument. Every change lands on a real score you can hear, fix and download (PDF, MIDI, MusicXML, guitar TAB, jianpu, audio). Hosted remote server with OAuth sign-in. Free accounts get monthly credits and free previews; prices are at scorestarling.com/pricing. Setup: https://scorestarling.com/mcp
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnables AI assistants to generate and control real-time audio synthesis through natural language descriptions using SuperCollider. Features 10 built-in synth types, pattern sequencing, audio recording, and server lifecycle management for creating sounds from simple English descriptions.112MIT
- AlicenseBqualityNot gradedmaintenanceEnables execution of SuperCollider synth code through the Model Context Protocol using supercolliderjs, allowing AI assistants to generate and run audio synthesis programs.28 npm-
- AlicenseBqualityBmaintenanceEnables AI assistants to control SuperCollider audio synthesis via OSC, supporting melody, rhythm, and soundscape generation through MCP tools.1330MIT
- AlicenseNot gradedqualityCmaintenanceConnects Claude Code to SuperCollider for AI-driven music composition, supporting real-time playback and non-realtime audio rendering at 50-150x realtime speed.MIT