Skip to content

MCP Server

The Colony MCP server (@colony/mcp) exposes Colony pipeline tools inside any MCP-compatible editor — file issues, check pipeline status, estimate costs, trigger retries, and inspect diagnostics without leaving your editor.

It connects directly to Colony’s Postgres pipeline store and the GitHub API. It runs in two modes:

  • Local stdio — launched by your editor as a child process on your machine.
  • Central HTTP — one shared container on the Colony VM, accessible to all pilot users over Streamable HTTP.

After installing Colony’s CLI, run:

Terminal window
colony mcp

The command reads DATABASE_URL and GITHUB_TOKEN from your environment (or Colony config) and starts the MCP stdio server. Configure your editor to run this command as the MCP server process — the editor manages the process lifetime.

Alternatively, use npx without installing the CLI:

Terminal window
npx @colony/mcp

This fetches and runs the MCP server directly; set the required env vars in the editor config.

For shared pilot deployments, start one MCP container on the Colony VM:

Terminal window
docker compose --profile mcp up -d mcp

Before starting, set MCP_AUTH_TOKEN in .env:

Terminal window
MCP_AUTH_TOKEN=$(openssl rand -hex 32)

Pilot users point their MCP clients at:

http://<vm-host>:9300/mcp

with an Authorization: Bearer <MCP_AUTH_TOKEN> header. Expose this endpoint only on a trusted network, VPN, or behind a TLS reverse proxy — the MCP tools can create issues and mutate pipeline state.


Add to ~/.claude/settings.json (global) or .mcp.json (per-project):

Using colony mcp (installed CLI):

{
"mcpServers": {
"colony": {
"command": "colony",
"args": ["mcp"],
"env": {
"DATABASE_URL": "postgresql://user:pass@host/db",
"GITHUB_TOKEN": "ghp_..."
}
}
}
}

Using npx @colony/mcp (no install required):

{
"mcpServers": {
"colony": {
"command": "npx",
"args": ["@colony/mcp"],
"env": {
"DATABASE_URL": "postgresql://user:pass@host/db",
"GITHUB_TOKEN": "ghp_..."
}
}
}
}

Add to .cursor/mcp.json (per-project) or ~/.cursor/mcp.json (global):

Using colony mcp (installed CLI):

{
"mcpServers": {
"colony": {
"command": "colony",
"args": ["mcp"],
"env": {
"DATABASE_URL": "postgresql://user:pass@host/db",
"GITHUB_TOKEN": "ghp_..."
}
}
}
}

Using npx @colony/mcp (no install required):

{
"mcpServers": {
"colony": {
"command": "npx",
"args": ["@colony/mcp"],
"env": {
"DATABASE_URL": "postgresql://user:pass@host/db",
"GITHUB_TOKEN": "ghp_..."
}
}
}
}

VariableRequiredDescription
DATABASE_URLYesPostgres connection string for Colony’s pipeline store
GITHUB_TOKENPAT auth onlyGitHub personal access token. Not needed when config uses GitHub App auth
MCP_TRANSPORTNostdio or http. Defaults to stdio
MCP_AUTH_TOKENHTTP mode onlyBearer token required by the HTTP MCP endpoint
MCP_HOSTNoHTTP bind host. Defaults to 0.0.0.0
MCP_PORTNoHTTP port. Defaults to 9300
MCP_PATHNoHTTP MCP path. Defaults to /mcp
MCP_CONFIG_PATHNoExplicit path to colony.config.yaml when not using the default search path
MCP_LOG_LEVELNoLog level (debug, info, warn, error). Defaults to info

All 9 tools are listed below. Arguments marked required must be provided; all others are optional. The repo argument always takes owner/name format (e.g. RunColony/colony).

Query work items and pipeline state. The view parameter selects the operation.

