MCP server that orchestrates gemini, claude, and codex CLI agents across three composable pipelines: Develop, Research, and Design.
Each pipeline step is an independent machine — callable as a standalone MCP tool or composed into full workflows. An LLM host (Claude Code, Cursor, etc.) connects to the MCP server and drives the tools.
| Requirement | Notes |
|---|---|
| Node.js >= 20 | Runtime |
gemini CLI |
Default agent for issue selection, plan review, research |
claude (Claude Code) |
Default agent for planning, implementation |
codex CLI |
Default agent for code review, committing |
gh CLI |
GitHub issue listing and PR creation (issueSource: "github") |
glab CLI |
GitLab issue listing and MR creation (issueSource: "gitlab") |
Agent role assignments are configurable — any role can use any of the three backends.
npm install -g @canesin/coderOr from source:
git clone https://github.com/canesin/coder.git
cd coder
npm install
npm linkAdd to your MCP client config (.mcp.json, Claude Code settings, Cursor, etc.):
{
"mcpServers": {
"coder": {
"command": "coder-mcp"
}
}
}Or with explicit path (from source):
{
"mcpServers": {
"coder": {
"command": "node",
"args": ["./bin/coder-mcp.js"]
}
}
}Or run directly:
coder-mcp # stdio (default)
coder-mcp --transport http # HTTP on 127.0.0.1:8787/mcpcoder status # workflow state and progress
coder config # resolved configuration
coder ppcommit # commit hygiene (all files)
coder ppcommit --base main # commit hygiene (branch diff only)
coder serve # start MCP server (delegates to coder-mcp)Picks up issues from GitHub, GitLab, Linear, or a local manifest, implements code, and pushes PRs/MRs:
issue-list → issue-draft → planning ⇄ plan-review → implementation → quality-review → pr-creation
coder_workflow { action: "start", workflow: "develop" }
Turns ideas into validated, reference-grounded issue backlogs:
context-gather → deep-research → tech-selection → poc-validation → issue-synthesis → issue-critique → spec-publish
coder_workflow { action: "start", workflow: "research", pointers: "..." }
Generates UI designs from intent descriptions via Google Stitch:
intent-capture → ui-generation → ui-refinement → spec-export
coder_workflow { action: "start", workflow: "design", designIntent: "..." }
Every pipeline step is a machine defined with defineMachine():
defineMachine({ name, description, inputSchema, execute })Machines are auto-registered as MCP tools (coder_develop_planning, coder_research_context_gather, etc.) and composable into pipelines via WorkflowRunner.
src/machines/
develop/ 7 machines
research/ 7 machines
design/ 4 machines
shared/ 2 reusable (web-research, poc-runner)
Three backends, assigned to roles via config:
| Backend | Class | Use case |
|---|---|---|
| CLI | CliAgent |
Complex tasks — planning, implementation, review |
| API | ApiAgent |
Simple tasks — classification, JSON extraction |
| MCP | McpAgent |
External MCP servers (Stitch) |
AgentPool.getAgent(role, { scope, mode }) manages lifecycle and caching. Roles: issueSelector, planner, planReviewer, programmer, reviewer, committer.
coder_workflow is the unified control plane:
| Action | Description |
|---|---|
start |
Launch a pipeline run |
status |
Current stage, heartbeat, progress |
events |
Structured event log with cursor pagination |
pause |
Pause at next checkpoint |
resume |
Resume paused run |
cancel |
Cooperative cancellation |
XState v5 models the lifecycle: idle → running → paused → completed/failed/cancelled.
All state lives under .coder/ (gitignored):
| Path | Purpose |
|---|---|
workflow-state.json |
Per-issue step completion |
loop-state.json |
Multi-issue develop queue |
artifacts/ |
ISSUE.md, PLAN.md, PLANREVIEW.md |
steering/ |
Persistent project context (product.md, structure.md, tech.md) |
scratchpad/ |
Research pipeline checkpoints |
logs/*.jsonl |
Structured event logs (tagged with runId) |
state.db |
Optional SQLite mirror |
Layered: ~/.config/coder/config.json (user) → coder.json (repo) → MCP tool inputs.
See coder.example.json for a full example.
Built-in commit hygiene checker using tree-sitter AST analysis. Blocks:
- Secrets and API keys
- TODO/FIXME comments
- LLM narration markers (
Here we...,Step 1:, etc.) - Emojis in code (not strings)
- Magic numbers
- Placeholder code and compat hacks
- Over-engineering patterns
- New markdown files outside allowed directories
Optional LLM-assisted checks via Gemini API for deeper analysis.
Persistent project knowledge in .coder/steering/ that agents receive automatically:
coder_steering_generate # scan repo, create product.md / structure.md / tech.md
coder_steering_update # refresh after significant changesAlso available as the coder://steering MCP resource.
User-defined shell commands triggered on workflow events. Configure in config.workflow.hooks[]:
{ "on": "machine_complete", "machine": "implementation", "run": "npm run lint" }Events: workflow_start, workflow_complete, workflow_failed, machine_start, machine_complete, machine_error, loop_start, loop_complete, issue_start, issue_complete, issue_failed, issue_skipped, issue_deferred.
Hook scripts receive CODER_HOOK_EVENT, CODER_HOOK_MACHINE, CODER_HOOK_STATUS, CODER_HOOK_DATA, and CODER_HOOK_RUN_ID environment variables. Failures are logged but never break the workflow.
- Workspace boundaries enforced — agents operate within the target repo
- Non-destructive reset between issues (opt-in
destructiveReset) - Health-check URLs restricted to localhost
- One active run per workspace
- Session TTL with automatic cleanup (HTTP mode)
- Codex runs inside the host sandbox with
--dangerously-bypass-approvals-and-sandboxfor Linux compatibility CODER_ALLOW_ANY_WORKSPACE=1to allow arbitrary pathsCODER_ALLOW_EXTERNAL_HEALTHCHECK=1for external health-check URLs
| Variable | Purpose |
|---|---|
GEMINI_API_KEY / GOOGLE_API_KEY |
Gemini CLI + ppcommit LLM checks (auto-aliased) |
ANTHROPIC_API_KEY |
Claude Code |
OPENAI_API_KEY |
Codex CLI |
GITHUB_TOKEN |
GitHub API (issues, PRs) — used by gh CLI |
GITLAB_TOKEN / GITLAB_API_TOKEN |
GitLab API — used by glab CLI |
LINEAR_API_KEY |
Linear issue tracking |
GOOGLE_STITCH_API_KEY |
Design pipeline (Google Stitch) |
See CONTRIBUTING.md.
{ // Model selection (see coder.example.json for full structure) "models": { "gemini": { "model": "gemini-3.1-pro-preview" }, "claude": { "model": "claude-sonnet-4-6" } }, // Agent role assignments (gemini | claude | codex) "workflow": { "agentRoles": { "issueSelector": "gemini", "planner": "claude", "planReviewer": "gemini", "programmer": "claude", "reviewer": "codex", "committer": "codex" }, // Issue source: "github" (default), "linear", "gitlab", or "local" // github → gh CLI, gitlab → glab CLI, linear → Linear MCP, local → .coder/local-issues/ "issueSource": "github", "localIssuesDir": ".coder/local-issues", "wip": { "push": true, "autoCommit": true }, // Post-step hooks (shell commands triggered on workflow events) "hooks": [ { "on": "machine_complete", "machine": "implementation", "run": "npm run lint" } ] }, // Commit hygiene (tree-sitter AST-based) "ppcommit": { "enableLlm": true, "llmModelRef": "gemini" }, // Test execution "test": { "command": "", "allowNoTests": false }, // Design pipeline (requires Google Stitch) "design": { "stitch": { "enabled": false }, "specDir": "spec/UI" } }