SuperCollider

io.github.Tok由 GitHub 账号 Tok 发布v0.2.1更新于 Nov 7, 2026

Make sound with SuperCollider: synths, drums, chords, melodies and soundscapes over OSC.

已验证STDIO仅桌面媒体与设计AI 与机器学习

概览

AI 生成的概览

让 AI 助手通过 OSC 在本机 SuperCollider 音频服务器上生成并播放合成器、鼓、和弦、旋律与环境音景。

可以做什么
  • 检查音频服务器状态,并停止它启动的所有声音
  • 用内置合成器演奏单音、多层齐奏、带 LFO 调制的持续音以及颗粒化织体
  • 生成 14 种音阶的旋律、自定义音符序列,以及由 Am7 等和弦符号构成的和弦进行
  • 用预设或自定义步进字符串编写鼓型,并生成不断变化的生成式节奏
  • 创作多种情绪的环境长音与渐强,可选混响、延迟、失真和滤波效果
适用场景
适合希望助手把音乐描述直接变成本机实际声音的场景,例如测试音、层叠织体、和弦进行、鼓组律动或环境铺底,而无需自己编写 SuperCollider 代码。
运行要求
以 Python 包形式通过 uvx 在本机运行(需 Python 3.10+)。需安装 SuperCollider 3.10 或更新版本,并保持 scsynth 音频服务器运行;主机与 UDP 端口通过 SC_HOST 和 SC_PORT 设置(默认 127.0.0.1 与 57110)。仅限桌面环境;Linux 上使用 PipeWire 时需安装 JACK 兼容层。
安装前请注意
它会通过本机声卡实际发声,且可叠加大量声音,需用 stop_all 静音。它会把 OSC 消息发送到 SC_HOST 与 SC_PORT 指定的主机和端口,连接远程 scsynth 时依赖两端时钟同步。不要求任何凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 SuperCollider,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[PyPI] [MCP Registry] [CI]

SuperCollider MCP 🎛️

A Model Context Protocol server that lets AI assistants make sound with SuperCollider. Ask for "a dark ambient drone with slow swells" or "a breakbeat at 170 under a Cm7-Fm7 arpeggio" and it plays on your SuperCollider server.

  • Real synths and drums. It ships its own SynthDefs (sine, saw, square, noise, FM, pad, Karplus-Strong pluck, kick, snare, hats, grains) plus an effect chain (distortion, low-pass, delay, reverb) and a safety limiter. Nothing depends on sclang's default synth or on sc3-plugins.
  • Sample-accurate timing. Phrases are streamed to scsynth as timestamped OSC bundles, so every tool returns immediately. Calls can overlap, so you can layer drums, chords and melody.
  • Music-aware tools. Melodies follow 14 scales, chords understand symbols like Am7, Bbmaj9 and G/B, drum patterns are readable step strings the assistant can write itself, and generative tools take a seed so a result you like can be replayed exactly.
  • A panic button. stop_all silences everything this server started.

Requirements

  • SuperCollider 3.10 or newer (tested with 3.13). Only the audio server, scsynth, has to be running.
  • uv, or any Python 3.10+ with pip.

Quick start

1. Install and boot SuperCollider. Install it from the downloads page (or brew install --cask supercollider on macOS, sudo apt install supercollider on Debian/Ubuntu), then boot the server:

  • in the SuperCollider IDE: Server → Boot Server (or run s.boot;)
  • or without the IDE: scsynth -u 57110

2. Add the MCP server to your assistant.

Claude Code:

bash
claude mcp add supercollider -- uvx supercollider-mcp

Claude Desktop, Cursor, Cline, Roo Code and other clients that use an mcpServers config:

json
{  "mcpServers": {    "supercollider": {      "command": "uvx",      "args": ["supercollider-mcp"]    }  }}

To run the latest code from GitHub instead of the PyPI release, use "args": ["--from", "git+https://github.com/Tok/SuperColliderMCP", "supercollider-mcp"].

3. Ask for something. Start with "play a test sound" to check the connection, then try the prompts below.

Configuration

SettingFlagEnvironmentDefault
scsynth host--hostSC_HOST127.0.0.1
scsynth UDP port--portSC_PORT57110
log level (stderr)--log-levelWARNING

For example "args": ["supercollider-mcp", "--port", "57111"].

Tools

ToolWhat it does
server_statusConnection check: scsynth version, CPU, running playbacks, recent server errors
stop_allSilence everything this server started and cancel scheduled notes
play_example_oscA short test chime
play_synthOne note on sine, saw, square, noise, fm, pad or pluck
create_layered_synthA thick unison: several detuned copies of one note spread in stereo
create_lfo_modulationA held note with a server-side LFO on pitch, volume, filter or pan
create_granular_textureA cloud of 5–100 tiny grains per second, scattered in pitch and space
play_melodyA generated melody in one of 14 scales that resolves to the tonic
create_sequenceA melody you spell out: "C4 E4_ G4_ . C5+"
create_chord_progressionChord symbols as pads, staccato stabs, 8th-note arpeggios or power chords
create_drum_patternfour_on_floor, breakbeat, shuffle, half_time, two_step, random, or your own
create_generative_rhythmDrums that keep mutating: minimal, techno, glitch, jazz, ambient
create_ambient_soundscapeA drone with overlapping swells in a calm, dark, bright, mysterious or chaotic mood

