Skip to content

MCP setup

barline’s AI collaborator is external by design — there is no in-app chat, and that is permanent. The AI is whatever MCP client you already live in (Claude Code, Claude Desktop), connected to the studio’s MCP server. It edits the same document you edit, and its changes land at the next bar like any other edit.

The MCP endpoint is /mcp on the product origin. Add it to Claude Code with:

Terminal window
claude mcp add --transport http barline https://barline.dev/mcp

For a local studio it’s the same path on your dev origin:

Terminal window
claude mcp add --transport http barline http://localhost:3000/mcp

The transport is Streamable HTTP, stateless per request — every call builds a fresh server, so it works without session pinning.

Production MCP is secured by OAuth 2.1 (ADR-016): the client performs dynamic client registration and a browser authorization flow on first connect, so a tool call acts as you and writes are scoped to songs your org can edit. Public songs are readable; writes are member-only — exactly the same gate the editor uses.

Locally against wrangler dev, the handshake also works over plain HTTP for development.

The server ships instructions to every client on connect — a collaborator guide covering the edit → hear → iterate loop, the core API surface, and electronic/techno mixing priors. So a fresh session already knows how a barline song is shaped and how to drive it, without you pasting context.

From there the model has tools to read and edit the song’s files, drive the transport, and read the live mix — and the listening loop closes the feedback cycle.