MCP Hub
Back to servers

DJ Claude

Agents can now live code music for you, themselves, and each other while they work.

Updated
Feb 23, 2026

Quick Install

npx -y dj-claude
     _  _                _                 _
  __| |(_)        ___  | |  __ _  _   _  __| |  ___
 / _` || |       / __| | | / _` || | | |/ _` | / _ \
| (_| || |  _   | (__  | || (_| || |_| | (_| ||  __/
 \__,_|| | (_)   \___| |_| \__,_| \__,_|\__,_| \___|
      _/ |
     |__/

DJ Claude

Live coding music for AI agents — in the CLI or web.

npm License: MIT GitHub


About

DJ Claude uses Strudel — a live coding environment for music — to generate and play patterns in real time. It works in your terminal, browser, or as an MCP server for any AI agent. Agents can now make music for you, themselves, and each other while they work.

Ways to Play

ModeCommandDescription
Claude Code plugin/plugin install dj-claudeSlash commands + MCP server, one-step install
Web appclaude.djFull browser experience, no API key needed
Terminal TUInpx dj-claudeInteractive terminal DJ
TUI + Web audionpx dj-claude --browserTUI with browser audio engine for higher quality sound
Headlessnpx dj-claude --headless "lofi"Script and automation friendly, plays and exits (--duration N to set seconds, default 10)
MCP servernpx dj-claude-mcpFor AI agent integration (Cursor, Windsurf, Zed, etc.)

Terminal audio vs. browser audio: By default, the CLI and MCP server render audio through node-web-audio-api — a Node.js reimplementation of the Web Audio API. It works everywhere with zero setup, but sample playback and effects can sound rougher than a real browser engine. Add --browser (CLI) or set DJ_CLAUDE_BROWSER=1 (MCP) to route audio through your system browser's native Web Audio instead. This opens a background tab and produces noticeably higher quality sound — especially for pads, reverb, and layered patterns.

Quick Start

Prerequisites

  • Node.js >= 18
  • Anthropic API key (not needed for the web app at claude.dj)

Install & Run

# Set your API key (or add to a .env file)
export ANTHROPIC_API_KEY=sk-ant-...

# Launch the terminal DJ
npx dj-claude

Or install globally:

npm i -g dj-claude
dj-claude

Or go headless for scripting:

npx dj-claude --headless "jazzy lo-fi beats" --duration 30

Claude Code Plugin

The easiest way to use DJ Claude with Claude Code. Installs the MCP server and gives you slash commands.

Install

/plugin marketplace add p-poss/dj-claude
/plugin install dj-claude@dj-claude-marketplace

Slash Commands

CommandDescription
/dj-claude:play [prompt]Play music from a description
/dj-claude:vibe [mood]Set the vibe — chill, dark, hype, focus, funky, dreamy, weird, epic
/dj-claude:hushStop all music
/dj-claude:now-playingCheck what's currently playing
/dj-claude:strudel [code]Evaluate raw Strudel code directly
/dj-claude:browserSwitch between Node and browser audio backends mid-session

Or just ask naturally — Claude will call the right tool:

> play some chill lo-fi while I work on this PR
> set the vibe to hype
> hush

MCP Server (Manual Setup)

If you prefer manual configuration, or want to use DJ Claude with other MCP clients (Cursor, Windsurf, Zed, etc.), add this to your .mcp.json:

{
  "mcpServers": {
    "dj-claude": {
      "command": "npx",
      "args": ["-y", "dj-claude-mcp"]
    }
  }
}

For higher quality audio through the browser's Web Audio engine:

{
  "mcpServers": {
    "dj-claude": {
      "command": "npx",
      "args": ["-y", "dj-claude-mcp"],
      "env": {
        "DJ_CLAUDE_BROWSER": "1"
      }
    }
  }
}

MCP Tools

ToolDescription
play_musicGenerate and play music from a text prompt
play_strudelEvaluate raw Strudel/Tidal code directly
set_vibeSet the mood — chill, dark, hype, focus, funky, dreamy, weird, epic
hushStop all music playback
now_playingCheck what's currently playing
switch_audioSwitch between Node and browser audio backends at runtime

Keyboard Shortcuts (TUI)

KeyAction
EnterSubmit prompt
qQuit
EscPause / resume music
rRevert to previous pattern

Web App

Visit claude.dj for the full browser experience — no API key or install needed.

Features:

  • 5 club themes — Anthropic, Gemini, Codex, Fairlight, OpenClaw
  • NIGHT mode (color inversion), DISCO mode (rainbow hue cycling), RAVE mode (glow + CRT scanlines)
  • Voice DJ commentary with idle hype phrases (via ElevenLabs TTS)
  • Dancing Claude that follows your cursor
  • Live Strudel code display with export to clipboard
  • Space bar to toggle play/pause

Environment Variables

VariableRequiredDescription
ANTHROPIC_API_KEYYes (CLI / MCP)Your Anthropic API key
ELEVENLABS_API_KEYNo (web only)Enables voice DJ commentary
DJ_CLAUDE_BROWSERNoSet to 1 for browser audio backend in MCP mode
DJ_CLAUDE_MODELNoClaude model for CLI/MCP (default: claude-sonnet-4-6)
DJ_CLAUDE_MAX_TOKENSNoMax response tokens for CLI/MCP (default: 16384)

The CLI also loads .env and .env.local files from your project directory automatically.

Architecture

DJ Claude is a Next.js app with a companion CLI package:

  • /app — Next.js web frontend (claude.dj)
  • /cli — Terminal TUI (Ink/React) and MCP server
  • /cli/src/mcp — MCP tool definitions and JSON-RPC server
  • /cli/src/audio — Strudel audio engine (node + browser backends)
  • /cli/src/lib — Shared utilities, Claude API client, prompt generation
  • /plugin — Claude Code plugin (skills, MCP config, marketplace)

Music is generated by Claude composing Strudel live-coding patterns, which are then evaluated in real-time through either the Node node-web-audio-api backend or the browser's native Web Audio API.

Platform Support

Works on macOS, Windows, and Linux. On Linux, the Node audio backend (node-web-audio-api) requires JACK or PipeWire-JACK — vanilla ALSA/PulseAudio alone won't work with the prebuilt binaries. Use --browser mode to bypass this by routing audio through your browser instead.

Creator

Built by Patrick Posshey@patrickposs.com

License

MIT

Reviews

No reviews yet

Sign in to write a review

DJ Claude — MCP Server | MCP Hub