Skip to content

OpenAI Codex CLI

The OpenAI Codex CLI supports MCP servers. AgentZero can provide policy-enforced tools to Codex sessions.

Terminal window
cargo build --release --features mcp

Add AgentZero to your Codex MCP configuration:

{
"mcpServers": {
"agentzero": {
"command": "az",
"args": ["mcp"]
}
}
}

Or use the automated setup:

Terminal window
az connect codex --dry-run # preview the config
az connect codex # write config

Start Codex in your project directory. AgentZero tools will be available alongside Codex’s built-in capabilities.

ToolDescription
read_fileRead file contents (policy-checked)
list_directoryList directory contents
search_filesSearch for patterns in files
write_fileWrite content to a file (requires approval)
run_commandExecute a shell command (requires approval)
  • Policy engine enforces deny-by-default rules
  • Path validation and sensitive file blocking
  • Full audit trail in .agentzero/audit/
  • Tools not visible — ensure az is in your PATH and built with --features mcp
  • Policy denials — check az policy status