fagan — Claude Code MCP server: frontier planning, local coding
An autonomous pipeline where a frontier model plans and reviews while a local model writes the code. Runs on macOS; on Linux it goes through Ollama or LM Studio.
Open on GitHubWhat fagan does
fagan splits engineering work by cost. A frontier model breaks the task down, writes the plan, reads the diff and settles risky calls. A local model produces the implementation without burning tokens. The trust comes from gates rather than from the author: tests are written before the code, review runs as its own pass, and anything irreversible pauses for a human.
What you install is a Python MCP server, a dashboard, and a set of persona subagents plus a decision policy file. Setup builds a .venv, pulls the requirements, and you register the server in Claude with claude mcp add. The pipeline shells out to git, gh and the claude CLI; ollama and docker matter only on the local route. The scheduler and MLX supervisor ship as launchd jobs, so on Linux you render systemd units with scripts/generate_systemd_units.sh or run the entry points in a terminal session.
A first run needs no local model. Until you configure one, implementation and review go to the claude backend, which calls the Claude CLI. That is where you begin, not where you want to end up — the cost split only kicks in once the implementation role is pointed at a local model on purpose. Windows is untested.
What it helps with
- break a large task into stages and order the dependencies
- write tests before the implementation and keep the red phase honest
- run an independent review pass over the diff before merging
- route routine implementation to a local model instead of paying per token
- hold irreversible actions until a human confirms
Example prompts for the agent
- Break this task into stages and draft a plan in fagan
- Send the implementation to the local model and keep review on the frontier model
- Show me the story status on the fagan board
How to install fagan
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fagan
How do I install fagan in Claude Code?
Clone the repository and run scripts/install.sh, which creates the .venv and installs the requirements. Then register the server: claude mcp add -s user pipeline "$(pwd)/.venv/bin/python3" "$(pwd)/app/pipeline_mcp_server.py". Copy the subagents and the decision policy into ~/.claude/agents and ~/.claude/overlord-policy.md, then restart Claude.
What does fagan do?
It runs an autonomous coding pipeline: a frontier model plans the work and checks the result, while a local model writes the code. Gates sit between them — tests before implementation, a separate review pass, a merge gate.
What tools does fagan need?
git, gh and the claude CLI are required. ollama and docker are optional: without them the pipeline runs on the claude backend, which is expected.