Strudel Live Coding

Strudel Live Coding

williamzujkowski

Controls Strudel.cc in your browser to generate and manipulate live coding music patterns using AI assistance. Provides 65+ tools for pattern creation, music theory operations, and real-time audio control.

Provides direct control over Strudel.cc for live coding music generation through browser automation, offering 40+ tools for pattern creation, music theory operations, genre-specific generators, and real-time audio analysis with session management.

168499 views23Local (stdio)

What it does

  • Generate live coding music patterns
  • Control browser-based Strudel.cc sessions
  • Apply music theory operations and transformations
  • Create genre-specific music generators
  • Analyze audio patterns in real-time
  • Manage live coding sessions

Best for

Musicians doing AI-assisted live codingAlgorithmic composition experimentsMusic producers exploring generative patternsEducational music theory practice
65+ specialized music toolsDirect browser automationReal-time audio analysis

About Strudel Live Coding

Strudel Live Coding is a community-built MCP server published by williamzujkowski that provides AI assistants with tools and capabilities via the Model Context Protocol. Strudel Live Coding offers real-time music generation in your browser with 40+ tools for pattern creation, theory, and l It is categorized under browser automation, other.

How to install

You can install Strudel Live Coding in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Strudel Live Coding is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Strudel MCP Server

🎵 Open source MCP server for AI-powered music generation with Strudel.cc

Status: Actively developed | Experimental | Contributions welcome

Strudel Server MCP server

CI npm version Tools License

An experimental Model Context Protocol (MCP) server that enables Claude to control Strudel.cc for AI-assisted music generation, live coding, and algorithmic composition.

Current State: Functional but under active development. Core features work reliably, but expect rough edges. Test coverage is at 78% with 1470 tests passing (1521 total, 51 skipped). See open issues for known limitations.

Table of Contents

✨ Features

🎹 Complete Music Control

  • 65 MCP Tools: Comprehensive suite for music creation and manipulation
  • Real Browser Automation: Direct control of Strudel.cc through Playwright
  • Live Audio Analysis: Real-time frequency analysis via Web Audio API
  • Pattern Generation: AI-powered creation across 8+ music genres
  • Music Theory Engine: Scales, chords, progressions, euclidean rhythms
  • Session Management: Save, load, undo/redo with pattern storage

🔧 Testing & Development Status

  • Test Suite: 1470 tests passing (1521 total, 51 skipped)
  • Code Coverage: 78% statement coverage (goal: 80%)
  • Browser Integration: Works with live Strudel.cc website
  • Audio Analysis: Real-time FFT analysis functional
  • Pattern Generation: Core music generation features working
  • OIDC Publishing: Secure npm publishing with provenance attestation

Not Production-Ready: This is experimental software under active development. Use for exploration and experimentation. Expect breaking changes, bugs, and incomplete features. See CONTRIBUTING.md to help improve it.

🎼 Example Patterns

Explore 17 curated example patterns across 10 genres in patterns/examples/:

  • Techno: Hard techno, minimal techno
  • House: Deep house, tech house
  • Drum & Bass: Liquid, neurofunk
  • Ambient: Dark ambient, drone
  • Trap: Modern trap, cloud trap
  • Jungle: Classic jungle, ragga jungle
  • Jazz: Bebop, modal jazz
  • Intelligent DnB: Atmospheric, liquid, LTJ Bukem style
  • Trip Hop: Portishead, Massive Attack, Flying Lotus style
  • Boom Bap: DJ Premier, Alchemist, golden era hip hop

Each example includes pattern code, BPM, key, and description. See patterns/examples/README.md for details.

📦 Installation

Prerequisites

RequirementVersionNotes
Node.js18.x or 20.xLTS versions recommended
npm9+Comes with Node.js
ChromiumLatestAuto-installed by Playwright
Audio outputAnyRequired for playback (speakers/headphones)

Optional: Docker for containerized deployment.

From npm

npm install -g @williamzujkowski/strudel-mcp-server

# Install browser (required once)
npx playwright install chromium

From Source

# Clone repository
git clone https://github.com/williamzujkowski/strudel-mcp-server.git
cd strudel-mcp-server

# Install dependencies
npm install

# Install Chromium for browser automation
npx playwright install chromium

# Build the project
npm run build

🚀 Quick Reference

Common commands for immediate use:

ActionCommand
Initialize browserinit
Create techno beatgenerate_pattern with style: "techno"
Play patternplay
Stop playbackstop
Get current patternget_pattern
Analyze audioanalyze
Save patternsave with name: "my-pattern"
Undo last changeundo

One-shot workflow:

compose with style: "dnb", key: "Am", bpm: 174, auto_play: true

🎯 Quick Start

1. Add to Claude

# If installed globally
claude mcp add strudel strudel-mcp

# If built from source
claude mcp add strudel node /path/to/strudel-mcp-server/dist/index.js

2. Start Using

claude chat

Then ask Claude:

  • "Initialize Strudel and create a techno beat"
  • "Generate a jazz chord progression in F major"
  • "Create a drum & bass pattern at 174 BPM"

🛠️ Available Tools (65)

Core Control (10 tools)

