Skip to main content
Everything you can see on a run page, you can get from the ankra CLI and from the Ankra MCP server. The CLI is for you and your scripts. MCP is for the AI you work with: Claude Code, Codex, Cursor, the Claude app, or Ankra’s own chat.

The commands you will use every day

Run these from inside your repository’s checkout. The CLI resolves the pipeline from your origin remote and the commit from your HEAD, and says which it used. Outside a checkout, name the pipeline with --application <name> or --repository <id>.

Scripting: exit codes and JSON

Every command takes -o json, and the commands that wait exit with the verdict. That makes the CLI safe to put in a release script or another CI system. Without --wait, --watch or --exit-code, a read always exits 0, whatever the run’s outcome.

Scenario: wait for the run a push started

A push started the run, so your script has no run id. Select it by what you do know:
If the webhook lands a moment after you ask, --wait waits for the run to appear.

Scenario: react to every state change

--watch -o json prints one JSON object per line. The first lines are the current state, and the run’s conclusion is always the last line.

Scenario: gate a release on the pipeline

Scenario: debug a red run

Settings and capacity from the terminal

Approving authority is always a human act. A service token or an AI agent is refused, because approving grants whatever secrets, credentials and network the definition declares.

MCP: the tools an AI uses

Connect the MCP server once, and your AI client can read and reason about your pipelines. Every read tool works in Ask mode and with an mcp:read token.
Over MCP, watch_pipeline_run waits up to 45 seconds per call. It returns the concluded run, or timed_out: true with the run id. Your client calls it again with that id. Inside Ankra’s own chat the same tool registers a watch and wakes the conversation when the run concludes.
There is deliberately no MCP tool that approves a pipeline’s authority, and none that dispatches, cancels or re-runs an Ankra pipeline. An AI can explain, validate, convert and watch. Starting and approving runs stays with you and your scripts through the CLI.

Scenario prompts

These are prompts to type into your AI client once the MCP server is connected.
Watch the Ankra pipeline run for my-org/my-repo pull request 412. When it concludes, tell me which step failed and the likely cause from its log.
The AI calls watch_pipeline_run with owner, repo and the pull request, then get_pipeline_step_logs for the failing step.
Convert .github/workflows/ci.yml and release.yml into an Ankra pipeline. Validate the result and list every step you could not map.
The AI reads your workflow files, calls cicd_convert_workflow_to_pipeline, then cicd_validate_pipeline_yaml on the output. You review and commit the file.
Validate my .ankra/pipeline.yaml. I added a matrix to the test stage and a postgres service.
cicd_validate_pipeline_yaml returns every violation by key. A fatal cannot be planned. A warn names, for example, a stage kind with no executor yet.
Merge my-org/my-repo pull request 412 when its pipeline is green.
With an mcp:write token and a connection in Agent mode, the AI calls scm_merge_pull_request. Ankra records the request and merges only when the run, its gate, both reviews and the authority all pass. With a merge train, the pull request joins the train.
Look at the last Ankra pipeline runs on main for my-org/my-repo and tell me which steps take longest and whether the caches hit.
The AI reads the runs and step logs. Combine it with ankra pipeline get <run> --step <key>, which prints each cache’s outcome, size and time.

Next