An adopted repo
Run from a repository that has already run repo-harness adopt. See Setup.
repo-harness ships an MCP server that exposes only your workflow artifacts — plans,
sprints, contracts, checks, handoffs — to ChatGPT and Codex. ChatGPT connects over HTTP
with OAuth through a public /mcp endpoint; Codex connects locally over stdio with no
tunnel. The sidecar is not a remote coding agent — it prepares workflow artifacts for the
local agent host.
An adopted repo
Run from a repository that has already run repo-harness adopt. See Setup.
repo-harness on PATH
The repo-harness CLI must be installed and resolvable on your shell PATH.
ChatGPT Developer Mode
A ChatGPT workspace with access to Developer Mode and custom MCP Connectors.
A public /mcp endpoint
A stable public HTTPS /mcp URL for recurring ChatGPT use. Local Codex uses stdio with no tunnel.
Launch the planner-profile server over HTTP on localhost:
repo-harness mcp serve --repo . --transport http --host 127.0.0.1 --port 8765 --profile plannerConfirm it’s healthy:
curl http://127.0.0.1:8765/healthRead the local OAuth passphrase — ChatGPT will ask for it during authorization:
jq -r .passphrase .repo-harness/mcp.oauth.jsonSmoke-test OAuth discovery:
curl http://127.0.0.1:8765/.well-known/oauth-protected-resource/mcpChatGPT needs a public HTTPS URL ending in /mcp. Prefer a stable hostname for recurring
use — a quick tunnel’s URL changes, and ChatGPT treats each new URL as a different
Connector app.
cloudflared tunnel logincloudflared tunnel create repo-harness-mcpcloudflared tunnel route dns repo-harness-mcp repo-harness-mcp.example.comcloudflared tunnel run --url http://127.0.0.1:8765 repo-harness-mcpThen record the stable endpoint in ignored local config:
repo-harness mcp setup chatgpt --repo . --endpoint <https-url>/mcpcloudflared tunnel --url http://127.0.0.1:8765Use the printed HTTPS URL with /mcp appended as your Connector URL:
<https-tunnel-url>/mcprepo-harness./mcp..repo-harness/mcp.oauth.json.Codex runs locally and needs no tunnel — it speaks stdio directly. Auto-generate the config:
repo-harness mcp setup codex --repo . --scope projectThis writes .codex/config.toml with a stdio repo_harness server entry and the allowed
tool list.
repo-harness mcp serve --repo . --transport http --host 127.0.0.1 --port 8765 \ --profile orchestrator --enable-dev-runner --dev-runner-agents codexOr via environment override:
REPO_HARNESS_MCP_DEV_RUNNER=1 REPO_HARNESS_MCP_DEV_RUNNER_AGENTS=codex,claude \ repo-harness mcp serve --repo . --transport http --profile orchestratorWhen enabled, the server exposes run_agent_goal. It reads only
.ai/harness/handoff/codex-goal.md and runs that fixed handoff through the allowed local
CLI. It is not arbitrary shell.
The planner profile is read-mostly. It can read workflow files and write planning
artifacts only — never application source, manifests, lockfiles, CI config, secrets, or
files outside the repo root.
harness_status, harness_doctor, read_workflow_file,
list_workflow_files, latest_handoff, latest_checkswrite_prd_from_idea, write_checklist_sprint,
prepare_codex_goal_from_sprintThe expected planning chain: idea → write_prd_from_idea → write_checklist_sprint →
prepare_codex_goal_from_sprint → local Codex /goal execution.
/mcp.repo-harness mcp serve and rescan tools.write_checklist_sprint.repo-harness mcp setup codex --repo . --scope project.