Strudel MCP Server
한국어 | English
An MCP (Model Context Protocol) server that enables LLMs to work with Strudel - a live coding environment for music patterns. This server allows AI assistants to parse, analyze, generate, and transform Strudel patterns.
What is Strudel?
Strudel is a JavaScript port of TidalCycles, a live coding environment for creating music through code. It uses a concise "mini notation" to express complex rhythmic patterns:
What is MCP?
Model Context Protocol (MCP) is an open protocol that enables AI assistants to interact with external tools and services. This server exposes Strudel's pattern engine to any MCP-compatible client.
Features
Pattern Analysis - Parse mini notation, query pattern events, validate syntax
Music Theory - Access scales, chords, and voicings
Code Generation - Generate patterns by style (drums, bass, melody, chords, ambient)
Pattern Transformation - Apply transformations like
fast,slow,rev,juxReference - List available functions, sounds, and samples
Installation
Prerequisites
Node.js 18 or higher
npm or pnpm
Setup
Usage
With Claude Desktop
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Then restart Claude Desktop.
With Claude Code
With MCP Inspector
Test the server interactively:
Available Tools
Pattern Analysis
Tool | Description | Example Input |
| Parse mini notation to AST |
|
| Query events in time range |
|
| Validate syntax |
|
| Human-readable explanation |
|
Music Theory
Tool | Description | Example Input |
| List available scales |
|
| Get notes in a scale |
|
| List chord types |
|
| Get chord voicing |
|
Code Generation
Tool | Description | Example Input |
| Generate pattern by style |
|
| Apply transformations |
|
Reference
Tool | Description | Example Input |
| List pattern functions |
|
| List built-in sounds |
|
Examples
Parse a Pattern
Output:
Generate a Drum Pattern
Output:
Get Scale Notes
Output:
Development
Project Structure
Dependencies
@modelcontextprotocol/sdk - MCP SDK
@strudel/core - Strudel pattern engine
@strudel/mini - Mini notation parser
@strudel/tonal - Music theory functions
tonal - Music theory library
zod - Schema validation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details.
Links
Strudel - Live coding environment
Strudel Documentation - Learn Strudel
TidalCycles - Original Haskell implementation
MCP Specification - Model Context Protocol
Acknowledgments
Alex McLean and Felix Roos - Strudel creators
Anthropic - MCP specification