Extend
Automation
Drive Bistro from scripts, chat apps, git and MCP clients.
Bistro can be driven from outside. Scripts call an HTTP API. Your phone talks to a chat bot. Git keeps your settings. MCP clients get tools. Every route is a fixed list, never a free command.
#HTTP API
The API listens on 127.0.0.1:8742. It starts on demand and uses no memory when nobody calls. The Settings page has an API card for tokens and webhooks.
bistro api token add ci --scope write --expires 90 # shown once
bistro api token list
bistro api status
bistro api disable
bistro proxy add api.example.com 127.0.0.1:8742 # publish it with HTTPSSend Authorization: Bearer TOKEN. Read tokens may use GET. Write tokens may also use POST. Each token gets 60 requests a minute. Every call goes to the audit log.
| Route | Does |
|---|---|
GET /v1/overview, /v1/health, /v1/apps, /v1/inbox, /v1/backups, /v1/events, /v1/heal | Read status |
POST /v1/apps/ID/start, stop, restart, update | Control an app |
POST /v1/inbox/ID/approve, dismiss | Answer an inbox item |
POST /v1/backups/NAME/run | Run a backup |
GET /v1/tools, POST /v1/tools/NAME | The assistant's tools over REST |
POST /mcp | MCP over HTTP |
A tool that changes something needs a write token and the tool set to allow in the assistant permissions. An API caller cannot be asked.
bistro aiperm perm set app_action allow#Inbound Webhooks
A webhook is a URL with a secret. It runs one fixed action: restart-app APP, update-app APP, run-backup NAME or approve-safe.
bistro api hook add nightly run-backup photos
bistro api hook list
bistro api hook remove nightly#Chat from Your Phone
Chat ops works with Telegram, Discord, Matrix or ntfy. It sends new inbox items with Approve and Deny buttons. You can send status, inbox, approve N, deny N and restart NAME. Other text goes to the assistant, under your permission rules. Messages from chats not on the allow-list are ignored.
bistro chatops setup telegram # settings on stdin, one per line
bistro chatops link # a pairing code, valid 10 minutes
bistro chatops test
bistro chatops status
bistro chatops unlink ID
bistro chatops removeSend pair CODE from the chat to allow it. Items not marked safe, such as reboot, need approve N yes.
#GitOps
Your config lives as plain files in a git repository, both ways. It holds bistro.conf, jobs, proxy and firewall rules, app specs, presets and notes. Secrets never go in. Lines with TOKEN, SECRET, PASSWORD or KEY stay out, and so do the vault and API keys.
bistro gitops init git@example.com:me/home.git
bistro gitops status
bistro gitops push
bistro gitops pull # checks, then applies; a conflict goes to the inbox
bistro gitops sync
bistro gitops auto on # sync every 15 minutes
bistro gitops removeA URL with a password in it is refused. Use an SSH key.
#Deploy from Git
An app's Source tab sets the branch, rolls back and previews branches. See Apps for the basics.
bistro apps deploy blog https://github.com/me/blog.git main
bistro apps redeploy blog
bistro apps releases blog
bistro apps rollback blog
bistro apps env blog set API_URL https://example.com
bistro apps preview blog feature-x
bistro apps hook blog on # push webhook, needs a domain
bistro apps hook blog previews onWith the hook on, a push to the app's branch redeploys it. The hook accepts a GitHub signature, a GitLab token or ?token=. Work runs one job at a time.
#Import Docker-Compose
Each service becomes one app. The id is the prefix plus the service name.
bistro apps import docker-compose.yml home#MCP Hub
The hub hosts MCP servers and gives you the client config. The catalog has Time, Fetch, Files, Git, SQLite, Memory, Sequential Thinking and Bistro itself.
bistro mcphub catalog
bistro mcphub add filesystem --folders /srv/data/docs
bistro mcphub list
bistro mcphub perm filesystem ask # read, ask or allow
bistro mcphub config filesystem --ssh me@server --client claude
bistro mcphub perm filesystem expose --domain mcp.example.com
bistro mcphub config filesystem --http
bistro mcphub key new
bistro mcphub remove filesystemBy default a server is private. The client starts it over SSH and nothing opens on the network. Expose serves it over HTTP with the hub key. See Ask Bistro for Claude Desktop.
#Several Machines
Fleet commands act on many machines. See Cluster.