ArgumentRequiredTypeDescription
viewYesstringstatus: pipeline health and queue depth; list: browse issues with filters; diagnose: investigate a specific issue; findings: agent-recorded findings
repoRequired for diagnose, findingsstringRepository in owner/name format. Optional for status and list (omit for a cross-repo aggregate).
issue_numberRequired for diagnosenumberIssue number — required for diagnose; optional filter for findings
tenant_idNostringTenant external ID for ambiguous repo names — findings view only
stateNostringFilter by issue state — list view only
labelNostringFilter by label — list view only
sinceNostringStart date filter (ISO 8601) — list view only
untilNostringEnd date filter (ISO 8601) — list view only
limitNonumberMaximum items to return — list (default 50, max 200) or findings (default 100, max 200)
offsetNonumberItems to skip for pagination (default 0) — list view only
pr_numberNonumberPull request number filter — findings view only
statusNostringFilter by finding status (e.g. open, resolved) — findings view only
categoryNostringFilter by finding category — findings view only
severityNostringFilter by finding severity — findings view only

View descriptions:

  • status — pipeline health: worker availability, queue depth by task type, active issue count by state, and total cost for the current period. repo optional; omit for a cross-repo aggregate.
  • list — list issues filtered by state, with cost, cycle time, and assignees. repo optional for cross-repo queries.
  • diagnose — diagnose why an issue is in its current state: state history, block reason, execution telemetry, and actionable recommendations. Requires repo and issue_number.
  • findings — list agent findings for a repo or issue: observations, risks, and review findings. Requires repo.

File and enqueue an issue with Colony-aware formatting. Reads .colony/conventions.md from the target repo, applies appropriate labels, and validates scope.

ArgumentRequiredTypeDescription
repoYesstringRepository in owner/name format
titleYesstringIssue title
bodyYesstringIssue body in markdown
labelsNostring[]Additional labels to apply
complexity_hintNosmall | medium | largeComplexity hint for the analyzer

Cost and time estimate before filing. Takes an issue description and repo, returns estimated cost (USD), confidence level, and likely outcome.

ArgumentRequiredTypeDescription
repoYesstringRepository in owner/name format
descriptionYesstringIssue description to estimate
complexityNosmall | medium | largeOptional complexity tier filter for percentile computation

Get Colony’s review verdict on a PR. Returns the reviewer’s structured analysis: verdict, findings, and confidence.

ArgumentRequiredTypeDescription
repoYesstringRepository in owner/name format
pr_numberYesnumberPull request number

Perform an operator action on a work item. The action parameter selects the operation.

ArgumentRequiredTypeDescription
repoYesstringRepository in owner/name format
issue_numberYesnumberIssue number to act on
actionYesstringAction to perform — see table below

Available actions:

ActionDescriptionAvailability
pausePause processing; the issue can be resumed later.Always
resumeResume a paused issue.Always
cancelCancel the work item and close it.Always
retryRe-enqueue the current state’s executor after failure.Always
reimplementDiscard the current PR and return to analysis.Workflow-declared
reanalyzeRe-run analysis with new context.Workflow-declared
reopenReopen a completed issue; sends it back to intake.Workflow-declared

Workflow-declared actions (reimplement, reanalyze, reopen) are only available when the issue’s active workflow declares them. A workflow may rename these actions but not withhold the platform actions (pause, resume, cancel, retry). resume is an action in colony_act — there is no separate resume tool.


List and manage self-improvement tracks for a repo. Shows active tracks, completion counts, and cooldown status.

ArgumentRequiredTypeDescription
repoYesstringRepository in owner/name format

Publish a pre-decomposed plan as dependency-linked Colony issues. Dependents are created blocked until their prerequisites complete. Idempotency is best-effort by title — do not run two overlapping imports concurrently. Use dry_run to preview classification without creating anything.

Set as_epic to import the plan as an epic: tasks become subtasks of a shared parent issue, all targeting an epic/<n> branch that is reviewed and merged as a unit.