Most tools also take volume (0–1) and an optional effects object:

json
{"reverb": 0.6, "delay": 0.3, "delay_time": 0.25, "distortion": 0.0, "filter": 0.2}

All amounts are 0–1, and 0 means off. filter darkens the sound with a low-pass filter. delay_time is in seconds and defaults to three quarters of a beat.

Notes are names like C4 (middle C), F#3 or Bb2, or frequencies like "440" or "440hz".

Sequences separate notes with spaces or dashes. _ halves a note, + doubles it, :1.5 sets its length in beats, and . is a rest.

Drum patterns use one character per 16th note: X accent, x hit, o ghost note, . rest. Lanes (kick, snare, hat, open_hat, perc) can have different lengths and loop independently:

json
{"custom": {"kick": "X..x..X...x.....", "snare": "....X.......X..o", "hat": "x.x.x.x.x.x.x.x."}, "tempo": 92, "swing": 0.2}

Things to try

  • "Play a dorian melody in D on the pluck synth with some delay, then the same one an octave lower."
  • "Give me two bars of breakbeat at 170 BPM, then layer an Am7-Dm7-G7-Cmaj7 arpeggio on top."
  • "A mysterious ambient soundscape, 60 seconds, low register."
  • "Sweep a saw's filter with a slow triangle LFO while a granular cloud shimmers around A5."
  • "Write me a half-time drum pattern with ghost notes on the snare."

How it works

assistant ──MCP (stdio)──▶ supercollider-mcp ──OSC/UDP──▶ scsynth ──▶ speakers

On first use the server checks that scsynth answers, uploads its SynthDefs (/d_recv) and creates its own node group with a voice group, an effects group and a limiter. Node IDs sit far above the ranges sclang uses, so your own SuperCollider work is not affected. If scsynth restarts, the setup runs again on the next call.

Each tool call turns into a phrase: a time-ordered stream of synth events (supercollidermcp/compose.py, pure Python). A background task sends each event about half a second ahead as an OSC bundle with an NTP timetag, and scsynth starts it at exactly that time. Every synth frees itself when its envelope ends. When a call asks for effects, its voices go to a private bus that one mcp_fx synth reads.

Upgrading from 0.1

  • Point your MCP config at uvx supercollider-mcp as shown above. Old configs that run mcp run path/to/server.py still work through a small compatibility server.py.
  • Sounds now come from real SynthDefs, so you no longer need sclang's default synth.
  • Tools return right away instead of blocking until the sound ends.
  • Some parameters changed meaning. create_drum_pattern takes bars (16 steps each) instead of beats. effects is an object instead of a JSON string. detune is now ±50 cents at 1.0 instead of up to an octave. The sc-osc command-line tool is gone.

See CHANGELOG.md for everything else.

Troubleshooting

  • "No reply from the SuperCollider server…": scsynth is not running, or it listens on a different port. Boot it, or set SC_PORT.
  • Calls succeed but you hear nothing: check that scsynth's outputs are connected to your sound card and that server_status shows synths while something plays.
  • Linux with PipeWire (the default on current Ubuntu and Fedora): scsynth talks to JACK, so install PipeWire's JACK layer (sudo apt install pipewire-jack) and start SuperCollider through it: pw-jack scide, or pw-jack scsynth -u 57110 without the IDE. Otherwise scsynth tries to start its own jackd, which conflicts with PipeWire.
  • FAILURE IN SERVER /g_queryTree Group 2147480000 not found in the post window on first connect is expected: it is how the server notices that scsynth still needs to be set up.
  • Remote scsynth: timetags use wall-clock time, so keep both machines' clocks in sync (NTP).

Development

bash
git clone https://github.com/Tok/SuperColliderMCP.gitcd SuperColliderMCPuv syncuv run pytest          # unit and protocol tests run anywhereuv run ruff check . && uv run ruff format --check .

Some tests need SuperCollider:

  • tests/test_synthdefs_nrt.py renders every SynthDef with scsynth -N (no audio device needed) and checks the audio. It runs automatically when scsynth is on PATH, or set SCSYNTH=/path/to/scsynth.
  • tests/test_live_server.py runs every tool against a live server. Start a silent one with scsynth -u 57199 -i 0 -o 0, then run SC_TEST_PORT=57199 uv run pytest.

The SynthDefs are written in SuperCollider itself, in supercollidermcp/synthdefs/synthdefs.scd. After editing that file, rebuild the compiled .scsyndef files with python scripts/build_synthdefs.py (needs sclang; it runs headless).

supercollidermcp/├── server.py      MCP tools: validation and wiring├── compose.py     musical logic: requests → timed events (pure, unit-tested)├── theory.py      notes, scales, chords├── patterns.py    drum patterns as step strings├── engine.py      server setup, buses, streaming playback, stop_all├── osc.py         async OSC client that also reads scsynth's replies└── synthdefs/     synthdefs.scd (source) + compiled .scsyndef files

Contributions are welcome. New sounds usually mean a SynthDef in synthdefs.scd plus a composer function in compose.py.

License

MIT. See LICENSE.

来源:README.md,提交 3eedc27

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.1最新Nov 7, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分