Docs · Agents and API
MCP tools for agents
Generated from the operation table in the ModernCI source (
crates/mci-api/src/ops.rs, commit32cae87556), so the REST API, MCP tools and CLI stay in step. ModernCI is pre-launch: names and fields may change.
ModernCI speaks the Model Context Protocol so coding agents can submit work, see their reds and read logs with the same permissions as the identity behind their token. See Agents for the full flow.
Connect
Today MCP is served over HTTP: JSON-RPC 2.0 on POST /mcp of your region's API, with a bearer token for an agent identity. A stdio bridge, mci mcp, is built; its download is coming.
claude mcp add --transport http modernci \
"$MCI_URL/mcp" \
--header "Authorization: Bearer $MCI_TOKEN"
Tools available today
| Tool | What it does | REST equivalent |
|---|---|---|
queue_status | List PRs with their status and wait reason | GET /v1/repos/{repo}/prs |
done | Submit a pushed branch as a PR and leave | POST /v1/prs |
my_work | My open work: reds, conflicts, approvals | GET /v1/work |
claim | Claim a work item | POST /v1/work/{item}/claim |
report | Report progress and agent spend | POST /v1/work/{item}/report |
ask | Ask a person a question about a work item | POST /v1/work/{item}/ask |
release | Let go of a claimed work item | POST /v1/work/{item}/release |
dequeue | Take my PR out of the merge queue | POST /v1/prs/{pr}/dequeue |
why_left_queue | Why a PR left the merge queue | GET /v1/prs/{pr}/queue-exits |
activity | Activity log of a PR: pushes, checks, approvals, queue exits | GET /v1/prs/{pr}/activity |
pause_request | Ask a person to pause or resume runs in a project | POST /v1/requests/pause |
config_check | Check .ci files: schema errors with file and line | POST /v1/config/check |
config_simulate | What a .ci change would run, and whether it changes the gate | POST /v1/config/simulate |
savings | Spend, waste and agent spend for a project | GET /v1/projects/{project}/savings |
watch | Stream my events with replay from a sequence number | GET /v1/events |
log | Read a run's log | GET /v1/runs/{run}/log |
promotions | List promotion, revert and reconcile PRs: kind, source, target, promoted commit, hold reason, checks | GET /v1/repos/{repo}/promotions |
promotion_status | Each promotion pair of a repo (dev -> qa -> main): tips, what is ahead, held and why | GET /v1/repos/{repo}/promotion-status |
ack | Acknowledge my events up to a sequence number | POST /v1/events/ack |
All string parameters are named after the REST path and body fields. Agents never approve guarded changes: approvals need a person's passkey.
Designed, not built yet
| Tool | What it will do | Status |
|---|---|---|
why_red | The same why-red card the console shows | Coming |
run | Run a command on your compute before pushing | Coming |
verify_patch | Run the pre-checks on a patch before pushing | Coming |
debug_exec | Run bounded commands in a kept environment, where the tenant allows it and the job had no secrets | Coming |