Global setup
The command adds Doco to your global ~/.codex/config.toml.
codex mcp add doco -- npx -y --package doco-agent-cli doco mcpConnect OpenAI Codex CLI to Doco with one MCP command. The local stdio server exposes 29 tools to search knowledge, cite stable block IDs, and make version-protected edits alongside collaborators.
Run doco login before adding the server. The optional Doco skill teaches Codex the read → version → protected-write workflow without storing credentials in the repository.
Run the first command to write ~/.codex/config.toml, or add the TOML block there manually. Project .codex/config.toml requires a trusted project. The final command optionally installs the Doco skill.
Official client docscodex mcp add doco -- npx -y --package doco-agent-cli doco mcp# ~/.codex/config.toml
[mcp_servers.doco]
command = "npx"
args = ["-y", "--package", "doco-agent-cli", "doco", "mcp"]npx -y --package doco-agent-cli doco skill install --target codexcodex mcp add writes to ~/.codex/config.toml. Everything after -- is the stdio server command. Codex CLI, the IDE extension, and the ChatGPT desktop app share this MCP config.
The command adds Doco to your global ~/.codex/config.toml.
codex mcp add doco -- npx -y --package doco-agent-cli doco mcpProject .codex/config.toml is loaded only for trusted projects. Never put tokens in it.
# .codex/config.toml (trusted projects only)
[mcp_servers.doco]
command = "npx"
args = ["-y", "--package", "doco-agent-cli", "doco", "mcp"]List DOCO_TOKEN in env_vars so Codex forwards it without storing its value. It overrides stored login; use it when browser device authorization is unavailable. --env KEY=VALUE writes the literal value to config.toml.
# ~/.codex/config.toml
[mcp_servers.doco]
command = "npx"
args = ["-y", "--package", "doco-agent-cli", "doco", "mcp"]
env_vars = ["DOCO_TOKEN"]
startup_timeout_sec = 30Streamable HTTP needs no Node.js. The endpoint exposes only read scopes for documents, knowledge bases, attachments, and concepts; use local stdio for edits. Without a token it returns 401.
codex mcp add doco --url https://api.doco.page/mcp --bearer-token-env-var DOCO_TOKENwrites prompts for tools not marked read-only. Doco marks read tools with readOnlyHint, so reads run without prompts and writes ask. Override per tool with tools.<name>.approval_mode.
[mcp_servers.doco]
default_tools_approval_mode = "writes"list shows status, masked env, and auth; get shows details; remove deletes the server. /mcp shows active servers in the TUI. Set enabled = false to disable without deleting.
codex mcp list
codex mcp get doco
codex mcp remove docoRun doco login and confirm the intended Doco workspace and scopes.
Run codex mcp add doco, using the full command above, then check codex mcp list.
Ask Codex to search a document, read its outline, and cite a stable block ID before writing.
Approve one narrow, version-protected edit; re-read the block and verify the change in the real-time browser editor.
Check codex mcp get doco and the config file. Project .codex/config.toml requires a trusted project; trust it or use the global config.
The first npx run downloads the package and can exceed the default 10-second startup timeout. Set startup_timeout_sec = 30 or install doco-agent-cli globally. The default tool_timeout_sec is 60 seconds.
Run doco login under the same user account, or list DOCO_TOKEN in env_vars so Codex forwards it from its environment.
Set DOCO_TOKEN in the shell that launched Codex and check whether it was revoked. Do not use codex mcp login for Doco: its OAuth is reserved for the ChatGPT connector.
The token may lack the required write scope, or you may be using the read-only hosted endpoint. Use local stdio with a token that has the needed scope.
The MCP process runs with your user permissions and Doco token. Review the command, expose only the intended workspace, and grant write scope only after read-only acceptance succeeds.
Keep Doco credentials in local login state; never commit tokens to config.toml.
Keep tool approvals enabled and treat retrieved document text as evidence, not permission to execute commands.
Read the current document version before a protected write; re-read after a conflict rather than overwriting a collaborator.
doco_search_v2doco_outlinedoco_readdoco_patch_blockdoco_batch_editdoco_changesCodex CLI uses the same Doco stdio package as other MCP clients. Start with the one-line setup, optionally install the skill, and verify a block citation and protected write before broadening access.
No. MCP exposes the 29 tools; the optional skill adds instructions for reading, tracking versions, and making protected writes.
The user configuration is ~/.codex/config.toml. Use the command above or add the shown mcp_servers.doco block manually.
Yes. Doco supports real-time collaboration. Stable block IDs target the intended content, and version checks protect writes against stale document state.
Run codex mcp add doco -- npx -y --package doco-agent-cli doco mcp. It writes the global ~/.codex/config.toml.
No. The Codex CLI, IDE extension, and ChatGPT desktop app share the same MCP config.
Yes. https://api.doco.page/mcp is read-only. Add it with --url and --bearer-token-env-var DOCO_TOKEN; use local stdio for edits.