ToolDescriptionExample
initInitialize Strudel in browser"Initialize Strudel"
writeWrite pattern to editor"Write pattern: s('bd*4')"
playStart playback"Play the pattern"
stopStop playback"Stop playing"
clearClear editor"Clear the editor"
get_patternGet current pattern"Show current pattern"
appendAdd to pattern"Add hi-hats"
insertInsert at line"Insert at line 2"
replaceReplace text"Replace bd with sn"
pausePause playback"Pause"

Pattern Generation & Manipulation (10 tools)

ToolDescriptionOptions
generate_patternComplete patternstechno, house, dnb, ambient, trap, jungle, jazz, intelligent_dnb, trip_hop, boom_bap
generate_drumsDrum patternsAll styles + complexity (0-1)
generate_basslineBass patternstechno, house, dnb, acid, dub, funk, jazz, intelligent_dnb, trip_hop, boom_bap
generate_melodyMelodic linesAny scale, custom length
generate_variationPattern variationssubtle, moderate, extreme, glitch
transposeTranspose notes±12 semitones
reverseReverse pattern-
stretchTime stretchFactor 0.1-10
quantizeQuantize to grid1/4, 1/8, 1/16, etc.
humanizeAdd timing variationAmount 0-1

Music Theory (6 tools)

ToolDescriptionOptions
generate_scaleGenerate scalesmajor, minor, modes, pentatonic, blues
generate_chord_progressionChord progressionspop, jazz, blues, rock, folk
generate_euclideanEuclidean rhythmshits/steps/sound
generate_polyrhythmPolyrhythmsMultiple patterns
generate_fillGenerate drum fillsAll styles, 1-4 bars
apply_scaleApply scale to notesAny scale

Effects (4 tools)

ToolDescription
add_effectAdd audio effect (reverb, delay, etc.)
remove_effectRemove an effect from the chain
set_tempoSet BPM (60-200)
add_swingAdd swing feel (0-1 amount)

Session Management (5 tools)

ToolDescription
saveSave pattern with tags
loadLoad saved pattern
listList all patterns
undoUndo last action
redoRedo action

Pattern History (3 tools)

ToolDescription
list_historyBrowse pattern history with timestamps and previews
restore_historyRestore a previous pattern by ID
compare_patternsCompare two patterns showing line-by-line differences

Audio Analysis (6 tools)

ToolDescription
analyzeBasic audio analysis (frequency, playing state)
analyze_spectrumFFT spectral analysis
analyze_rhythmRhythm complexity analysis
detect_tempoBPM detection
detect_keyMusical key detection
validate_pattern_runtimeValidate pattern with browser error checking

UX & Browser Control (6 tools)

ToolDescription
composeOne-shot pattern generation with auto-play
statusGet current browser/playback state
diagnosticsDetailed system diagnostics
show_browserBring browser window to foreground
screenshotCapture browser screenshot
show_errorsDisplay captured console errors

Performance (2 tools)

ToolDescription
performance_reportTiming metrics and bottleneck analysis
memory_usageMemory consumption statistics

AI Feedback (1 tool)

ToolDescriptionOptions
get_pattern_feedbackAI-powered creative feedback via GeminiincludeAudio: analyze audio (default: false), style: hint for context

Note: Requires GEMINI_API_KEY environment variable. Returns pattern complexity, estimated style, strengths, and suggestions.

🎵 Usage Examples

Basic Pattern Creation

Create a Simple Beat

You: Initialize Strudel and create a simple techno beat

Claude: [Initializes browser]
        [Generates and writes pattern]
        [Starts playback]

Pattern created:
setcpm(130)
stack(
  s("bd*4"),
  s("~ cp ~ cp"),
  s("hh*8").gain(0.4)
).gain(0.8)

Generate a Bassline

You: Add a techno bassline in C

Claude: [Generates bassline]
        [Appends to current pattern]

Added: note("c2 c2 c2 c2").s("sawtooth").cutoff(800)

README truncated. View full README on GitHub.

Alternatives

Related Skills

Browse all skills
autonomous-agent-patterns

Design patterns for building autonomous coding agents. Covers tool integration, permission systems, browser automation, and human-in-the-loop workflows. Use when building AI agents, designing tool APIs, implementing permission systems, or creating autonomous coding assistants.

3
checkers-sixty60

Shop on Checkers.co.za Sixty60 delivery service via browser automation. Use when the user asks to shop for groceries, add items to cart, order from Checkers, or manage their Checkers shopping basket. Handles delivery type selection, product search, backup preferences, regular item reordering, and deal evaluation.

2
k8s-browser

Browser automation for Kubernetes dashboards and web UIs. Use when interacting with Kubernetes Dashboard, Grafana, ArgoCD UI, or other web interfaces. Requires MCP_BROWSER_ENABLED=true.

1
irish-takeaway

Find nearby takeaways in Ireland and browse menus via Deliveroo/Just Eat. Uses Google Places API for discovery and browser automation for menu scraping.

1
notebooklm

Query Google NotebookLM for source-grounded, citation-backed answers from uploaded documents. Reduces hallucinations through Gemini's document-only responses. Browser automation with library management and persistent authentication.

144
dev-browser

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.

45