supercollider-mcp
Connects Claude Code to SuperCollider for AI-driven music composition, supporting real-time playback and non-realtime audio rendering at 50-150x realtime speed.
README
supercollider-mcp
An MCP server that connects Claude Code to SuperCollider, enabling AI-driven music composition with both real-time playback and non-realtime (NRT) audio rendering at 50-150x realtime speed.
Why SuperCollider?
Sonic Pi is great for live coding, but it renders audio in realtime only -- a 5-minute piece takes 5 minutes to produce. SuperCollider's NRT mode renders audio from a score as fast as your CPU allows, typically 50-150x realtime. A 5-minute piece renders in 2-4 seconds.
This server gives Claude both modes:
- Real-time: compose interactively, hear results immediately
- NRT: render a finished piece to WAV without waiting
Requirements
- Linux (tested on Ubuntu 24.04)
supercollider-serverpackage (scsynth3.13+)- PipeWire with JACK compatibility (
pw-jack) - Python 3.11+
Install SuperCollider server only (no GUI needed):
sudo apt install supercollider-server
Create the pw-scsynth wrapper (routes scsynth through PipeWire/JACK):
cat > ~/.local/bin/pw-scsynth << 'EOF'
#!/bin/bash
exec pw-jack scsynth "$@"
EOF
chmod +x ~/.local/bin/pw-scsynth
Installation
git clone https://github.com/AJBogo9/supercollider-mcp
cd supercollider-mcp
python3 -m venv .venv
.venv/bin/pip install -e .
MCP configuration
Add to your project's .mcp.json:
{
"mcpServers": {
"supercollider": {
"command": "/home/bogo/Documents/personal/supercollider-mcp/.venv/bin/python",
"args": ["-m", "sc_mcp.server"],
"cwd": "/home/bogo/Documents/personal/supercollider-mcp"
}
}
}
Tools
| Tool | Description |
|---|---|
sc_boot |
Boot scsynth (auto-called by sc_play) |
sc_ping |
Check server status |
sc_quit |
Shut down scsynth |
sc_play(code) |
Run Python/supriya code on the live server |
sc_stop |
Stop all sounds, signal song threads to exit |
sc_log |
Read scsynth output and exec errors |
sc_render(code, duration, output_path) |
NRT render to WAV |
save_song / load_song / list_songs |
Song library |
save_pattern / load_pattern / list_patterns |
Pattern snippets |
SynthDef library
Six built-in SynthDefs available in every sc_play call:
ambient_pad-- warm slow-attack pad, good for chordsbass_drone-- dark low-pass sawtooth sub-basspluck_tone-- Karplus-Strong plucked stringnoise_wind-- band-pass filtered noise (wind, breath)choir_wash-- formant-filtered pink noise (choir approximation)sample_one_shot-- one-shot buffer player for audio files
NRT example
sc_render("""
import random
# Simple ambient chord progression
chords = [[293, 369, 440], [247, 311, 392], [261, 329, 415]]
for i, freqs in enumerate(chords):
for freq in freqs:
with score.at(i * 6.0):
s = score.add_synth(ambient_pad, freq=freq, amp=0.25,
attack=2.0, sustain=3.0, release=2.0)
with score.at(i * 6.0 + 6.0):
score.free_node(s)
with score.at(duration):
score.do_nothing()
""", duration=20.0, output_path="/tmp/ambient.wav")
Renders 20 seconds of audio in under 0.1 seconds.
Real-time example
sc_play("""
import threading, random, time
BEAT = 60.0 / 90.0
def bass_loop():
while not stop.is_set():
with server.at():
server.add_synth(bass_drone, freq=55, amp=0.4, attack=1.0, sustain=2.0, release=1.0)
stop.wait(4 * BEAT)
def melody_loop():
scale = [440, 494, 554, 587, 659]
while not stop.is_set():
with server.at():
server.add_synth(pluck_tone, freq=random.choice(scale), amp=0.3, decay=2.0)
stop.wait(random.uniform(0.5, 2.0))
for fn in [bass_loop, melody_loop]:
threading.Thread(target=fn, daemon=True).start()
""")
# Stop with: sc_stop()
Demo: aurora borealis
The songs/aurora_borealis_sc/v1.py file is a full port of the aurora borealis ambient track
(originally composed in Sonic Pi) using SuperCollider. 12 concurrent generative loops, D Lydian
harmony, Markov chain chord progressions, real owl and wolf samples.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。