ableton-and-max-mcp
Enables Claude AI to control Ableton Live and Max for Live, allowing music production tasks like track management, MIDI editing, and pattern generation directly from conversation.
README
Ableton Live + Max for Live MCP Server
Production-grade, zero-latency MCP (Model Context Protocol) server for controlling Ableton Live and Max for Live directly from Claude AI.
Overview
This project gives Claude AI complete programmatic control over Ableton Live and Max for Live through the Model Context Protocol (MCP). Generate music patterns, manage tracks, edit MIDI, control synthesizers, and interact with Max patches—all directly from Claude conversations.
Why this matters:
- No GUI clicking — describe what you want, Claude does it
- Reproducible workflows — save and version your music configurations
- Real-time collaboration — Claude can analyze and modify your project live
- Pattern generation — AI-powered MIDI generation (arpeggio, chord, scales, etc.)
Performance
| Metric | Value |
|---|---|
| Startup Time | ~50ms (Bun) |
| OSC Latency | 1-2ms per command |
| Memory Usage | <20MB |
| Compiled Size | 1,245 lines JavaScript |
| Throughput | 100+ commands/sec |
Quick Start
Prerequisites
# Install Bun (3x faster than Node.js)
curl -fsSL https://bun.sh/install | bash
# Ableton Live 11+ with AbletonOSC Remote Script
# Download: https://github.com/Fd2014/AbletonOSC
Installation
git clone https://github.com/TropinAlexey/ableton-and-max-mcp.git
cd ableton-and-max-mcp
bun install
bun start
Configure Claude Code
Edit ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ableton": {
"command": "bun",
"args": ["run", "/path/to/ableton-and-max-mcp/src/index.js"]
}
}
}
Restart Claude Code → 42 new tools available!
Architecture
┌─────────────────────────────────────────────────────────┐
│ Claude AI │
│ (MCP Client / Conversation Interface) │
└─────────────────────────────────────────────────────────┘
↓
MCP Protocol (JSON-RPC 2.0)
↓
┌─────────────────────────────────────────────────────────┐
│ Ableton MCP Server (Bun Runtime) │
│ - Tool Registration (42 MCP tools) │
│ - Request Routing (O(1) Map lookup) │
│ - OSC Client Layer (Low-latency UDP) │
└─────────────────────────────────────────────────────────┘
↓
OSC Protocol (UDP)
Port 11000-11001
↓
┌─────────────────────────────────────────────────────────┐
│ Ableton Live + Max for Live │
│ - AbletonOSC Remote Script (MIDI Control Surface) │
│ - Live Object Model (LOM) Access │
│ - Max for Live Integration │
└─────────────────────────────────────────────────────────┘
Available Tools (42 Total)
🎵 Transport Control (7 tools)
| Tool | Description |
|---|---|
transport_get_state |
Get playback state, position, BPM, recording status |
transport_play |
Start playback |
transport_stop |
Stop playback |
transport_record |
Enable recording mode |
transport_set_tempo |
Set BPM (20-300) |
transport_jump_to |
Jump to bar position |
transport_set_time_signature |
Set time signature (requires M4L device) |
🎼 Track Management (13 tools)
| Tool | Description |
|---|---|
tracks_list |
List all tracks with properties |
tracks_create_midi |
Create new MIDI track |
tracks_create_audio |
Create new audio track |
tracks_delete |
Delete track by index |
tracks_set_name |
Rename track |
tracks_set_volume |
Set volume (0.0-1.0) |
tracks_set_pan |
Set pan (-1.0 to 1.0) |
tracks_mute |
Mute track |
tracks_unmute |
Unmute track |
tracks_solo |
Enable solo |
tracks_unsolo |
Disable solo |
tracks_arm |
Arm for recording |
tracks_disarm |
Disarm recording |
📎 Clip Control (8 tools)
| Tool | Description |
|---|---|
clips_list |
List clips in track |
clips_create |
Create new MIDI clip |
clips_delete |
Delete clip |
clips_fire |
Start playing clip |
clips_stop |
Stop clip |
clips_set_name |
Rename clip |
clips_set_length |
Set clip length in bars |
clips_duplicate |
Duplicate clip to another scene |
🎹 MIDI Notes + Pattern Generation (5 tools)
| Tool | Description |
|---|---|
notes_get |
Get all notes from clip |
notes_set |
Replace all notes |
notes_add |
Add single note (pitch, time, duration, velocity) |
notes_clear |
Clear all notes |
notes_generate_pattern |
Generate patterns: arpeggio_up, arpeggio_down, chord with scales: major, minor, pentatonic, blues, chromatic |
Pattern Examples:
notes_generate_pattern(
trackIndex: 0,
pattern: "arpeggio_up",
root: 60, // C4
scale: "major",
length: 2 // 2 bars
)
Generates 16 ascending notes from C major scale.
⚙️ Device/FX Control (5 tools)
| Tool | Description |
|---|---|
devices_list |
List all devices on track |
devices_get_parameters |
Get device parameters |
devices_set_parameter |
Set parameter value (0.0-1.0) |
devices_enable |
Turn on device |
devices_disable |
Turn off device |
🎛️ Max for Live (4 tools)
| Tool | Description |
|---|---|
max_list_devices |
List all M4L devices |
max_send_message |
Send message to Max patch |
max_get_parameter |
Get M4L parameter value |
max_set_parameter |
Set M4L parameter value |
Usage Examples
In Claude Conversations
Claude: "Create a new MIDI track called 'Bass'"
→ Uses: tracks_create_midi
User: "Generate a C major arpeggio over 4 bars"
→ Uses: notes_generate_pattern (arpeggio_up, C, major, 4 bars)
User: "Set the tempo to 140 BPM and play"
→ Uses: transport_set_tempo, transport_play
User: "Create a chord progression with Em, Am, C, G"
→ Uses: clips_create, notes_generate_pattern (chord) × 4
Via Command Line
# Test without Ableton (Mock OSC Server)
npm run test:all
# Detailed OSC logging
DEBUG=1 bun start
# Watch mode (auto-reload)
bun run --watch src/index.js
Project Structure
src/
├── index.js # MCP server entry point (99 lines)
├── osc-client.js # OSC protocol layer (247 lines)
├── types.js # JSDoc type definitions
└── tools/ # MCP tool implementations
├── transport.js # Transport control
├── tracks.js # Track management
├── clips.js # Clip operations
├── notes.js # MIDI editing + pattern generation
├── devices.js # Device/FX control
└── max.js # Max for Live integration
Total: 1,245 lines of production JavaScript
Performance Optimizations
OSC Parser
- Direct byte reading (zero allocations)
- Type inference (int/float detection)
- UTF-8 validation on string boundaries
- Buffer reuse (pre-allocated)
Tool Dispatch
// Before: O(n) string prefix checks
if (toolName.startsWith('transport_')) { ... }
// After: O(1) Map lookup
const executor = toolExecutors.get(toolName);
Memory
- No garbage collection pauses in hot path
- Minimal object creation in request loop
- ~18MB RSS at runtime
Troubleshooting
"Ableton not connected"
# Check ports are available
lsof -i :11000
lsof -i :11001
# Run with debug logging
DEBUG=1 bun start
# Verify AbletonOSC is installed:
~/Music/Ableton\ Library/Remote\ Scripts/AbletonOSC/
Solutions:
- ✓ Check Ableton Live is running
- ✓ Verify AbletonOSC Remote Script is enabled in Preferences
- ✓ Check ports 11000-11001 aren't blocked by firewall
- ✓ Restart Ableton if script doesn't load
High Latency
Most latency (2-5ms) comes from Ableton/hardware, not software:
- OSC codec: <0.1ms
- Network stack: ~1ms
- Ableton processing: 2-5ms (hardware-bound)
Development
Local Testing (No Ableton Required)
# Run all tests with Mock OSC Server
npm run test:all
# Test output shows:
# ✅ Transport tests (play, stop, tempo, jump)
# ✅ Tracks tests (volume, pan, mute, solo, arm)
# ✅ Clips tests (create, fire, delete)
# ✅ Notes tests (patterns, scales)
# ✅ Devices tests (parameters, enable/disable)
# ✅ Max tests (messaging, parameters)
Building
# Production build (already JS, no compilation needed)
bun run src/index.js
# Or use npm (cross-platform)
npm start
Limitations & Future Work
Current Limitations
- Track creation (without Max for Live device helper)
- Time signature control (requires M4L device)
- Full clip duplication with MIDI data preservation
- Device discovery across all plugin types
Planned Features
- 🚧 Real-time state streaming (WebSocket)
- 🚧 Additional pattern generators (groove, random, probabilistic)
- 🚧 Performance metrics dashboard
- 🚧 Multi-device synchronization
- 🚧 Snapshot save/load system
Installation of AbletonOSC
- Download: https://github.com/Fd2014/AbletonOSC/releases
- Extract to:
~/Music/Ableton Library/Remote Scripts/ - Restart Ableton Live
- In Preferences → Link/Tempo/MIDI → Control Surface → select AbletonOSC
Contributing
Contributions welcome! Areas for improvement:
- Additional pattern generators
- Performance benchmarks
- Integration tests
- Documentation improvements
License
MIT © Alexey Tropin
Links
- GitHub: https://github.com/TropinAlexey/ableton-and-max-mcp
- Claude Code Guide: https://github.com/anthropics/claude-code
- MCP Specification: https://modelcontextprotocol.io/
- Ableton Live API: https://github.com/gluon/AbletonOSC
- Max for Live: https://www.ableton.com/en/live/max-for-live/
Support
For issues, feature requests, or questions:
- Check troubleshooting section
- Enable DEBUG logging:
DEBUG=1 bun start - Open an issue with logs and reproduction steps
Made with ❤️ for musicians and AI enthusiasts
This project bridges the gap between traditional DAW workflows and AI-driven creative tools, enabling a new paradigm of human-AI music creation.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.