Connect an agent

Agents draft plans and read verdicts over MCP, and push code with Git. They cannot approve.

Credentials

An author issues the agent a credential from the installed service. It is bound to one system and allows only writing and reading plans and pushing within it. Where the agent starts, set OURDOC_MCP_API_ORIGIN to the service address and OURDOC_MCP_TOKEN_FILE to the path of a private file holding the credential. The same credential is the password for git push.

OurDoc refuses token files that allow group or other access. Run chmod 600 "$OURDOC_MCP_TOKEN_FILE" before use.

Claude Code and Codex

Start Claude Code with the repository's plugin folder.

claude --plugin-dir integrations/claude-code/ourdoc

For Codex, add the MCP server section from integrations/codex/ourdoc-config.toml to its configuration. The agent host needs ourdoc and curl on its PATH.

Tools

Tool
Does
create_plan
Drafts a plan. When it has cases, the response includes the baseline result or its status. Any warnings about the plan come back too, each with how to fix it.
revise_plan
Revises a plan the agent wrote. This runs the cases for the new revision and returns the result or status. The warnings that remain come back with it.
retry_plan_case_baseline
Starts a fresh run after a failure. If a run is already in progress, returns its current status.
list_plans, get_plan
Read plans with their approvals and incoming attempts.
get_attempt
Read a pushed attempt's verdict, its reasons and its status.

If the baseline fails during creation or revision, the response includes the reason and the tool call to run it again. If the run is still in progress, use get_plan to check for its result.

Approval and confirmation are not among the agent's tools. A revision against a stale version returns a conflict, so the agent rereads the current revision and continues. The same work is available from the ourdoc plan command, and a person approves on screen or with that command's approve.