Skip to content

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.

  1. Create a personal API token at app.sqlanvil.com → API tokens (shown once).
  2. Add the server to Claude Code:
Terminal window
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.

ToolWhat it does
list_projects / get_projectYour projects; config, warehouse connection, per-branch catalogs
list_workflowsEach workflow’s selection, schedule, release mode, enabled state
list_runs / get_runRun history with filters; full per-action detail + log
get_run_failureThe debugging bundle: failed actions with executed SQL + verbatim errors
list_releasesPinned compilation snapshots (branch, environment, commit, core version)
run_workflow_nowEnqueue an immediate run; returns a run id to poll
cut_releaseCompile the branch head into a new pinned snapshot
refresh_catalogRecompile a branch’s tag/action/environment catalog
set_workflow_enabledPause 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).

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.