Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Strudel MCP Servergenerate a medium complexity drum pattern"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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:
s("bd sd [hh hh] cp") // kick, snare, two hi-hats, clapWhat 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
# Clone the repository
git clone https://github.com/YOUR_USERNAME/strudel-mcp.git
cd strudel-mcp
# Install dependencies
npm install
# Build the project
npm run buildUsage
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
{
"mcpServers": {
"strudel": {
"command": "node",
"args": ["/absolute/path/to/strudel-mcp/dist/index.js"]
}
}
}Then restart Claude Desktop.
With Claude Code
claude mcp add strudel node /absolute/path/to/strudel-mcp/dist/index.jsWith MCP Inspector
Test the server interactively:
npm run inspectAvailable 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
User: Parse the pattern "bd sd [hh hh] cp"
Tool: strudel_parse_mini
Input: {"notation": "bd sd [hh hh] cp"}Output:
{
"notation": "bd sd [hh hh] cp",
"eventCount": 5,
"events": [
{"value": "bd", "whole": "0 -> 0.25"},
{"value": "sd", "whole": "0.25 -> 0.5"},
{"value": "hh", "whole": "0.5 -> 0.625"},
{"value": "hh", "whole": "0.625 -> 0.75"},
{"value": "cp", "whole": "0.75 -> 1"}
]
}Generate a Drum Pattern
User: Generate a complex drum pattern
Tool: strudel_generate_pattern
Input: {"style": "drums", "complexity": "complex"}Output:
{
"style": "drums",
"complexity": "complex",
"code": "s(\"bd(3,8), sd(2,8,1), hh*16?0.3, cp(1,4,2)\")",
"explanation": "Complex polyrhythmic drums using Euclidean patterns"
}Get Scale Notes
User: What notes are in A minor pentatonic?
Tool: strudel_get_scale
Input: {"scale": "pentatonic minor", "root": "A"}Output:
{
"name": "A pentatonic minor",
"notes": ["A", "C", "D", "E", "G"],
"usage": "n(\"0 1 2 3 4\").scale(\"A:pentatonic_minor\")"
}Development
# Build
npm run build
# Run directly
npm start
# Watch mode (rebuild on changes)
npm run dev
# Test with MCP Inspector
npm run inspectProject Structure
strudel-mcp/
├── src/
│ ├── index.ts # Main server with all tools
│ └── types.d.ts # TypeScript declarations for Strudel
├── dist/ # Compiled output
├── package.json
├── tsconfig.json
└── README.mdDependencies
@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