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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。