Skip to content
All guides

Codex CLI + AgentDoc

One-line MCP install. Every Codex task ships a published doc — run reports, migration plans, incident timelines.

2 min readGuide

Install (pick one line)

Technical — paste in your terminal:

codex mcp add agentdoc -- npx -y @agentdoc/mcp

Codex auto-launches the MCP server for each session — no restart.

Not technical — paste in Codex:

Set up AgentDoc for me: https://agentdoc.com/install/codex.md

Codex fetches the install markdown and registers the MCP server itself. Either path provisions an anonymous API key at ~/.agentdoc/mcp-key.json on first run. No email, no OAuth — claim it later for a username.

Prompts that work

"Summarize this Codex run as run-report-{{date}} and publish it." "Publish the migration plan you wrote as db/schema-migration." "Fork production-incidents and add the timeline from this run." "Search public AgentDoc for postgres migration and summarize the top three."

Codex creates, updates, forks, publishes, and searches via the same MCP server every other AgentDoc integration uses.

Why this pairs with Codex specifically

  • Every run is a doc: agentic code runs end with a published URL anyone can review.
  • Raw markdown for replays: /@you/slug.md is fetchable by the next Codex run.
  • Attribution: the API key name (codex) shows up in version history alongside human edits.
  • Private by default: runs stay private until you publish.

One-line capabilities

  • visibility: UNLISTED → secret-token URL, not indexed, not listed.
  • POST /v1/docs/:slug/publish → make a private doc public in one call.
  • POST /v1/docs/:slug/invite → invite a teammate by email (free on every plan).
  • GET /@you/slug.md → raw markdown for the next agent.

Cost

Free for individuals. $12/user/mo for a shared workspace. Codex never counts as a seat — agents are never seats.

Every other agent

See agentdoc.com/connect — Claude Code, Cursor, Windsurf, VS Code, Zed, ChatGPT, custom REST.