Skip to content
DAWMCPGet started

Make your web DAW work with agents

A step-by-step guide for teams building a DAW in the browser: the project model, the operations to expose, the Connect agent button and how to get listed in DAWMCP.

This page is for teams building a DAW or music app that runs in the browser. Follow it and a musician's agent (Claude Code, Codex, Cursor or Claude Desktop) can read the project open in your app, create tracks and write MIDI, with one click from the musician. The agent uses the same operations it uses in REAPER, Ableton Live or Logic Pro, so whatever the musician already asks of their agent works in your app too.

You add three things to your app:

  1. A project model an agent can address: a session ID, stable object IDs and positions in beats.
  2. Handlers for DAWMCP's operations: plain functions that read your project and change it.
  3. A Connect agent button that runs connectDawmcp from the dawmcp/bridge library.

Desktop DAWs and the rules behind each requirement are covered in Integrate your DAW.

How the connection works

DAWMCP runs on the musician's computer, started by their agent. Your page can't be reached from there, so your page connects out to DAWMCP on 127.0.0.1. Nothing goes through your servers or ours.

  1. The musician chooses Connect agent in your app.
  2. Your page connects to DAWMCP with the dawmcp/bridge library, which knows where to find it. It tells DAWMCP your app's ID and version, and which operations your page answers. DAWMCP checks that the page's origin is one you declared.
  3. The musician asks their agent something, such as "Write a bassline under the verse".
  4. The agent calls DAWMCP's operations, such as read_daw_session and write_daw_midi. DAWMCP checks permissions and inputs, then sends the same calls to your page.
  5. Your page answers with a snapshot or a receipt. DAWMCP checks it and returns it to the agent.

For the musician:

  • Once your app is listed in DAWMCP, connecting is one click on Connect agent. The first time, the browser asks to allow your site to reach apps and devices on their local network. After that, the browser is remembered and reconnects after reloads, project changes and agent restarts.
  • Until you're listed, the musician adds your declaration file once with npx dawmcp provider add. The first time their browser connects, your app shows a short line, such as "Connect Your DAW with code 482913", with a button to copy it. They paste it into their agent chat, and the agent connects the tab.

DAWMCP is read-only until the musician allows more. They grant editing on their computer; your app never implements permissions for DAWMCP.

Step 1: Model your project for an agent

An agent works from what it reads, then edits by ID. Before writing any connection code, make sure your project model has:

RequirementWhat it means in practice
A session IDOne ID per project, stored with the project. It stays the same across renames, reloads and copies being edited, and two projects never share one.
Stable object IDsEvery track, clip and device keeps its ID when others are added, removed, reordered or renamed. An array index isn't an ID.
Positions in beatsZero-based quarter-note beats from the start of the project, never seconds or pixels. Your app converts with its own tempo and meter maps.
One undo step per writeEach change the agent makes can be undone in one step, named after the request.
No side effectsA write never starts playback, opens a dialog, changes focus or depends on what the musician has selected. It acts on the IDs it was given.
The result, not "sent"After a write, read your project again and return the new state, including the ID of anything you created.

Step 2: Implement the operations

Each operation is a function in your app. The library calls it with input that DAWMCP has already checked, and checks what you return against DAWMCP's schema before sending it. Start with the first three; add the rest as your app supports them.

OperationInputReturnsMusician grants
read_daw_sessionnothingA snapshotReading (on by default)
create_daw_tracksessionId, name, type (midi or audio)A receipt with the new track's IDComposition
write_daw_midisessionId, trackId, name, startBeat, lengthBeats, notesA receipt with the new clip's IDComposition
control_daw_transportsessionId, action: play, stop, or tempo with bpmA receiptTransport
import_daw_audiosessionId, trackId, filePath, startBeatA receiptMedia
list_daw_plugins, list_daw_track_pluginssessionId, optional pagingDevices or effectsReading
insert_daw_plugin, set_daw_plugin_parametersessionId, trackId, device and parameter IDsThe inserted device, or the value read backMixing
read_daw_plugin_parameterssessionId, trackId, device IDParameters with normalized and display valuesReading

A note in write_daw_midi is {startBeat, durationBeats, pitch, velocity, channel}: startBeat counts from the clip start, pitch is MIDI 0–127, velocity is 1–127, and channel is 0–15 (default 0).

