MCP Server for Coding Agents
crow mcp runs a Model Context Protocol server over stdio.
It lets a coding agent such as Claude Code, Codex or Cursor find the pipeline for the code it pushed, read only the part of the logs that matters, follow a step while it runs, and wait for the result of a fix.
It is a debugging tool, not a general administration interface: it cannot touch secrets, registries, users or server settings.
-
Install the CLI
crow mcpis part of the regularcrowCLI, see CLI installation. -
Configure instances
With a single Crow server, the existing
CROW_SERVERandCROW_TOKENvariables are enough and no config file is needed.To use several servers from one agent session, add them with
crow server add:This writes
$XDG_CONFIG_HOME/crow/instances.yaml(usually~/.config/crow/instances.yaml), which the regular CLI uses as well:Each instance takes its token from one source: a token stored with
crow server login,token_env, ortoken_command. Instances without a token are skipped with a warning.token_commandruns on demand, its output is kept in memory only, and it is re-run once if the server rejects the token. Ifinstances.yamldoes not exist, the oldermcp.yamlnext to it is read. The path can be changed with--configorCROW_MCP_CONFIG, or the global--config/CROW_CONFIG. -
Register the server with your agent
For Claude Code:
Other agents take the same command (
crow mcp) in their MCP server configuration. Start the agent from inside the repository so the server can see the git checkout.
Finding the pipeline
Section titled “Finding the pipeline”Every pipeline-scoped tool accepts the same target, resolved in this order:
url: a Crow web URL such ashttps://ci.example.com/repos/3/pipeline/12/4, copied from the browser. The host must belong to a configured instance. Other hosts are never contacted.instanceandrepo(numeric id preferred, orowner/name), with an optional pipelinenumber.- Nothing: the git checkout of the working directory is used.
The server chooses the instance by the remote’s host (
upstreamfirst, thenorigin, then any other remote), looks up the repository and returns the newest pipeline per event for theHEADcommit, typically a push and a pull request pipeline. If there is none yet, it says so and shows the latest pipelines for the branch.
| Tool | What it does |
|---|---|
get_pipeline |
Pipeline status with failed steps first, each with a link to the step |
get_step_logs |
The last 200 lines of a step log (tail, max 500), or the matches of a regular expression (grep, with context lines), from the first failed step by default |
follow_step_logs |
Follows a running step: returns the lines after cursor as soon as there are new ones, or when the step finishes or timeout_seconds passes (default 60, max 300), together with the cursor for the next call, from the first running step by default |
list_pipelines |
Recent pipelines of a repository, optionally filtered by branch and status |
wait_for_pipeline |
Waits until the pipeline finishes (default 10 minutes, max 30) and returns its summary. Without a target it also waits for the pipeline of HEAD to appear after a push |
lint_config |
Lints local config files in the working directory (default .crow/) |
list_instances |
Shows the configured instances, never their tokens |
Two more tools are only available when the server is started with --allow-write (or CROW_MCP_ALLOW_WRITE=true):
| Tool | What it does |
|---|---|
restart_pipeline |
Restarts a pipeline and returns the link of the new run |
cancel_pipeline |
Cancels a running pipeline |
There is deliberately no tool to approve pipelines: approval is the human gate for untrusted changes.
Following a running step
Section titled “Following a running step”get_step_logs returns a snapshot of a log, which is enough once a step has failed.
To watch a step while it runs, an agent calls follow_step_logs in a loop:
-
Call
follow_step_logswithout acursor(or with theurlof the step) to get the output so far and acursor. -
Call it again with that
cursorand thestepit names. The call blocks until new lines arrive, so the agent does not need to sleep between calls. -
Stop once the result says
step finished, which also gives the step’s state and exit code.
Each call returns at most limit lines (default 200, max 500).
When more lines are new, the oldest are skipped and counted, and get_step_logs with grep can still search them.
Agents that work through a shell instead of MCP can stream the same log with crow pipeline log show --follow <repo> <pipeline> <step>, which prints new lines until the step finishes.
Security notes
Section titled “Security notes”- Build logs can contain text controlled by anyone who can open a pull request.
The server strips terminal escape sequences, wraps log output in
<untrusted-log>blocks and tells the agent not to follow instructions inside them. - Write tools are off by default. Enable them only for agents you trust to restart or cancel builds.
- Tokens are never written to disk by
crow mcpand never included in tool output. It only reads tokens stored bycrow server login. lint_configonly reads.yaml,.ymland.jsonnetfiles inside the working directory.