OpenAI Codex
Use OpenAI Codex with the Dock workspace. MCP server config goes in `~/.codex/config.toml`. Codex calls the same 38 tools Claude Code and Cursor see.
OpenAI's Codex CLI ships with MCP support. Point it at the Dock workspace and Codex can read documents, propose tracked changes, manage citations, publish, using the same tools as every other MCP client, served over streamable HTTP.
Codex reads MCP servers from ~/.codex/config.toml. Add a block:
[mcp_servers.agentdock]
type = "http"
url = "https://app.agentdock.ai/api/mcp"
[mcp_servers.agentdock.headers]
x-api-key = "ak_usr_YOUR_TOKEN"Restart Codex. The next session sees the AgentDock tools.
If JSON is your preference, Codex also reads mcp.json in the same directory. The JSON shape matches Claude Code's:
{
"mcpServers": {
"agentdock": {
"type": "http",
"url": "https://app.agentdock.ai/api/mcp",
"headers": {
"x-api-key": "ak_usr_YOUR_TOKEN"
}
}
}
}agentdock mcp-setup from the CLI prints the JSON. Pick whichever format your Codex install prefers.
npm install -g agentdockai
agentdock loginlogin opens the browser, you approve, the key lands at ~/.agentdock/config.json. The same key goes in the MCP header.
agentdock whoami
agentdock docs promptsRun Codex on a writing task, not a code task
Codex defaults to code. Tell it the task is prose:
Use the AgentDock prompt "executive summary" to draft a one-pager on
the Q3 results. Save it as a new Dock document called "Q3 Summary."
Do not write any code.
get_user_prompt -> create_document -> write_document. Codex passes through cleanly when the tool surface is non-code.
Round-trip between a repo file and a doc
Read the AgentDock document "API changelog draft." Update its code
snippets to match the actual diff between v1.4 and v1.5 in this repo.
Propose changes as suggestions; do not overwrite.
read_document -> reads your repo files -> suggest_edits. Same shape as the other harnesses.
Publish on a schedule from Codex
Codex is comfortable with one-shot non-interactive runs, which makes it a good fit for scheduled tasks. Combine the CLI with cron:
0 9 * * MON agentdock docs publish <doc-id> \
--seo-title "$(date +'Weekly Digest %B %d, %Y')" \
--slug "weekly-digest-$(date +%Y-%m-%d)"The Codex MCP path is for the agent loop; the CLI path is for scheduled scripts. Use whichever fits the moment.
Same model as the other clients: every call needs the x-api-key header today, and authenticated you get the full 38 tools. A keyless tier for the public prompt library is coming soon. Tokens are user-scoped.
Codex returns tool not found. The config file path is wrong. Codex checks ~/.codex/config.toml and ~/.codex/mcp.json by default. Use one, not both.
401 on first call. Header missing or token revoked. Re-run agentdock login and refresh the config.
Codex stays in code mode and ignores Dock tools. Add the line "this is a writing task; use the AgentDock MCP tools" to the prompt. Codex's tool router needs the hint.
- MCP Server Setup: full tool reference
- CLI: every command
- Writing Modes: direct write vs suggest mode
- Claude Code: same flow in Claude Code
- Cursor: same flow in Cursor