Skip to content

Use DownBad in Gemini CLI

Goal: Gemini CLI reads your DownBad monitors and incidents, works out why an incident happened, fixes it where it has access, and has DownBad confirm the fix.

Gemini CLI reaches DownBad’s MCP server (MCP, the Model Context Protocol, is the standard way AI assistants reach other services). The DownBad extension adds the server, DownBad’s skills (written steps for diagnosing an incident, fixing and rechecking it, wrapping a deploy in maintenance, and importing monitors) and a short set of rules Gemini follows when it uses DownBad.

  1. In a terminal:

    Terminal window
    gemini extensions install https://github.com/downbadapp/downbad-plugin

    Gemini CLI asks you to confirm, because an extension adds tools.

  2. Start Gemini CLI and run /mcp auth downbad. Your browser opens DownBad.

  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.

Expected result: /mcp lists the downbad server with its tools. Ask “Why is my DownBad monitor for example.com down?”.

The extension adds only the server you sign in to. To try the health check before you sign in, add the no-account address by hand, as in No account below.

Terminal window
gemini mcp add --transport http downbad https://mcp.downbad.app/mcp

Gemini CLI finds DownBad’s sign-in by itself, from the server’s answer. Start Gemini CLI and run /mcp auth downbad, then approve on DownBad’s page as in step 3 above.

Make a key first, named Gemini CLI: Create and Revoke API Keys. Then add DownBad to ~/.gemini/settings.json:

{
"mcpServers": {
"downbad": {
"httpUrl": "https://mcp.downbad.app/mcp",
"headers": {
"Authorization": "Bearer $DOWNBAD_API_KEY"
}
}
}
}

$DOWNBAD_API_KEY is an environment variable holding your key. Set it before starting Gemini CLI.

Terminal window
gemini mcp add --transport http downbad-tools https://mcp.downbad.app/tools

https://mcp.downbad.app/tools is for trying the health check and DownBad’s status without an account. It gives run_health_check and get_downbad_status only.

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:

  1. Check the address is exactly https://mcp.downbad.app/mcp and is set as httpUrl, the Streamable HTTP setting. url is for the older SSE transport, which DownBad doesn’t serve.

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

  3. Restart Gemini CLI.

The sign-in ended or was revoked. Run /mcp auth downbad and approve on DownBad’s page again. With a key, check it under Account › API keys in DownBad. The reasons DownBad gives are in MCP Connection Problems.

A server named downbad in settings.json replaces the extension’s server of the same name. That’s how you give the extension a key. If you didn’t mean to, remove the entry from settings.json.

DownBad’s page refuses to connect Gemini CLI

Section titled “DownBad’s page refuses to connect Gemini CLI”

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.

Gemini 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 /mcp, 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.