beat-twin
This server provides read-only Bitwig session inspection and plan-only arrangement suggestions.
Inspect overall session state: transport, tracks, scenes, selected device, and remote controls.
Generate plan-only arrangement suggestions from the current read-only Bitwig snapshot.
Query transport tempo, playhead position, and playing status.
Read status for the current 8-track bank window, including volume, pan, mute, and solo.
List available scenes and get loop/playing-step info for the focused cursor clip.
Read the selected track’s status and the selected device’s status and remote-control parameters.
List devices on a visible track by track index (0–7).
Inspect Bitwig’s popup browser status and list visible browser results.
Provides tools for inspecting and controlling Bitwig Studio sessions, including transport, tracks, scenes, devices, and remote controls, with a read-only mode by default and optional write policies for transport, mixer, clips, scenes, devices, and application actions.
Click on "Deploy 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., "@beat-twin what's the current project tempo and time signature?"
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.
Beat Twin
Optional Bitwig MCP search_tools / call_tool:
see tool discovery. Activate with
BITWIG_MCP_TOOL_DISCOVERY=1; write policies remain separately controlled.
Beat Twin is an experimental, local-first orchestration layer between musical agents and DAWs.
Its current repo contains four working musical surfaces:
a Bitwig Studio MCP bridge with explicit write-policy gates;
a standalone browser NanoDAW built on the canonical Beat Twin song and command models;
a secure browser Bitwig Remote that reuses the current MCP policy and authenticated controller path without exposing secrets to React;
a NanoDAW MCP planning surface that prepares instrument-track and MIDI-clip plans for explicit review and confirmation in the browser, without Bitwig.
The DAW/agent contracts, transactional NanoDAW memory adapter, LiteRT-LM provider, Gateway security core, loopback HTTP API, authenticated browser WebSocket proxy, connected Agent mode, and bounded Bitwig adapter are implemented and covered by deterministic tests. The separately confirmed live NanoDAW/Bitwig proof and installable runtime packaging remain gated work.
What Works
Read-only session inspection for transport, tracks, scenes, selected device, and remote controls.
Plan-only arrangement suggestions based on the current read-only Bitwig snapshot.
A short read-only live smoke that separates TCP/controller setup failures from session-inspection failures.
Transport, mixer, clip, scene, device, and application write tools, hidden and blocked by default.
A Bitwig controller script that speaks JSON-RPC over a local TCP connection.
A loopback same-origin React Bitwig Remote for session inspection and explicitly confirmed restart/play/stop commands when transport writes are enabled.
Offline protocol and policy tests that run without launching Bitwig.
A browser NanoDAW for command-first song sketches, Tone.js audition, note editing, pattern tools, keyboard shortcuts, local undo/redo, JSON save/load, visible timeline feedback, a local command palette, and deterministic command drafts.
A browser-owned live runtime with one persistent clock, quantized launcher, step editor, and atomic MIDI loop recording/overdub.
Atomic
ExecutableBeatTwinCommand[]batches with monotonic revisions, stable errors, and idempotent request IDs.A versioned
DawAdaptercontract with fake-adapter conformance tests.Strict
SongPatchV1validation, deterministic compilation, and mutation-free preview.A
NanoDawAdaptermemory port plus an abstract browser-owned proxy boundary.A real S25 LiteRT-LM capture of the exact three-tool runtime request, plus a strict provider loop bounded to four steps; G1 passed with
gemma4-e2bon 2026-07-14.A fail-closed Gateway core for hashed pairing tokens, quotas, immutable plans, short-lived single-use confirmations, and redacted audit events.
A loopback-only Gateway HTTP API with strict pairing, target-fixed preview/confirmation/execution, and process-lifetime terminal uncertain-outcome readback.
A typed
@beat-twin/gateway-httpdelivery package, an explicitapps/nanodaw-mcpcomposition root, and CI-enforced workspace dependency direction.An authenticated browser WebSocket proxy and explicit connected Agent mode that preserve the browser as the only NanoDAW song owner.
A bounded
bitwig-launcher-v1adapter with authenticated writes, fixed target identity, strict musical bounds, and exact note readback in deterministic tests.Bounded, clock-injected process-lifetime retention for command, adapter, Gateway, MCP review, and browser performance registries. Restart never triggers automatic mutation replay.
Related MCP server: io.github.peterkolbe/ableton-for-ai
Architecture
The current Bitwig MCP path is:
MCP client
-> Node.js MCP server (index.js)
-> local TCP JSON-RPC bridge on 127.0.0.1:8888
-> Bitwig controller script
-> Bitwig StudioThe Node process is the MCP server. It connects to the Bitwig controller on demand through BITWIG_HOST and BITWIG_PORT.
The local browser Bitwig Remote reuses the same implementation contract:
React Bitwig Remote
-> same-origin Vite loopback endpoint
-> current MCP tool registry and policy
-> authenticated local TCP JSON-RPC bridge
-> Bitwig controller scriptIt exposes no provider key or bridge secret to the browser. See
docs/BITWIG_WEB_REMOTE.md.
The browser NanoDAW foundation now lives alongside the MCP bridge:
apps/playground
-> @beat-twin/commands
-> @beat-twin/core
-> @beat-twin/audio-tone browser audition
-> localStorage JSON save/loadThe 187-tool Bitwig MCP bridge (including the original 57 tools) is maintained in index.ts; index.js is its
committed, generated runtime entry point for the npm package and MCP clients. The portable BitwigAdapter lives separately under
packages/adapters/bitwig and receives the shared authenticated RPC primitive
through an injected port. The capability guides cover
inspection and navigation,
launcher construction,
transport and cues, and
sound and mix, and
API 15 parity, and
musical extensions and MIDI, including controller upgrades and
readback limits, plus project save requests and persistence evidence. The historical parity inventory
tracks remaining work.
Browser audition is local Web Audio preview, not a
Bitwig mutation or MCP write.
Browser save/load is also local NanoDAW state, not a Bitwig mutation.
Browser pattern tools are local document edits for duplicate, quantize, and transpose.
Browser undo/redo restores local NanoDAW command snapshots only.
Browser keyboard shortcuts invoke existing local NanoDAW actions only. After
entering the full workspace, the visible Shortcuts control or ? opens an
inline reference that closes with Escape and restores trigger focus. The guide
never appears automatically on first run. Inspector Compact mode changes only
presentation density and leaves preview/live audio state untouched.
Browser timeline feedback is derived from local song state and does not call Bitwig.
Browser command palette actions reuse the same local NanoDAW action boundary.
Browser command drafts parse known local phrases only; they are not an AI chat path.
The standalone NanoDAW MCP path is separate from the historical Bitwig MCP:
MCP client
-> apps/nanodaw-mcp
-> @beat-twin/nanodaw-mcp + @beat-twin/gateway-http
-> immutable plan -> browser review -> human confirmIt exposes catalog, inspection, and plan-preparation tools only. It never owns
song state and has no confirmation or execution tool. See
docs/NANODAW_MCP.md.
The Agent architecture keeps the browser as the only owner of NanoDAW song state and puts Beat Twin on the laptop between the UI, the phone-hosted model, and the selected DAW adapter:
NanoDAW Agent mode
-> Beat Twin Gateway on the laptop
-> LiteRT-LM OpenAI-compatible API on the S25
-> validated SongPatch
-> ExecutableBeatTwinCommand[]
-> side-effect-free preview
-> explicit human confirmation
-> NanoDawAdapter | BitwigAdapter
-> verifiable execution reportGemma may only list targets, inspect the selected session, and propose a
bounded SongPatchV1. Confirmation and execution are gateway/UI operations;
they are never model tools. The TOOL_SPECS registry preserves the original 57 tools and adds 130
inspection, construction, transport, arranger, sound and mix tools. This registry is separate from the portable agent language. See
docs/LOCAL-LLM-TOOL-ORCHESTRATION.md.
The provider, security core, typed loopback HTTP/WebSocket delivery, explicit NanoDAW MCP application, browser connected-mode wiring, architecture guard, and bounded process-lifetime retention are implemented. Live S25 plus Bitwig dual-target proof, restart-durable Gateway recovery, and installable packaging remain separate follow-up gates.
The preview-only RTX-to-Bitwig composition can be started with
pnpm gateway:rtx-bitwig-preview. It performs real controller inspection,
bounded Gemma 4 E4B proposal generation, compilation, and immutable preview while
omitting confirmation and execution routes. See
docs/RTX_BITWIG_PREVIEW_RUNTIME.md.
The separately gated dual-target runtime uses one Gemma 4 E4B proposal to prepare
independent NanoDAW and Bitwig plans with target-specific previews and
confirmation domains. See
docs/DUAL_TARGET_RUNTIME.md.
Run NanoDAW Agent mode with MUE
MUE exposes the adopted daily model as gemma4_e4b and requires its LAN API key for chat
completions. Keep the key on the local machine and load it into the Gateway
process without printing it:
export LITERT_API_KEY="$(
ssh -F "$HOME/.ssh/config" rtx \
'cat ~/.config/mue/llama-api-key'
)"
BEAT_TWIN_ALLOWED_ORIGINS=http://127.0.0.1:5174 \
LITERT_BASE_URL=http://mue.orbit:8003/ \
LITERT_MODEL=gemma4_e4b \
pnpm gateway:rtx-dual-targetThe local SSH configuration in this setup names MUE rtx and uses the
taenia account. Start the Playground at http://127.0.0.1:5174, enable
Agent mode, connect to the local Gateway, enter a musical request, and choose
Generate preview. The Gateway creates the immutable plan; NanoDAW remains
the owner of song state and requires a separate Confirm and apply once.
Requirements
Node.js 26 or newer (
package.jsonenforces>=26.0.0; CI runs Node 26)pnpm 11.10.0 through Corepack
Bitwig Studio for live/manual verification
If Node is older than 26, stop before installing dependencies. The workspace is
outside its declared runtime contract. pnpm reports an Unsupported engine
warning by default, or an install error when engine-strict is enabled; a
green install on an older Node runtime is not evidence of support. Upgrade Node,
then let Corepack activate the repository-pinned pnpm:
node --version
corepack enable
corepack prepare pnpm@11.10.0 --activate
pnpm --versionInstall
pnpm installRun
node index.jsConfigure your MCP client to run that command from this repository. A portable example lives in llm-mcp/mcp.example.json.
The browser controller is available from Open Bitwig Remote in the
playground started by tp up, or through pnpm nanodaw:dev. It is read-only by
default; its server-side transport policy and live-write gate are documented in
docs/BITWIG_WEB_REMOTE.md.
Codex example:
codex mcp add beat-twin --env BITWIG_HOST=127.0.0.1 --env BITWIG_PORT=8888 -- node /absolute/path/to/beat-twin/index.jsInstall The Bitwig Controller
The current controller requires controller API 15 or newer. Earlier port tranches selected API 10. The API audit uses the official documentation bundled with installed Bitwig Studio 6.1.1; live compatibility acceptance is still pending. See API coverage.
Copy the controller script into your Bitwig controller scripts directory.
Linux example:
mkdir -p "$HOME/Bitwig Studio/Controller Scripts/BeatTwin"
cp bitwig-controller/BeatTwin/BeatTwin.control.js "$HOME/Bitwig Studio/Controller Scripts/BeatTwin/BeatTwin.control.js"macOS users commonly use:
$HOME/Documents/Bitwig Studio/Controller Scripts/Windows users can copy bitwig-controller/BeatTwin into:
%USERPROFILE%\Documents\Bitwig Studio\Controller Scripts\Then open Bitwig Studio and add the controller manually:
Beat Twin -> Beat TwinIf Bitwig was already open before installing the file, restart Bitwig or reload
the controller settings before testing the bridge. See docs/LOCAL_MCP_SETUP.md
for local verification commands and troubleshooting.
Safety Model
Beat Twin is read-only by default. At the MCP entry point, write tools are not listed by MCP clients and are blocked without an enabling policy. The Bitwig controller connects out to a fixed loopback relay without a secret. The dual-target Gateway starts that relay automatically; for standalone MCP or preview mode, run pnpm bridge:local first. Install the current controller script: older controllers still listen on port 8888 and require their old secret. See local bridge setup.
The Agent Gateway does not expose these Bitwig MCP write tools to Gemma.
It validates a constrained SongPatch, materializes executable IDs, previews the
exact plan without mutation, and requires a short-lived human confirmation.
The bitwig-launcher-v1 adapter now authenticates, validates one bounded empty
launcher target, binds every mutation to its confirmed identity, and requires
tempo/clip/note readback. Its first live write belongs to the separately
confirmed BT-213 disposable-project proof.
To enable a narrow write class:
BITWIG_MCP_WRITE_POLICY=transport node index.jsTo enable multiple write classes:
BITWIG_MCP_WRITE_POLICY=transport,mixer_write node index.jsTo enable every write class for disposable test sessions only:
BITWIG_MCP_ENABLE_WRITES=1 node index.jsThis includes the new midi_write and audio_capture policies. MIDI requires the
separate optional MIDI controller profile; Ear requires an explicitly configured
local service. See musical extensions and the
deferred live acceptance plan.
Use write mode only in a disposable Bitwig project or a copy of real work.
Tests
Run the offline checks:
pnpm test
pnpm check:architectureRun a syntax check:
node --check index.jsRun the short read-only live smoke after Bitwig has loaded the controller:
pnpm smoke:read-onlyThis checks TCP connectivity first, then returns a compact read-only session summary. It does not enable write tools or mutate Bitwig.
Run the browser NanoDAW checks:
pnpm nanodaw:test
pnpm test:playground
pnpm --filter @beat-twin/playground build
pnpm --filter @beat-twin/playground test:e2eThe Playwright smoke covers the focused first-run entry, voluntary shortcut
help, Escape focus recovery, and adaptable Inspector density during preview on
desktop and a 390-pixel mobile viewport. It also covers the disconnected,
policy-locked Bitwig Remote and proves that this state sends no command POST.
Install Chromium once with
pnpm --filter @beat-twin/playground exec playwright install chromium when a
machine does not already have the matching browser binary.
Live tests require Bitwig Studio, the controller script, and explicit write permissions. They are intentionally separate from the default test suite.
Useful Docs
Status
Beat Twin is an experimental local integration, not a hardened production tool. It is published as an open-source foundation for safe, inspectable, DAW-agnostic music-agent experiments.
License
MIT
Integration verification (2026-09-12)
MUE authentication and TypeScript Gateway entrypoints are integrated on the current NanoDAW base. Offline checks do not demonstrate live inference or DAW execution. If the bundled Playwright browser is unavailable, use an installed Chrome for the existing desktop/mobile suite:
CI=1 PLAYWRIGHT_CHANNEL=chrome pnpm --filter @beat-twin/playground exec playwright test --workers=2 --retries=0NanoDAW Agent V2 (PR #70)
pnpm nanodaw:agent composes an opt-in NanoDAW-only SongPatchV2 provider in
apps/nanodaw-mcp. TWIN discovers pending external MCP proposals for explicit
review and human confirmation. See docs/NANODAW_MCP.md. Rendered-browser,
real-provider and human listening acceptance remain unverified for this slice.
Source and distribution boundaries
The root npm package distributes the Bitwig MCP bridge, controller and its operator diagnostics. It does not package the full NanoDAW browser app, Gateway or S25 development workspace.
Edit
index.tsandbitwig-controller/BeatTwin/BeatTwin.control.ts.node --experimental-strip-types scripts/build-bridge.tsregenerates their committed.jsdelivery files. Bitwig requires its ES5-compatible controller output; the npm executable remainsindex.js.Other existing
.jsfiles underscripts/are historical maintained tools, not generated bridge artifacts. In particularmcp-diagnostics.jsandread-only-smoke.jsare distributed operator tools; capture/provider/live scripts are repository workflows and require their documented prerequisites. New maintained scripts use TypeScript. Do not regenerate or rename legacy scripts as part of an unrelated runtime update.From a source checkout,
npm run smoke:distributionbuilds the bridge, packs with lifecycle scripts disabled, extracts to a temporary directory, verifies required artifacts and uses the installed SDK to initialize the packed executable and list tools. It never connects to Bitwig, runs musical tools, installs dependencies or publishes. Temporary files are removed on success or failure.This smoke checks distribution contents and MCP startup with the existing local dependency installation. It is not a clean-network npm installation, browser packaging, live controller test or proof of DAW writes.
NanoDAW can download a local Standard MIDI File from Settings → Export MIDI. See MIDI export for timing, channel and scope limits. NanoDAW also previews a local MIDI file and appends its tracks only on explicit acceptance; MIDI import documents the supported subset and tempo/Undo behavior.
Android preview
An offline Android host for the standalone NanoDAW is being developed in
apps/android. See build instructions and remaining device acceptance.
Available Tools
14 toolsbitwig_arrangement_planB
[policy:read] Plan-only arrangement suggestion from the read-only Bitwig session snapshot
Inputs: goal, style, targetLengthBars.
bitwig_session_inspectA
[policy:read] Read-only inspection of Bitwig transport, tracks, scenes, selected device, and remote controls
Inputs: no named parameters.
browser_get_statusB
[policy:read] Get the Bitwig popup browser status
Inputs: no named parameters.
browser_list_resultsA
[policy:read] List visible results in Bitwig's popup browser
Inputs: no named parameters.
clip_get_infoA
[policy:read] Get loop and playing-step info for the focused cursor clip
Inputs: no named parameters.
device_get_remote_controlsA
[policy:read] Get the 8 remote control parameters for the current page
Inputs: no named parameters.
device_get_statusA
[policy:read] Get status of the currently selected device
Inputs: no named parameters.
device_listB
[policy:read] List devices on a visible track
Inputs: trackIndex (required).
scene_listB
[policy:read] List available scenes in the current bank
Inputs: no named parameters.
track_bank_get_statusA
[policy:read] Get status (vol/pan/mute/solo) of all 8 tracks in the current bank window
Inputs: no named parameters.
track_selected_get_statusA
[policy:read] Get status of the currently selected track
Inputs: no named parameters.
transport_get_positionA
[policy:read] Get current playhead position in beats
Inputs: no named parameters.
transport_get_tempoA
[policy:read] Get the current tempo (BPM)
Inputs: no named parameters.
transport_playing_statusA
[policy:read] Check if transport is currently playing
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools target distinct resources (arrangement, session, browser, clip, device, scene, track, transport), but 'bitwig_session_inspect' is broad and could overlap with track/device status tools, though descriptions clarify its role.
All tools follow a consistent pattern: domain prefix (bitwig_, browser_, clip_, etc.) plus descriptive snake_case verb phrase, making the surface predictable and easy to navigate.
With 14 tools covering key aspects of a DAW (arrangement, transport, tracks, devices, clips, browser), the count is well-scoped for a read-only integration.
The read-only surface covers inspection of many elements, but lacks write/mutate tools for actual control, and the 'plan' tool suggests a gap where no apply tool exists.
Maintenance
Related MCP Connectors
Remote MCP server for audio stem separation, denoise, reverb, and MIDI export.
MCP server for Producer/Riffusion AI music generation
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Create, co-edit, analyze, publish, and export collaborative step-sequencer sessions through MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control and monitor Bitwig Studio in real-time using natural language commands through MCP and OSC.ISC
- AlicenseAqualityDmaintenanceMCP server that bridges Ableton Live with AI models, enabling real-time project inspection and control such as track overview, device parameters, and audio analysis.121MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that exposes Ableton Live control (session state, transport, tracks, devices, clips, MIDI note editing) as tools for LLM agents, enabling natural language manipulation of a Live session.1MIT
- AlicenseBqualityDmaintenanceLocal MCP server for inspecting and controlling Ableton Live through a local HTTP bridge. Enables LLMs to perform production workflows like MIDI import, track editing, mixing, mastering, and export.5920 npmMIT