Automate Aubergine: the API, events, webhooks and MCP
A program of yours can do what the page does: arrange canvases, start terminals, read them and type into them, follow what happens. It does so with a token you make, with exactly the rights you give it.
An API token
Make one in the page (the palette, then API tokens) or with aubergine token create. You name it and choose its scopes. The secret is shown once; Aubergine keeps only a hash of it. Revoking stops it at once.
Send the secret as a bearer credential to the server on 127.0.0.1. GET /v1 needs no scope and says what this server can do and what the token may.
TOKEN=$(aubergine token create "build script" --scope read --scope sessions:write --expires 30d)
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:4600/v1/canvases
What a token may do
readsees canvases, terminals, layout and notes, and follows changes. It does not read what a terminal shows.sessions:writestarts plain shells and moves, renames, tags and parks terminals. Starting one with a command also needsterminal:input.terminal:readreads screens and output, secrets on them included.terminal:inputtypes, which means it can run any command on this computer as you. Each is limited, when the token is made, to every terminal, some canvases or a tag, and a terminal marked people only is closed to every token.notes:write,runs:write,tasks:write,workflows:write,messages:readandmessages:writecover notes, workflow runs, proposing tasks, proposing workflows and steps (drafts you review, unless you switched review off for that token), and messages between terminals.- No token, whatever its scopes, can make or revoke tokens, read the activity log, change settings, accept a draft, approve a run, or touch terminals outside Aubergine.
Every call made with a token is one line of the activity log: who, what and how it ended, never the secret and never what was sent or typed.
Follow what happens: the event stream
GET /v1/events is a stream of server-sent events: every change to a canvas, a terminal, a run or a task that the token may see. Each event has an id; a program that comes back with Last-Event-ID is sent what it missed, or is told plainly, with reset, that it cannot be and should read the state again. Two scripts with no dependencies show how, in examples/events; the guide says which changes are worth reacting to.
Be told at an address: webhooks
A rule can send a webhook when something happens, such as a terminal starting to wait for you, its agent finishing, or a command failing. Where it goes is written by hand in the settings file, with a secret; the rule names it. The message is one POST of JSON with fixed fields, signed with HMAC-SHA256 in the X-Aubergine-Signature header, and it never holds what a terminal showed. It is sent once and never again; after five failures in a row the rule's webhook is given up until you switch the rule off and on. The webhook guide has the body, the signature and a receiver that checks it. Tried against a receiver on the same computer only.
Tools for agents: the MCP server
aubergine mcp is an MCP server on standard input and output that offers the API as tools to an agent or any MCP client. It decides nothing itself: it lists the tools its credential can use and passes every call to the server. With a terminal's own credential an agent gets its own work only (its workflow, its notes, saying that it needs you); with an API token it gets what that token's scopes allow.
What a terminal shows, a note or a search match comes back marked as other people's text and not as instructions. That lowers the chance that a model obeys it; it does not remove it.
There is no tool for what is yours alone: tokens, settings, people only, accepting drafts, the activity log. MCP over HTTP is planned, not built.
Reference and a client
Every route is in the API reference, generated from the routes' own declarations, and the running server describes itself at /v1/openapi.json. The API is only added to: nothing is renamed or removed. A typed client with no dependencies is in the repository under client/; it is not published as a package yet.
Limits
Calls are limited per token, and typing per terminal as well: 60 input calls and 20,000 characters a minute, 4,000 characters in one call. Beyond a limit the answer is 429 with Retry-After, or 413. The limits are in the settings file.
Related: the aubergine command · security · all documentation
En marcha en cinco minutos
Necesitas macOS con tmux 3.2 o posterior y Node.js 22 o posterior. brew install tmux node instala ambos.
npm install -g @meatgarden/aubergine