import_daw_audio gives a path on the musician's computer, which a browser page can't open. Leave it out unless your app has a way to receive local files.

The snapshot

read_daw_session returns the project as the agent should see it. The more of the musical frame you fill, the better the agent places things: "the second verse" only works if it can read your markers.

json
{
  "sessionId": "proj_8f2c41",
  "name": "Night drive",
  "version": "Your DAW 3.2.0",
  "bpm": 104,
  "playing": false,
  "tracks": [
    { "id": "trk_drums", "name": "Drums", "kind": "audio" },
    { "id": "trk_keys", "name": "Keys", "kind": "instrument", "instrument": "Electric Piano" }
  ],
  "selectedTrack": { "id": "trk_keys", "name": "Keys" },
  "capabilities": ["read", "createTrack", "writeMidi"],
  "observedAt": "2026-11-27T14:02:11.000Z",
  "frame": {
    "meters": [{ "atBeat": 0, "bar": 1, "numerator": 4, "denominator": 4 }],
    "tempos": [{ "atBeat": 0, "bpm": 104, "linear": false }],
    "markers": [
      { "id": "mk_intro", "name": "Intro", "startBeat": 0, "bar": 1, "endBeat": 32 },
      { "id": "mk_verse", "name": "Verse", "startBeat": 32, "bar": 9, "endBeat": 96 }
    ],
    "loop": { "startBeat": 32, "endBeat": 48 },
    "timeSelection": null,
    "playheadBeat": 36
  }
}
  • kind is instrument, midi, audio, folder or bus. With it, the agent never writes MIDI onto an audio track.
  • frame is optional, field by field. Tell DAWMCP which parts you fill when you connect (Step 3).
  • The library adds the daw field. Don't set it yourself.

What we'd like DAWs to show lists what else helps an agent, in priority order.

The receipt

Every write returns a receipt: the outcome, an ID for this write, the snapshot after the change and the ID of what was created.

json
{
  "status": "confirmed",
  "requestId": "w_5d1e",
  "createdId": "clip_31aa",
  "snapshot": { "sessionId": "proj_8f2c41", "...": "the snapshot after the change" }
}

When a write fails, throw an error with a message the musician would understand ("Track trk_bass no longer exists"). The library reports it to the agent as a failed call. Don't return a receipt for a write that didn't happen.

Step 3: Add the Connect agent button

Install the dawmcp package and import the browser library from dawmcp/bridge. It bundles everything it needs, and its TypeScript types match DAWMCP's schemas, so your editor checks your handlers.

ts
import { connectDawmcp, isRemembered, type DawmcpConnection } from "dawmcp/bridge"

let connection: DawmcpConnection | undefined

export async function connectAgent(project: Project) {
  connection = await connectDawmcp({
    provider: "your-daw", // the id in dawmcp-provider.json (Step 4)
    sessionId: project.id,
    app: { version: APP_VERSION, surface: "1.0.0" },
    // What your handlers can't show: the guarantees from Step 1 and the frame you fill.
    declaration: {
      session: {
        stableId: true,
        revision: true,
        writePreconditions: true,
        idempotentRequests: true,
        undoPerWrite: true,
      },
      frame: ["meters", "tempos", "markers", "loop", "timeSelection", "playhead"],
      trackKinds: true,
    },
    waitForAgent: true,
    onStatus: (status) => agentIndicator.show(status),
    onCode: ({ prompt }) => agentIndicator.showCopyLine(prompt),
    onClose: () => agentIndicator.show("disconnected"),
    operations: {
      read_daw_session: () => project.snapshot(),
      create_daw_track: (input) => project.createTrack(input),
      write_daw_midi: (input) => project.writeMidi(input),
    },
  })
}

Everything about the connection lives in the library: DAWMCP's address, the protocol and the browser's remembered key. You pass your app's ID and version, and your handlers:

  • operations has one handler per operation you implement. The library tells DAWMCP which ones you have.
  • declaration.session states the guarantees from Step 1. DAWMCP holds back writes until stableId, revision and writePreconditions are all true, and tells the agent why. Leave out any you don't keep.
  • declaration.frame and trackKinds say which parts of the snapshot you fill.
  • native lists extra typed tools specific to your app, each with a name, a description, the permission category it needs, a JSON Schema for its input and a handler.
