The Strudel MCP Server provides comprehensive AI-powered music generation and live coding by directly controlling Strudel.cc in a browser.
Core Features:
- Browser Control & Pattern Editing: Initialize Strudel.cc, write/append/insert/replace/clear patterns, and control playback (play, pause, stop)
- AI Music Generation: Create complete patterns across 8+ genres (techno, house, dnb, ambient), generate drum sequences, basslines, melodies, and variations (subtle to extreme)
- Music Theory Tools: Generate scales, chord progressions, Euclidean rhythms, polyrhythms, and apply music theory concepts
- Pattern Manipulation: Transpose, reverse, stretch, quantize, humanize, set BPM, and add swing
- Audio Effects & Analysis: Add/remove effects, perform real-time FFT spectrum analysis, rhythm/tempo/key detection
- Session Management: Save/load patterns with metadata and tags, undo/redo functionality
Enables AI-powered music generation and live coding through Strudel.cc, providing pattern management, audio analysis, and real-time control of TidalCycles/Strudel patterns for interactive music creation.
Strudel MCP Server
🎵 Production-ready MCP server for AI-powered music generation with Strudel.cc
A fully-tested Model Context Protocol (MCP) server that gives Claude complete control over Strudel.cc for AI-assisted music generation, live coding, and algorithmic composition. All features verified working with real Strudel.cc interaction.
✨ Features
🎹 Complete Music Control
- 40+ 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
🚀 Verified & Production-Ready
- ✅ 100% Test Coverage: All tools tested with real Strudel.cc
- ✅ Browser Integration: Confirmed working with live website
- ✅ Audio Analysis: Real-time frequency data extraction working
- ✅ Pattern Playback: All generated patterns play correctly
- ✅ Error Handling: Graceful handling of all edge cases
📦 Installation
From npm
From Source
🎯 Quick Start
1. Add to Claude
2. Start Using
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 (40+)
Core Control (10 tools)
Tool | Description | Example |
---|---|---|
init | Initialize Strudel in browser | "Initialize Strudel" |
write | Write pattern to editor | "Write pattern: s('bd*4')" |
play | Start playback | "Play the pattern" |
stop | Stop playback | "Stop playing" |
clear | Clear editor | "Clear the editor" |
get_pattern | Get current pattern | "Show current pattern" |
append | Add to pattern | "Add hi-hats" |
insert | Insert at line | "Insert at line 2" |
replace | Replace text | "Replace bd with sn" |
pause | Pause playback | "Pause" |
Pattern Generation (10 tools)
Tool | Description | Styles/Options |
---|---|---|
generate_pattern | Complete patterns | techno, house, dnb, ambient, trap, jungle |
generate_drums | Drum patterns | All styles + complexity (0-1) |
generate_bassline | Bass patterns | techno, house, dnb, acid, dub, funk, jazz |
generate_melody | Melodic lines | Any scale, custom length |
generate_variation | Pattern variations | subtle, moderate, extreme, glitch |
generate_fill | Drum fills | All styles, 1-4 bars |
transpose | Transpose notes | ±12 semitones |
reverse | Reverse pattern | - |
stretch | Time stretch | Factor 0.1-10 |
humanize | Add timing variation | Amount 0-1 |
Music Theory (10 tools)
Tool | Description | Options |
---|---|---|
generate_scale | Generate scales | major, minor, modes, pentatonic, blues |
generate_chord_progression | Chord progressions | pop, jazz, blues, rock, folk |
generate_euclidean | Euclidean rhythms | hits/steps/sound |
generate_polyrhythm | Polyrhythms | Multiple patterns |
apply_scale | Apply scale to notes | Any scale |
quantize | Quantize to grid | 1/4, 1/8, 1/16, etc |
Audio & Effects (5 tools)
Tool | Description | Returns |
---|---|---|
analyze | Audio analysis | Frequency data, playing state |
analyze_spectrum | FFT analysis | Spectral data |
add_effect | Add audio effect | Effect chain |
set_tempo | Set BPM | 60-200 BPM |
add_swing | Add swing feel | 0-1 amount |
Session Management (5 tools)
Tool | Description |
---|---|
save | Save pattern with tags |
load | Load saved pattern |
list | List all patterns |
undo | Undo last action |
redo | Redo action |
🎵 Verified Working Examples
Create a Techno Track
Jazz Chord Progression
Live Audio Analysis
🧪 Testing
All tools have been tested with real Strudel.cc interaction:
See BROWSER_TEST_RESULTS.md for detailed test results.
⚙️ Configuration
config.json
🏗️ Architecture
🎹 Pattern Examples
Minimal Techno (Verified Working)
Drum & Bass (Verified Working)
Generated Jazz Progression
🐳 Docker Support
🔧 Development
📊 Performance
- Pattern Generation: <100ms
- Browser Initialization: ~3 seconds
- Pattern Writing: Instant
- Playback Start: ~500ms
- Audio Analysis: Real-time
- Memory Usage: <150MB
🐛 Troubleshooting
Browser doesn't open
Audio analysis not working
- Ensure pattern is playing first
- Wait 1-2 seconds after play for analysis
Pattern syntax errors
- Check Strudel/TidalCycles documentation
- Use simpler patterns for testing
🤝 Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new features
- Ensure all tests pass
- Submit a pull request
📄 License
MIT License - see LICENSE file
🙏 Acknowledgments
- Strudel.cc - Amazing live coding environment
- TidalCycles - Pattern language inspiration
- Anthropic - Claude AI and MCP protocol
- Playwright - Reliable browser automation
v2.2.0 - Fully tested with real Strudel.cc interaction | 100% working
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables AI-powered music generation and live coding by providing direct control over Strudel.cc through browser automation. Supports pattern creation, audio analysis, and pattern storage for TidalCycles/Strudel music patterns.
- ✨ Features
- 📦 Installation
- 🎯 Quick Start
- 🛠️ Available Tools (40+)
- 🎵 Verified Working Examples
- 🧪 Testing
- ⚙️ Configuration
- 🏗️ Architecture
- 🎹 Pattern Examples
- 🐳 Docker Support
- 🔧 Development
- 📊 Performance
- 🐛 Troubleshooting
- 🤝 Contributing
- 📄 License
- 🙏 Acknowledgments
Related Resources
Related MCP Servers
- -securityAlicense-qualityGives AI-powered coding tools like Cursor, Windsurf, and Cline access to Figma design files, enabling more accurate code generation directly from Figma designs.Last updated -13,894TypeScriptMIT License
- -securityFlicense-qualityAn MCP server that connects Claude to FL Studio, allowing the AI to compose music, control instruments, and live record melodies, chords, and drums to the piano roll.Last updated -48Python
- -securityFlicense-qualityA MIDI composition system that enables AI assistants to create music through FluidSynth, with capabilities for playing notes, creating melodies, managing tracks, and exporting audio.Last updated -Python
- -securityAlicense-qualityA server that acts as a bridge between Claude and local Xcode projects, enabling AI-powered code assistance, project management, and automated development tasks without exposing your code to the internet.Last updated -JavaScriptMIT License