Skip to content

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.

WayAddressGood for
Sign in to DownBadhttps://mcp.downbad.app/mcpYour own machine, no key to keep
An API keyhttps://mcp.downbad.app/mcpCI and machines where no browser opens
No accounthttps://mcp.downbad.app/toolsTrying the health check and DownBad’s status only
  1. In a terminal, add DownBad:

    Terminal window
    codex mcp add downbad --url https://mcp.downbad.app/mcp

    In the IDE extension instead, open the gear menu, select MCP servers, then Add server. Enter downbad as the name, choose Streamable HTTP, enter https://mcp.downbad.app/mcp, save, and select Restart extension.

  2. Sign in. In a terminal:

    Terminal window
    codex mcp login downbad

    Your 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.

  3. 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.

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.

Terminal window
codex mcp add downbad-tools --url https://mcp.downbad.app/tools

It 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.

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:

Start with codex mcp list, which shows the servers Codex knows about, or type /mcp inside Codex to see the ones it has started.

  1. Check the address is exactly https://mcp.downbad.app/mcp in ~/.codex/config.toml (or .codex/config.toml in the project).

  2. Check DownBad itself at downbad.app. If it’s down for everyone, wait.

  3. Start a new Codex session, or select Restart extension in the IDE extension, after changing settings.

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.

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.

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.

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.