ts
// When the musician opens another project, connect again for it.
// A remembered browser needs no code.
project.onSwitch(async (next) => {
  connection?.close()
  await connectAgent(next)
})

// On load, reconnect only a browser that has connected before.
if (isRemembered("your-daw")) connectAgent(currentProject)

Show the connection state somewhere small and always visible, such as an icon in your toolbar:

onStatusShow
connecting"Connecting to your agent…"
waiting-for-agent"Waiting for your agent. Start it, and allow local network access if your browser asks."
code-neededThe line from onCode, with a Copy for your agent button. Only before you're listed.
connected"Agent connected", with Disconnect (connection.close())

If the connection closes with BRIDGE_CLOSE.replaced, another tab of your app took over; show "Connected in another tab". connectDawmcp rejects with a DawmcpConnectError whose reason is unreachable, refused or cancelled.

Two rules for the button:

  • Connect only when the musician asks: on Connect agent, or on load once isRemembered is true. Never on a first visit. The browser's local network prompt must follow their own action.
  • Answer within a few seconds. DAWMCP gives each call five seconds. A write that times out counts as uncertain, and the agent reads the project before trying again.

Chrome asks once per site for local network access. Test every browser you support.

Step 4: Declare your integration

Describe your app in a dawmcp-provider.json file and publish it with your documentation. It holds only what DAWMCP has to trust before your page connects: who you are and where your app runs.

json
{
  "schema": "https://dawmcp.com/schemas/provider-v1.json",
  "id": "your-daw",
  "name": "Your DAW",
  "kind": "web",
  "homepage": "https://yourdaw.example",
  "connection": {
    "type": "browser-bridge",
    "origins": ["https://app.yourdaw.example"]
  },
  "setup": ["Open a project and choose Connect agent in the toolbar."],
  "contact": "https://yourdaw.example/support"
}
  • id is the provider you pass to connectDawmcp.
  • origins are the exact https origins your app runs on, with no path. DAWMCP refuses every other site.
  • setup is optional: what the agent tells the musician to do in your app.

Your operations, guarantees and native tools aren't in this file. Your page reports them each time it connects, from the handlers you pass, and DAWMCP checks them by the same rules. A new version of your app needs no new declaration file.

Check it:

sh
npx dawmcp provider check dawmcp-provider.json

The check confirms the file is valid. To see what DAWMCP does with your operations, connect a tab and ask the agent to list your app's capabilities: it reports which writes DAWMCP holds back and why.

Step 5: Try it end to end

  1. In any folder, set up DAWMCP for your agent: npx dawmcp setup.
  2. Add your declaration: npx dawmcp provider add dawmcp-provider.json.
  3. Start your agent, open your app and choose Connect agent. Allow local network access if the browser asks.
  4. Copy the line your app shows and paste it into the agent chat.
  5. Ask the agent: "What's in my session?", then "Create a Bass track and write a four-bar bassline under the verse."
  6. Check the result in your app, then undo it in one step.
  7. Reload the page and connect again: no code this time.

npx dawmcp doctor shows the connection, the connected site and the remembered browsers.

Step 6: Get listed

Once you're listed in DAWMCP, musicians skip the declaration file and the code: Connect agent is the whole setup. To be listed, your app:

  • connects only after the musician chooses Connect agent, or has connected before
  • passes npx dawmcp provider check with your published declaration
  • passes our test drive on a real project: create a track, write MIDI, read it back, undo, reload, switch projects, and recover from a dropped connection mid-write
  • serves only your own app on the origins it declares, never pages or scripts other people upload

Each listed app is marked experimental until a real session passes the test drive. To start, open an issue with your app, its origins and the operations you implement.

Agents in the cloud

The browser bridge serves agents running on the musician's computer. For Claude or ChatGPT on the web, run your own remote MCP connector instead, and implement the same operations on it. Online platforms explains when to choose which; many apps offer both.

Checklist

  • A session ID per project, stable IDs for tracks and clips, positions in beats
  • read_daw_session, with as much of the musical frame as you can fill
  • create_daw_track and write_daw_midi returning receipts with the new IDs
  • One undo step per write, no playback, dialogs or selection dependence
  • A Connect agent button and an always-visible connection indicator
  • Connect only after the musician asks, or once isRemembered is true
  • A dawmcp-provider.json that passes npx dawmcp provider check
  • Tested end to end in every browser you support