An adopted repo
Run from a repository that has already run repo-harness adopt. See Setup.
repo-harness ships an MCP server that gives ChatGPT and Codex read-only access to your
registered repos — workflow files plus the repo tree, text search, and file contents —
while writes stay scoped to workflow artifacts (plans, sprints, contracts, handoffs).
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 your registered repos and write
planning artifacts only — never application source, manifests, lockfiles, CI config,
secrets, or files outside an allowed repo root.
harness_status, harness_doctor, read_workflow_file,
list_workflow_files, latest_handoff, latest_checksreader_status, list_allowed_roots, open_workspace,
tree, search_text, read_text — browse and search the repo, not just workflow fileswrite_prd_from_idea, write_checklist_sprint,
prepare_codex_goal_from_sprintDeny globs stay active even with repo reads enabled: .env, private keys, SSH keys,
credentials, secrets, .git, and dependency/build output are never returned.
One Connector can serve every repo you’ve adopted. repo-harness adopt and repo-harness init register a repo in ~/.repo-harness/registered-repos.json; discover_harness_repos
lists them, and read tools accept a repo_path to target a specific one. Broad full-disk
read is deprecated — legacy fullDiskRead: true now fails closed; add extra non-repo
roots explicitly with --allow-root.
User-scope setup (repo-harness mcp setup chatgpt without --repo, storing config and
auth under ~/.repo-harness/) works for Developer Mode deployments. HTTP auth supports
OAuth — with offline_access refresh-token rotation — and a url-token compatibility mode.
The 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.