Claude DJ MCP
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., "@Claude DJ MCPStart a DJ session and play chill lo-fi beats"
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.
Claude DJ MCP
An MCP server that lets Claude act as an autonomous radio DJ using Strudel live-coded music.
Features
šµ Live-coded music ā Claude generates Strudel patterns in real-time
šļø DJ announcements ā Text-to-speech commentary (macOS)
šļø Dynamic tempo control ā Adjust BPM mid-session
š» Audience requests ā Take song/vibe requests from browser UI
š Autonomous DJ loop ā Play ā announce ā wait ā adapt ā repeat
Related MCP server: radiomcp
Security Notice
ā ļø This project is designed for local development and personal use only.
Important security considerations:
Local use only ā The HTTP server binds to localhost but has open CORS headers (
Access-Control-Allow-Origin: *)Code execution ā Claude sends arbitrary Strudel code that is evaluated in the browser without sandboxing
Command execution ā The
dj_speaktool executes shell commands (macOSsay) with user-controlled inputNo authentication ā Anyone with access to localhost can interact with active sessions
No rate limiting ā Request queue and endpoints are not protected against abuse
Recommendations:
Only run on trusted machines with trusted Claude instances
Do not expose the HTTP server to network interfaces beyond localhost
Do not run in multi-user environments without additional security hardening
Review the code before use if you have security concerns
Architecture
Claude (MCP client)
ā stdio (JSON-RPC)
ā¼
MCP Server (Node.js)
ā In-memory state: pendingCode, pendingAction, browserState, requestQueue
ā
āā HTTP Server (port 6002, auto-increment if busy)
ā GET / ā HTML page with <strudel-editor> + request bar
ā GET /api/poll ā Browser polls: returns pending code/action
ā POST /api/state ā Browser posts: started, activeCode, error, cps
ā POST /api/request ā User submits song/vibe request from browser UI
ā GET /api/health ā Health check
ā
āā Browser (opened via `open` package)
<strudel-editor> web component (loaded from unpkg CDN)
Polls /api/poll every 1s, executes pending actions
Posts state back via /api/state after each action
Request bar at bottom for user inputInstallation
1. Build the MCP server
npm install
npm run build2. Configure in Claude Code / Claude Desktop
Add to your MCP settings (e.g., ~/.config/claude-code/mcp.json):
{
"mcpServers": {
"claude-dj": {
"command": "node",
"args": ["~/claude-dj-mcp/dist/index.js"]
}
}
}Usage
Quick start
In Claude Code or Claude Desktop:
Use the claude-dj skill to start a DJ sessionOr call tools directly:
Call start_session, then tell me when audio is readyThe DJ Loop
Once the session is started and audio is active:
Claude plays a pattern ā Calls
play_patternwith Strudel codeClaude announces ā Calls
dj_speakwith DJ commentaryClaude waits ā Calls
wait(30-90)to let the music playClaude checks requests ā The wait tool returns any pending audience requests
Claude adapts ā Creates the next pattern based on requests, mood, flow
Repeat
Audience requests
Users can type requests in the browser UI:
"something funky"
"chill lo-fi beats"
"90s techno"
"more cowbell"
Claude will acknowledge and incorporate requests into the next patterns.
MCP Tools (9 total)
Tool | Description |
| Starts HTTP server and opens browser with Strudel REPL |
| Sends Strudel code to browser for evaluation |
| Stops the current pattern |
| Returns browser state (started, activeCode, error, cps) |
| Sets BPM or CPS |
| macOS text-to-speech announcement (fire-and-forget) |
| Drains user request queue from browser UI |
| Blocks N seconds, then returns pending requests (core DJ loop tool) |
| Returns curated sound list by category |
Strudel Examples
Basic beat
s("bd sd:1 hh sd:2").gain(0.8)Layered pattern
stack(
s("bd:1 ~ bd:1 ~").gain(0.9),
s("~ sd ~ sd:3").gain(0.7),
s("hh*8").gain(0.4),
note("c2 ~ e2 ~ g2 ~ e2 ~").sound("bass1").gain(0.6)
)Lo-fi chill
stack(
s("bd ~ [~ bd] ~, ~ sd ~ sd").gain(0.7),
note("<c3 e3 g3 b3>/4").sound("piano").room(0.7).gain(0.3),
s("hh*4").gain(0.2).pan(sine)
).lpf(2000)Techno
stack(
s("bd*4").gain(0.9),
s("~ hh:2 ~ hh:3").gain(0.5),
s("~ ~ cp ~").room(0.5).gain(0.6),
note("c2 c2 [c2 c3] c2").sound("sawtooth").lpf(400).gain(0.5)
)Available Sounds
Drums: bd, sd, hh, oh, cp, rm, cb, lt, mt, ht, cr, rd, perc, tabla
Synths: sine, square, sawtooth, triangle, supersaw, supersquare
Instruments: piano, bass1, bass2, gtr, flute, jazz, metal, east, pluck, casio
Effects: .lpf() .hpf() .delay() .room() .gain() .pan() .crush() .vowel() .phaser() .speed()
Use get_available_sounds tool for the full categorized list with examples.
Mini-Notation Reference
*Nā repeat N times per cycle/Nā spread over N cycles (slow down)~ā rest / silence<a b c>ā alternate each cycle[a b]ā group into one step?ā random chance of playing,ā play in parallel
Development
# Install dependencies
npm install
# Development mode (with hot reload)
npm run dev
# Build
npm run build
# Run manually (stdio mode)
node dist/index.jsFile Structure
claude-dj-mcp/
āāā src/
ā āāā index.ts # MCP server entry: tool registrations, main()
ā āāā http-server.ts # HTTP server, state stores, endpoints
ā āāā html-page.ts # HTML template with Strudel REPL
ā āāā logger.ts # stderr-only logger
ā āāā prompts.ts # MCP prompt for DJ workflow
ā āāā sounds.ts # Curated Strudel sound list
āāā claude-dj/
ā āāā SKILL.md # Agent skill definition
āāā package.json
āāā tsconfig.json
āāā README.mdAgent Skills Support
This project includes an Agent Skills definition at claude-dj/SKILL.md. Compatible agents can discover and use the claude-dj skill automatically.
License
AGPL-3.0
Credits
Strudel ā The live coding environment for algorithmic patterns
Built with @modelcontextprotocol/sdk
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
Control your internet radio from any AI client: listeners, stream, playlists, AutoDJ, DJs, store.
ABC sheet music + Strudel live coding studio with ext-apps widgets, harmony tools, and share links.
Turn Claude into a creative studio: DNA-locked characters, images, video, voiceover ā 55 tools.
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables AI agents to generate, manipulate, and perform algorithmic music using Strudel.cc live coding environment. Provides 46+ tools for pattern generation across multiple genres, music theory operations, real-time audio analysis, and AI-powered composition.50-
- AlicenseNot gradedqualityFmaintenanceInternet radio for Claude and your terminal with ~25,000 verified live stations from 197 countries. Control playback, search, and get recommendations through natural language.MIT
- AlicenseNot gradedqualityBmaintenanceTwo-mode creative music studio for AI: scored composition (ABC notation with sheet music) and live performance (Strudel live coding with TidalCycles), with interactive UI rendering inline in Claude Desktop and other MCP clients.168 npm70MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that exposes a synthesizer composer's command catalog as tools, enabling Claude to compose, sound-design, and mix in a live browser session.MIT