Development
Automata is a pnpm workspace with a Nuxt web app and a Telegram bridge. This page orients you before changing the source.
Repository layout
apps/
web/ Nuxt app: management UI and MCP endpoint
telegram-bridge/ Personal-account Telegram bridge
docs/ Source documentation
docker-compose.dev.yml Supporting services for local development
Start the supporting services from the local deployment guide, then run pnpm dev on the host so hot module replacement works.
Scripts
| Command | Purpose |
|---|---|
pnpm dev | Run the Nuxt app on the host |
pnpm services:up, :whatsapp, :telegram | Start service profiles |
pnpm services:down, services:logs, services:ps | Stop, inspect, and tail services |
pnpm typecheck | Type-check the web app |
There is no predev hook, so start the services your connector needs before pnpm dev.
Authentication paths
The two surfaces never share credentials:
- Management routes require the HTTP-only session cookie, stored as a SHA-256 hash in the
appschema. - The MCP endpoint accepts only a connector token, from
Authorization: Beareror the/mcp/<token>path, and never falls back to a session.
Invalid tokens receive 401 with WWW-Authenticate. A database outage returns 503, so a transient failure is never mistaken for a revoked token. See How Automata works.
Add an MCP tool
Tools live under apps/web/server/mcp/tools, grouped by connection kind.
- Define the tool in the folder for its kind, with a read, write, or destructive annotation.
- Register it for that kind only. Other kinds must never see it.
- Resolve the connection from the token, never from a tool argument.
- Enforce action scope and any chat or table allowlist on the server, before touching upstream data.
- Document it in the MCP tools reference.
Tool annotations only describe behavior to clients. The server-side gates are what enforce it, so new tools must pass through the same scope checks as existing ones.