OpenAI CLI · stdio MCP · setup guide 02
Codex CLI
connects locally.
Connect Codex CLI to local browser inspection, typed choices, context pruning, and diff pre-review through a stdio MCP server.
01 / Build once
Prepare the source checkout
npm install
npm run buildKeep the absolute checkout path ready. The published npm package is not available yet; when it ships, this setup will be shorter.
02 / Add the server
~/.codex/config.toml or trusted project .codex/config.toml
codex mcp add agent-decision-kit -- node /absolute/path/to/agent-decision-kit/dist/cli.js mcp
codex mcp listThe MCP server exposes ordinary request-response tools over stdio. Codex CLI and the Codex IDE extension share the user's MCP configuration, so the same server can appear in both surfaces.
Configuration option
Source-checkout server entry
[mcp_servers.agent-decision-kit]
command = "node"
args = ["/absolute/path/to/agent-decision-kit/dist/cli.js", "mcp"]03 / Verify
Check the connection
Run `codex mcp list`; ask Codex to call model_route with a trivial task and inspect the returned heuristic route.
04 / Try a real workflow
Start with sample data
Call context_prune on the sample error output and retain the exact file path. Verify the output preserves it character for character.
Client setup reference: Codex MCP documentation ↗