Generate a dbt Cloud service token with the 'Jobs > Run' permission from Account Settings > API Access; store it in an environment variable
POST to https://cloud.getdbt.com/api/v2/accounts/{account_id}/jobs/{job_id}/run/ with header Authorization: Token YOUR_SERVICE_TOKEN and body {"cause": "triggered by pipeline"}; the response contains a run object with an id field
Poll GET https://cloud.getdbt.com/api/v2/accounts/{account_id}/runs/{run_id}/ every 30 seconds; check the status field — 1=queued, 2=starting, 3=running, 10=success, 20=error, 30=cancelled
On status 10 (success), retrieve the run artifact manifest using GET https://cloud.getdbt.com/api/v2/accounts/{account_id}/runs/{run_id}/artifacts/manifest.json
Optionally download sources.json or run_results.json from the same artifacts endpoint path to obtain test outcomes and model timing information for downstream quality gates
Known gotchas
Status codes for dbt Cloud runs are numeric integers, not string labels; comparing the status field to a string like 'success' will always evaluate as false
The API returns a 200 even when the job is still running; completion must be detected by polling the status field, not by assuming the trigger response reflects the final job state
Artifact endpoints return the artifacts from the most recent run of that job by default when no run ID is specified; always include the run_id in the path to fetch artifacts from a specific run
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp