AI CodeOps for OpenAI Codex
Add the AI CodeOps MCP server to Codex in config.toml: start gated AI sessions, read findings and check the release gate from the Codex CLI or IDE extension.
Codex is OpenAI's coding agent, in a CLI, an IDE extension, the ChatGPT desktop app and the cloud. AI CodeOps is a browser-based platform where AI agents plan, write, test and review a change, and the change becomes a pull request only after its quality gates pass and a person approves it. Add the AI CodeOps MCP server to Codex and it can hand a task to a gated AI CodeOps session, follow it, read its findings and ask whether a pull request may ship.
What AI CodeOps gates, and what it doesn't
AI CodeOps gates the changes made in its own sessions. When a Codex cloud task finishes, you can commit or open a pull request from it (Codex cloud), and on GitHub you can ask Codex to review a pull request with @codex review (Codex on GitHub). Those pull requests are ordinary pull requests: AI CodeOps doesn't review them, and the release check denies them because no AI CodeOps session made them.
To put the work through the AI CodeOps gates, ask Codex to start an AI CodeOps session with the task. The session writes the change, runs your tests, reviews it with several agents and opens the pull request only when the gate passes. Or ask the release gate before a merge, from Codex or from CI.
Connect Codex
- In AI CodeOps, create a workspace API key under Configure → API Keys. It starts with
sk-and is shown once. To let Codex start sessions, choose Scope on the key and tick Start sessions from the MCP server (/mcp). See API keys. - Put the key in an environment variable, for example
AICODEOPS_API_KEY. - Add the server to
~/.codex/config.toml. For a Streamable HTTP server, OpenAI's docs listurlandbearer_token_env_var, the name of the variable whose value Codex sends in theAuthorizationheader (Codex MCP docs):
``toml [mcp_servers.aicodeops] url = "https://console.aicodeops.dev/mcp" bearer_token_env_var = "AICODEOPS_API_KEY" ``
To scope the server to one repository, put the same table in .codex/config.toml in that project; Codex reads project files only for trusted projects. The CLI, the IDE extension and the ChatGPT desktop app share this configuration, so one entry covers all three.
What Codex can do
| Tool | What it does |
|---|---|
list_projects | Lists the workspace's projects and their repositories. |
start_session | Starts a session on a project with a task. You can name a workflow and an agent. |
get_session | A session's status, its steps, the pull request it opened and its change. |
check_release_gate | Whether a pull request or commit may ship: blocking findings, failing tests and other reasons. |
list_findings | Security and quality findings, newest first. |
get_evidence_pack | The signed evidence pack of a change, by change or by session. |
Each tool acts as the key's creator, through the same checks as the console: their role, the workspace budget and the agent's work-in-progress limit. A session Codex starts opens its pull request like any other, so approvals and the release gate still apply. See the MCP server guide.
Things to ask Codex:
Use AI CodeOps to start a security-sensitive-change session on the payments project: rotate the webhook signing secret handling.
Poll that AI CodeOps session and summarize the findings when it's done.
Check the AI CodeOps release gate for commit 3f9c2ab and tell me why it's denied, if it is.
Gate merges in CI
The release check is an HTTP API, so any CI system that can run curl can ask it before a merge:
curl -sf -X POST "https://console.aicodeops.dev/api/release/check" \
-H "Authorization: Bearer $AICODEOPS_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"commitSHA\":\"$GIT_COMMIT\"}" > gate.json
jq -e '.allowed == true' gate.json
You can send a pullRequestURL or a commitSHA of 7 or more characters. The answer is 200 with allowed, a summary and reasons; if the check itself fails, allowed is false. Options include a coverage floor, required workflows, disallowed licenses and a required staging deployment (API). As a required check, it denies any change no AI CodeOps session made.
Limits
- 120 MCP requests a minute from one address; 60 release checks a minute per workspace.
- The server is stateless and sends no notifications, so Codex polls
get_sessionto follow a session. - Workspace API keys only. OAuth sign-in isn't supported yet.
Getting started
- Create a free account: AI CodeOps is in open beta and runs in your browser.
- Connect your Git host and create a project, using the quickstart.
- Create an API key and add the server to
config.tomlas above.
Using another coding agent? See AI CodeOps for Claude Code, Cursor or GitHub Copilot.
Frequently asked questions
Does AI CodeOps review the pull requests Codex opens?
No. AI CodeOps gates the changes made in its own sessions. A pull request opened from a Codex cloud task isn't reviewed by AI CodeOps, and the release check denies it because no AI CodeOps session made it.
Where does the configuration go?
In ~/.codex/config.toml, or .codex/config.toml in a trusted project. OpenAI's docs say the Codex CLI, the IDE extension and the ChatGPT desktop app share this configuration.
How does Codex send the API key?
Set bearer_token_env_var to the name of an environment variable that holds the key. Codex sends it in the Authorization header, so the key never sits in the file.
Can Codex start AI CodeOps sessions?
Yes, with a key whose scope lists Start sessions from the MCP server. A key with no scope can use the four read tools only.