Live-coded music for AI agents, MCP clients, and the browser
DJ Opus started as an open-source MCP server that connects AI coding agents to Strudel, a live-coding music environment running in your browser. You talk to your AI. It writes music code. You hear it. The original project is open source and works across multiple MCP clients today, while a ChatGPT-native mode is under active development as one more way to use it.
Try the hosted instance → or deploy your own for free — it's open sourceThe original DJ Opus repo is an MCP-first, browser-based live-coding music system for Claude Code, OpenCode, Codex, Cursor, and other MCP clients.
A dedicated ChatGPT Apps mode is in progress for people who want the REPL inline in ChatGPT. It is one client experience among several, built on top of the same open DJ Opus idea.
The goal is not to replace the open project. It is to keep DJ Opus portable across clients while making each mode feel native where it runs, whether that is a terminal agent, an IDE, or a conversation-first app.
MCP (Model Context Protocol) is an open standard that lets AI assistants connect to external tools. Build one MCP server and any compatible client can use it — Claude Code, Codex, Cursor, local models, whatever comes next.
DJ Opus is an MCP server that happens to speak music. The same pattern works for anything: databases, IoT devices, CI pipelines, home automation. The protocol is the interesting part. The client is interchangeable.
Your agent sends commands through MCP to the DJ Opus server (a Cloudflare Worker). The server pushes them over WebSocket to a Strudel session in your browser. Patterns update live — you hear changes as the AI makes them.
The MCP server exposes tools the AI can call. It doesn't need to know Strudel syntax in advance — the tool descriptions tell it what's available and how to format patterns. The AI generates Strudel code based on those descriptions and your prompts.
You say "give me a chill lo-fi beat" and the AI writes:
You don't need to know Strudel syntax — the AI handles it. But if you're curious, Strudel's docs are great.
MCP is a standard protocol, so DJ Opus works with anything that supports it.
Anthropic's CLI agent. Add the MCP server in your config and go.
Open-source terminal agent. Same MCP config, any model provider.
OpenAI's open-source agent. Supports MCP servers out of the box.
AI code editors with built-in MCP. Add the server in settings.
Claude Desktop, local models through Ollama, custom agents — if it speaks MCP, it works.
Add this to your project's .mcp.json or ~/.claude/settings.json:
Other agents follow the same pattern — point them at the MCP server URL. Check each agent's docs for where the config lives.
Open the player
Go to djopus.moore.nyc in your browser. This is where the music plays.
Connect your agent
Add the MCP server URL to your agent's config. See the example above.
Make some noise
Tell your AI to play something. "Start with a four-on-the-floor kick" or "build me a ambient pad" — plain English.
Describe what you want to hear. The AI writes the code.
Patterns change in real time over WebSocket. No reloads.
Name and store patterns. Build a library across sessions.
Full history stack. Rewind to any previous state.
Standard MCP. Switch agents or models whenever you want.
Deploys on Cloudflare's free tier. Zero hosting costs.
Questions about DJ Opus, the hosted player, or the in-progress ChatGPT app mode? Reach us at support@djopus.party.
For submission and user review purposes, we maintain a public privacy policy and a simple support page.
DJ Opus runs on Cloudflare Workers. It's a good fit for a few specific reasons:
npx wrangler deploy — no containers, no build pipelines.You can also run this locally with wrangler dev for development. Or host it anywhere that runs a WebSocket server — Cloudflare is just the easiest free option.
A Durable Object is a single-instance JavaScript class with its own persistent storage. In DJ Opus, each session is one. It holds:
When you reconnect, your state is still there. When there's no activity, it sleeps and costs nothing.
Clone the repo, run npm install, and npx wrangler dev for local development. To deploy your own instance:
That's it. You'll get a .workers.dev URL, or add a custom domain in the Cloudflare dashboard.
Open source · MIT · contributions welcome