Use DownBad in Codex
Goal: OpenAI Codex, in the terminal or in its IDE extension, reads your DownBad monitors and incidents, works out why an incident happened, fixes it in your code, and has DownBad confirm the fix.
Codex reaches DownBad’s MCP server (MCP, the Model Context Protocol, is
the standard way AI assistants reach other services). The Codex CLI, the IDE
extension and the ChatGPT desktop app share one settings file,
~/.codex/config.toml, so adding DownBad once adds it to all three.
| Way | Address | Good for |
|---|---|---|
| Sign in to DownBad | https://mcp.downbad.app/mcp | Your own machine, no key to keep |
| An API key | https://mcp.downbad.app/mcp | CI and machines where no browser opens |
| No account | https://mcp.downbad.app/tools | Trying the health check and DownBad’s status only |
Connect by signing in
Section titled “Connect by signing in”-
In a terminal, add DownBad:
Terminal window codex mcp add downbad --url https://mcp.downbad.app/mcpIn the IDE extension instead, open the gear menu, select MCP servers, then Add server. Enter
downbadas the name, choose Streamable HTTP, enterhttps://mcp.downbad.app/mcp, save, and select Restart extension. -
Sign in. In a terminal:
Terminal window codex mcp login downbadYour browser opens DownBad. In the IDE extension, select Authenticate next to downbad. On a machine with no browser, add
--no-browser: Codex prints an address to open elsewhere, and you paste the address you land on back into the terminal. -
Sign in to DownBad if you aren’t already. On DownBad’s Connect an app page, check the app’s name and the address it sends you back to, choose Read only or Read and write, and choose Approve. That page, and what each choice allows, is shown in Connect and Disconnect Apps.
Connect with an API key
Section titled “Connect with an API key”Make a key first, named Codex:
Create and Revoke API Keys.
Add DownBad to ~/.codex/config.toml:
[mcp_servers.downbad]url = "https://mcp.downbad.app/mcp"bearer_token_env_var = "DOWNBAD_API_KEY"bearer_token_env_var names an environment variable, here
DOWNBAD_API_KEY, that holds your key. Codex sends it as
Authorization: Bearer <key>, so the key itself isn’t saved in the file.
Set the variable before starting Codex.
To use DownBad in one repository only, put the same lines in
.codex/config.toml inside it. Codex reads that file only in projects you
have marked as trusted.
Connect without an account
Section titled “Connect without an account”codex mcp add downbad-tools --url https://mcp.downbad.app/toolsIt gives run_health_check and get_downbad_status only.
Expected result: ask Codex “List my DownBad monitors”. It calls
list_monitors and answers with your monitors.
Have DownBad start your agent
Section titled “Have DownBad start your agent”The steps above have you ask your assistant. An agent webhook works the other way round: when DownBad confirms an incident, it sends the details to your agent and starts it, and again when the incident recovers. It’s a webhook channel on a paid plan, with one of three destinations:
- Claude Code Routine: starts a Claude Code routine, which can then use this connection to read the incident and recheck.
- GitHub repository_dispatch: starts whichever workflow or agent runs in your repository.
- Agent Webhook: the signed incident payload for any other agent.
Troubleshooting
Section titled “Troubleshooting”Start with codex mcp list, which shows the servers Codex knows about, or
type /mcp inside Codex to see the ones it has started.
downbad won’t connect
Section titled “downbad won’t connect”-
Check the address is exactly
https://mcp.downbad.app/mcpin~/.codex/config.toml(or.codex/config.tomlin the project). -
Check DownBad itself at downbad.app. If it’s down for everyone, wait.
-
Start a new Codex session, or select Restart extension in the IDE extension, after changing settings.
DownBad says you need to sign in
Section titled “DownBad says you need to sign in”Codex may connect without signing in when it has no sign-in or key for the
server, and then DownBad refuses the tools that read your account. Run
codex mcp login downbad, or select Authenticate in the IDE extension.
If you signed in before, the sign-in or key stopped working: it was revoked,
it expired, or the person who made it left the account. Sign in again, or
make a new key. With a key, check DOWNBAD_API_KEY was set before Codex
started. The reasons DownBad gives are in
MCP Connection Problems.
DownBad’s page refuses to connect Codex
Section titled “DownBad’s page refuses to connect Codex”The Connect an app page says why: a Viewer can approve Read only, the request expired, or your sign-in has no DownBad account. Each case and its fix is in Connected App Refused.
A tool is refused
Section titled “A tool is refused”Codex passes on DownBad’s reason: the rule, what to do, and when to try again. A tool that changes your account needs Read and write access on a paid plan; a recheck needs the Pro plan or above. Find the rule in MCP Connection Problems.
Still stuck
Section titled “Still stuck”Collect the output of codex mcp list, the tool that failed and its error
word for word, and when it happened. Never include a whole key. Then send it
to us through Contact Us.