MCP server
SQLAnvil Cloud exposes an MCP server (Model Context Protocol, Streamable HTTP) so AI agents can operate and debug your hosted projects directly: inspect run history, pull a failure’s executed SQL and verbatim warehouse errors, trigger workflow runs, cut releases, and refresh catalogs.
It is deliberately not an authoring surface — you edit and compile your project in your own repo with your own tools. The MCP covers what’s hosted: runs, workflows, releases, and their state.
Connect
Section titled “Connect”- Create a personal API token at app.sqlanvil.com → API tokens (shown once).
- Add the server to Claude Code:
claude mcp add --transport http sqlanvil https://app.sqlanvil.com/api/mcp \ --header "Authorization: Bearer sa_…"Any MCP client that speaks Streamable HTTP works the same way. Revoking the token in the dashboard cuts access immediately.
| Tool | What it does |
|---|---|
list_projects / get_project | Your projects; config, warehouse connection, per-branch catalogs |
list_workflows | Each workflow’s selection, schedule, release mode, enabled state |
list_runs / get_run | Run history with filters; full per-action detail + log |
get_run_failure | The debugging bundle: failed actions with executed SQL + verbatim errors |
list_releases | Pinned compilation snapshots (branch, environment, commit, core version) |
run_workflow_now | Enqueue an immediate run; returns a run id to poll |
cut_release | Compile the branch head into a new pinned snapshot |
refresh_catalog | Recompile a branch’s tag/action/environment catalog |
set_workflow_enabled | Pause or resume a workflow’s schedule |
Runs are asynchronous: operate tools return a run_id immediately; poll get_run for the outcome
(runs typically take one to a few minutes).
Data shapes
Section titled “Data shapes”Graph-adjacent payloads reuse the engine’s own JSON forms — action targets as schema.name,
compiled SQL as sqlanvil compile --json emits it — so an agent that already knows the CLI’s
output needs no second vocabulary. Everything an MCP tool returns is data the dashboard already
shows you, scoped to your account by your token.