Headless Operations
Operate Thoth without a dashboard using thothctl, the Thoth Control Plane API, and your existing CI/CD workflows.
Use this guide when you want to run Thoth with a code-first operating model and no dashboard dependency.
Operating model
- Git repopolicy + deployment config
- CI/CDthothctl + API automation
- Thoth Control Planesettings + integrations
- Managed endpointsthoth runtime + MCP traffic
- Security stackSIEM/SOAR + approval systems
1) Configure control-plane auth for automation
THOTH_API_KEY is the recommended CI/CD auth path.
Keep THOTH_TENANT_ID and THOTH_API_KEY set explicitly in automation, so an interactive login
on the same machine never changes which workspace a pipeline targets.
For interactive admin sessions on a dedicated tenant, bootstrap a bearer session:
On a trial or self-serve workspace, sign in with no options. THOTH_TENANT_ID, like
--tenant-id, overrides the workspace the sign-in finds, so clear it first in a shell where it is
set:
You sign in in the browser and copy the sign-in code from the page it opens. thothctl finds your
workspace and saves it with the session, so later commands use it when --tenant-id and
THOTH_TENANT_ID are both unset. In the examples below, --tenant-id "$THOTH_TENANT_ID" is then
empty and selects the saved workspace; you can also leave the flag out.
Commands that need a second factor
Some admin commands, such as thothctl api-keys create, need a recent second factor. A
signed-in session gets one through the browser: the command prints a link and opens it, you
confirm on that page with your authenticator, and the command continues. For the next 15 minutes
that one thothctl session can run such commands without asking again; other devices and
sessions are not affected. If you did not just run a command, do not confirm the link.
API keys do not use this step: they act within the permissions they were created with.
2) Bootstrap baseline governance
3) Enable strict Secrets Broker for MCP/API tools
Use strict fail-closed mode so that, for allowed calls to the listed hosts, the credential is
resolved at request time from a managed secret backend and added as an auth header in the call's
headers argument, instead of being kept in the tool call or the endpoint's local environment.
This covers HTTP-style tool calls that carry a target host (url, uri, endpoint, host or
target). It does not remove a credential that a local MCP server already reads from its own
env or files. When the broker is on, the proxy refuses a call whose secret cannot be resolved,
unless the machine sets THOTH_SECRET_BROKER_FAIL_ON_MISSING_SECRET=false. The proxy reads these
settings from its environment (THOTH_SECRET_BROKER_*) or a settings file on the endpoint; see
Setting the broker from code for Terraform,
the MCP server and thothctl settings secret-broker, which also set agent and tool scopes.
Replace <stitch-host> with your Stitch API hostname.
4) Manage browser governance as code
5) Run endpoint-side policy sync
6) Verification checklist
thothctl bootstrap --jsonreturns success flags.thothctl settings get --jsonreturns expected baseline configuration.thothctl mdm list --jsonshows enabled provider records.thothctl endpoints list --jsonshows enrolled endpoints.thoth health --jsonon endpoints returns healthy status.- SIEM webhook test succeeds and evidence events are visible in your monitoring pipeline.
7) Evidence quality checks
Run these checks after rollout and periodically in CI:
Use thothctl evidence backfill only when you need to materialize missing governance evidence records for older events.
Rollout guidance
Use staged rollout in automation:
- Canary endpoints
- Pilot group
- Broad production rollout
Use your existing incident and rollback playbooks for any regression during rollout.