Coding agents
Codex
Add the Sai MCP server to OpenAI Codex.
Codex reads MCP servers from ~/.codex/config.toml. The same npx command that Claude Code uses works here.
Install
InstallShell
codex mcp add sai --env SAI_API_KEY=sapi_... -- npx -y @simular-ai/sai-mcpOr edit the config by hand:
~/.codex/config.tomlTOML
[mcp_servers.sai]
command = "npx"
args = ["-y", "@simular-ai/sai-mcp"]
[mcp_servers.sai.env]
SAI_API_KEY = "sapi_..."Restart Codex after editing the file.
Verify
VerifyShell
codex mcp listThen ask:
Prompt
Use Sai to open the Downloads folder on my computer and list the five newest files.Tools and loop
The tool set and the start, wait, approve loop are the same as in Claude Code. Codex calls sai_task_wait repeatedly until status is idle. When Sai needs you on the screen (a sign-in, a captcha), Codex calls sai_live_link and gives you live_url; do the step in your browser, tell Codex, and it sends Sai a message to carry on.
Gotchas
- Codex has no equivalent of Claude Code channels, so there is no push mode. Polling through
sai_task_waitis the only path. - Keep the key out of the repository.
~/.codex/config.tomlis per user; a project-level.codex/config.tomlis committed by default in many repositories. - Codex applies its own timeout to tool calls, 60 seconds by default.
sai_task_waitholds for at most 55 seconds, so the task tools work without changing it. A wait that returns while the task is still running can be called again with the returnedcursor. - The Codex app shows the task view in the conversation but keeps it offline, so the screen can't stream there. Open the
watch_urllink instead; see Watch Sai work. sai_task_waitretries a gateway502,503or504on its own before reporting an error.