Skip to content

Use DownBad in Grok Build and Grok

Goal: Grok Build, xAI’s coding agent, reads your DownBad monitors and incidents, works out why an incident happened, fixes it in your code, and has DownBad confirm the fix. Grok Build runs in the terminal as grok, and as the Agents Window, its desktop app, where Cursor’s docs now lead. Grok on grok.com can read DownBad too.

All of them reach DownBad’s MCP server (MCP, the Model Context Protocol, is the standard way AI assistants reach other services).

WayAddressGood for
The DownBad pluginhttps://mcp.downbad.app/mcpGrok Build: the server plus the incident skills
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

The plugin adds DownBad’s MCP server and four skills, written steps Grok follows for a job: diagnose an incident, fix it and recheck, wrap a deploy in maintenance, and import monitors from another service.

  1. In Grok Build, open /plugins and go to the Marketplace tab. Find downbad and install it.

    If it isn’t listed, load it from a copy of the plugin’s repository instead:

    Terminal window
    git clone https://github.com/downbadapp/downbad-plugin
    grok --plugin-dir ./downbad-plugin
  2. Open /mcps, select downbad, and press i to sign in. 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: /mcps shows downbad connected. Ask “Why is my DownBad monitor for example.com down?” and Grok follows the diagnose-incident skill.

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

Grok Build opens DownBad in your browser the first time it uses the server. Approve on DownBad’s page as in step 3 above. Add --scope project to save the server in this repository’s .grok/config.toml instead of your own settings.

Make a key first, named Grok Build: Create and Revoke API Keys.

Terminal window
grok mcp add --transport http downbad https://mcp.downbad.app/mcp --header "Authorization: Bearer ${DOWNBAD_API_KEY}"

${DOWNBAD_API_KEY} is an environment variable holding your key, so the key isn’t typed where your shell history keeps it.

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

It gives run_health_check and get_downbad_status only.

The Agents Window keeps its servers in a file named mcp.json: ~/.cursor/mcp.json to use DownBad in every project, or .cursor/mcp.json inside one project.

Open Customize in the sidebar and look for DownBad in the Grok Build Marketplace. If it’s listed, choose Add to Grok Build and sign in to DownBad when asked, approving on DownBad’s Connect an app page as in the plugin’s step 3. If it isn’t listed, add it to mcp.json as below.

  1. Add DownBad to mcp.json, with no key:

    {
    "mcpServers": {
    "downbad": {
    "url": "https://mcp.downbad.app/mcp"
    }
    }
    }
  2. Open Customize in the sidebar and turn downbad on. Grok Build signs in with OAuth, so it opens DownBad in your browser.

  3. Sign in to DownBad if you aren’t already, and approve on DownBad’s Connect an app page. That page, and what each choice allows, is shown in Connect and Disconnect Apps.

Make a key first, named Agents Window: Create and Revoke API Keys.

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

${env:DOWNBAD_API_KEY} reads the key from an environment variable of that name, so the key isn’t saved in a file you might commit. Set the variable before starting the Agents Window.

{
"mcpServers": {
"downbad-tools": {
"url": "https://mcp.downbad.app/tools"
}
}
}

It gives run_health_check and get_downbad_status only.

Expected result: ask the Agents Window “List my DownBad monitors”. It calls list_monitors and answers with your monitors.

  1. Go to grok.com/connectors.

  2. Choose New Connector, then Custom.

  3. Enter https://mcp.downbad.app/mcp as the MCP server URL, and sign in to DownBad when Grok asks, approving on DownBad’s Connect an app page as above.

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:

In the terminal, start with grok mcp doctor downbad: it checks the server’s settings and whether Grok Build can reach it. In the Agents Window, open the Output panel (Cmd+Shift+U, or Ctrl+Shift+U on Windows and Linux) and choose MCP Logs: it shows connection errors, sign-in problems and each tool call.

  1. Check the address is exactly https://mcp.downbad.app/mcp and the transport is http. In the Agents Window, check mcp.json is valid JSON.

  2. With an API key in the Agents Window, check DOWNBAD_API_KEY was set before it started. A variable set later isn’t seen until it restarts.

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

  4. Start a new Grok Build session after changing settings. In the Agents Window, check downbad is turned on in Customize.

The sign-in ended or was revoked. In /mcps, select downbad and press i to sign in again. Grok Build keeps sign-ins in ~/.grok/mcp_credentials.json. In the Agents Window, turn downbad off and on in Customize to sign in again. With a key, check it under Account › API keys in DownBad. The reasons DownBad gives are in MCP Connection Problems.

Open /plugins and check downbad is installed and turned on, then start a new session.

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.

Grok 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 grok mcp doctor downbad (or, in the Agents Window, the lines from MCP Logs), 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.