Skip to content

Commit de8ad68

Browse files
docs: update CLAUDE.md for lazy OSC and multi-instance architecture
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 94a35b5 commit de8ad68

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ Claude/Client <--stdio/JSON-RPC--> remix-mcp <--UDP/OSC--> AbletonOSC <--> Ablet
1111
```
1212

1313
- **MCP Server**: Rust binary using `rmcp` crate, communicates via stdio
14-
- **OSC Client**: Async UDP client using `rosc` crate
15-
- **AbletonOSC**: Python Remote Script running inside Ableton (bundled as git submodule)
14+
- **OSC Client**: Async UDP client using `rosc` crate, lazy-initialized via `OscHandle`
15+
- **AbletonOSC**: Python Remote Script running inside Ableton (bundled as git submodule, [our fork](https://github.com/christopherwxyz/AbletonOSC))
1616

1717
### Why OSC?
1818

19-
Ableton's Python API (Live Object Model) runs inside Ableton's sandboxed Python interpreter. External processes cannot call it directly. AbletonOSC bridges this gap via UDP/OSC on ports 11000 (send) and 11001 (receive).
19+
Ableton's Python API (Live Object Model) runs inside Ableton's sandboxed Python interpreter. External processes cannot call it directly. AbletonOSC bridges this gap via UDP/OSC on port 11000.
20+
21+
### Lazy OSC & Multi-Instance Support
22+
23+
`AbletonServer::new()` is sync and infallible — no sockets are opened until the first tool call. This ensures the MCP handshake always succeeds even when Ableton is not running.
24+
25+
The OSC layer uses a single UDP socket per instance (ephemeral port, no fixed port). Our AbletonOSC fork replies to the sender's actual address instead of hardcoded port 11001, so multiple remix-mcp instances (e.g. Claude Desktop + Claude Code) can control Ableton simultaneously without port contention.
2026

2127
## Development Commands
2228

@@ -67,7 +73,7 @@ src/
6773
├── error.rs # Error types
6874
├── installer.rs # AbletonOSC installer logic
6975
├── osc/
70-
│ ├── client.rs # Async UDP OSC client
76+
│ ├── client.rs # OscClient (single-socket UDP) + OscHandle (lazy init wrapper)
7177
│ ├── message.rs # OSC message helpers
7278
│ └── response.rs # FromOsc trait for parsing responses
7379
├── tools/

0 commit comments

Comments
 (0)