ArgumentRequiredTypeDescription
repoYesstringRepository in owner/name format
tasksYesarrayStructured task array — see schema below
dry_runNobooleanPreview classification without creating issues
as_epicNobooleanImport as an epic with a shared parent issue and epic/<n> branch
epic_titleNostringTitle for the epic parent issue (used only when as_epic is true)
epic_bodyNostringBody for the epic parent issue (used only when as_epic is true)

tasks array item schema:

FieldRequiredTypeDescription
keyYesstringShort unique identifier, no spaces (e.g. auth-api, migrate-db)
titleYesstringConcise action phrase ≤ 72 chars, starts with a verb
bodyNostringMarkdown issue body — background, acceptance criteria, constraints
dependsOnNostring[]Array of key values this task depends on (omit or [] for root tasks)
needsHumanNobooleantrue if the task requires human intervention before Colony can proceed
crossRepoNostring"owner/other-repo" if the task belongs to a different repository

List v2 repo intelligence items (mode: list, default), or run retrieval debug for a specific agent role (mode: retrieve). List mode returns architecture facts, invariants, failure patterns, design decisions, and other evidence-backed intelligence. Retrieve mode runs the same ranked-snippet retrieval an agent would receive and returns snippets, candidate files, and token estimates.

ArgumentRequiredTypeDescription
repoYesstringRepository in owner/name format
modeNostringlist (default): filtered intelligence items; retrieve: retrieval debug for the given agent role
tenant_idNostringTenant external ID for ambiguous repo names
kindNostringFilter by kind (e.g. architecture, invariant, failure_pattern, design_decision) — list mode
statusNostringFilter by status: candidate, observed, proposed, approved, dismissed, superseded — list mode
scope_kindNostringFilter by scope kind (e.g. repo, package, path, file, symbol) — list mode
scope_refNostringFilter by scope reference value — list mode
tagNostringFilter by tag — list mode
sourceNostringFilter by source agent or system — list mode
min_confidenceNonumberMinimum confidence threshold (0–1) — list mode
limitNonumberMaximum results (default 100, max 500) — list mode
agentRequired for retrieve modestringAgent role: analyzer, planner, developer, reviewer, retrospector — retrieve mode
issueNonumberIssue number to scope retrieval — retrieve mode
prNonumberPull request number to scope retrieval — retrieve mode
budgetNonumberToken budget for rendered markdown — retrieve mode

List workflow definitions registered for the tenant associated with the given repo, or return the full parsed definition for a specific workflow when workflow_id is given. Defaults to the latest version when version is omitted.

ArgumentRequiredTypeDescription
repoYesstringRepository in owner/name format
workflow_idNostringWorkflow identifier to fetch (e.g. colony-default); when omitted, lists all definitions
versionNonumberWorkflow version number (defaults to latest; only used when workflow_id is given)
tenant_idNostringTenant external ID for ambiguous repo names

Claude Code slash commands that wrap the MCP tools in structured conversational prompts. The files live in .claude/commands/colony/ and are picked up automatically by Claude Code when the project is open. Copy them to ~/.claude/commands/colony/ for global availability.

CommandInvocationWhat it doesMCP tools used
brainstorm/colony:brainstorm [repo]Interview → estimate → file a Colony issuecolony_estimate, colony_file_issue
plan/colony:plan [repo]Decompose work into dependency-linked tasks and import as a plancolony_import_plan (dry-run preview + live import)
report/colony:report [repo] [time-window]Summary report: workers, queue, active issues, cost, findingscolony_work (views: status, list, findings)
issue-status/colony:issue-status <repo> <issue>Diagnose a specific issue: state history, block reason, recommendationscolony_work (views: diagnose, status)

Usage examples:

/colony:brainstorm RunColony/colony
/colony:plan acme/webapp
/colony:report acme/webapp 30d
/colony:issue-status acme/webapp 42
/colony:issue-status acme/webapp#42

Editor-side vs. GitHub-comment commands: These slash commands operate via the MCP server from your editor. They are distinct from GitHub-comment slash commands (/colony:retry, /colony:decompose, /colony:cancel, etc.) that control the pipeline from issue comments on GitHub.