MCP server

Connect AI assistants to your Incidents and Telemetry data through the Model Context Protocol.

Getting started

If this is your first time working with MCP servers, check out our MCP explained guide to understand the basics.

Step 1: Install the MCP server

Using one of these apps? Skip the manual setup and install the dedicated plugin:

The Better Stack MCP server runs as a remote HTTP server. Add one of the following configurations to your MCP client:

OAuth

We recommend OAuth. If your client supports it, add this configuration:

OAuth configuration (recommended)
{
  "mcpServers": {
    "betterstack": {
      "type": "http",
      "url": "https://mcp.betterstack.com"
    }
  }
}

Then sign in through the browser when your client prompts you.

API token

For clients that support HTTP servers but not OAuth, pass your API token via the Authorization header:

API token configuration
{
  "mcpServers": {
    "betterstack": {
      "type": "http",
      "url": "https://mcp.betterstack.com",
      "headers": {
        "Authorization": "Bearer $TOKEN"
      }
    }
  }
}


Proxy with mcp-remote

If your MCP client doesn't support remote HTTP servers, you can use the mcp-remote proxy instead:

Proxy configuration (mcp-remote)
{
  "mcpServers": {
    "betterstack": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.betterstack.com",
        "--header",
        "Authorization: Bearer ${BETTERSTACK_API_TOKEN}"
      ],
      "env": {
        "BETTERSTACK_API_TOKEN": "$TOKEN"
      }
    }
  }
}


Grok Bot

Scan the QR code on your phone, or add Better Stack Bot

QR code for the Better Stack Bot template

  1. Click Add to Grok Bot.
  2. Click Add Bot.
  3. When the Bot shows the betterstack card, click Authorize.
  4. Sign in with Better Stack.

Google Antigravity

In the Antigravity app or IDE:

  1. Open Customizations in the sidebar, then Marketplace.
  2. Search for "Better Stack".
  3. Click Add.
  4. Open Agent settings with Cmd + ,, or Ctrl + , on Windows and Linux.
  5. In the Customizations tab, click Authenticate next to the Better Stack server.
  6. Sign in with your Better Stack account.
  7. Paste the authorization code the browser shows and click Submit.

In the Antigravity CLI, install the Better Stack plugin:

Install the Better Stack plugin in Antigravity
agy plugin install https://github.com/BetterStackHQ/antigravity-plugin

Then sign in:

  1. Run /mcp and select betterstack_betterstack.
  2. Choose Authenticate.
  3. Sign in with your Better Stack account at the link it shows.
  4. Copy the authorization code the browser shows and paste it at the prompt.
  5. Run /new to start a new conversation.

Step 2: Test your connection

Your AI assistant can now access Better Stack data. Try these:

  • "Show me the current status of all monitors"
  • "What's the availability of my website monitor?"
  • "What incidents occurred yesterday?"
  • "What metrics are available for my source?"
  • "Build an explore query to find HTTP 500 errors"
  • "Create a dashboard showing error rates for my API service"
  • "Who has access to my team?"

Limiting available tools

Limit the tools your AI assistant gets to give it read-only access, keep it to one workflow, or shrink its initial context:

  • ?toolsets= on the server URL: only the toolsets you list are loaded, whole categories of tools such as ?toolsets=incidents or ?toolsets=telemetry,errors. View all toolsets.
  • /readonly path: load only the tools that read, such as https://mcp.betterstack.com/readonly. A read-only API token, or an OAuth sign-in with read-only access, gets the same.
  • X-MCP-Tools-Only header: choose the specific tools to load.
  • X-MCP-Tools-Except header: load all tools except the ones you list.
All tools Toolsets Read-only Exclude specific tools
{
  "mcpServers": {
    "betterstack": {
      "type": "http",
      "url": "https://mcp.betterstack.com",
      "headers": {
        "Authorization": "Bearer $TOKEN"
      }
    }
  }
}
{
  "mcpServers": {
    "betterstack": {
      "type": "http",
      "url": "https://mcp.betterstack.com?toolsets=incidents,telemetry,errors",
      "headers": {
        "Authorization": "Bearer $TOKEN"
      }
    }
  }
}
{
  "mcpServers": {
    "betterstack": {
      "type": "http",
      "url": "https://mcp.betterstack.com/readonly?toolsets=incidents,telemetry",
      "headers": {
        "Authorization": "Bearer $TOKEN"
      }
    }
  }
}
{
  "mcpServers": {
    "betterstack": {
      "type": "http",
      "url": "https://mcp.betterstack.com",
      "headers": {
        "Authorization": "Bearer $TOKEN",
        "X-MCP-Tools-Except": "remove_dashboard,remove_dashboard_chart"
      }
    }
  }
}


Combining options

?toolsets= picks the toolsets first. Then /readonly or a read-only token keeps only the tools that read, X-MCP-Tools-Only keeps the tools you list, and X-MCP-Tools-Except removes the ones you list. The documentation and file upload tools come with every toolset, whatever the headers say.

Documentation tools

Your AI assistant can search Better Stack documentation and pull relevant articles directly into the conversation:

  • Search documentation: Searches Better Stack documentation and returns the contents of relevant articles

Example queries

  • "How do I forward logs from Kubernetes to Better Stack?"
  • "Look up the Better Stack docs for the Terraform provider"

Incidents tools

Your AI assistant can manage monitoring, incidents, on-call and status pages through natural language. Ask questions like:

  • "Show me all monitors that are currently down"
  • "What's the availability of my website this month?"
  • "Create an incident for the payment service outage"
  • "Who's on-call right now?"
  • "Who's on call next weekend?"
  • "Acknowledge incident #1234 and add a comment about the fix"
  • "Post an update on our status page that the payment outage is resolved"

View all Incidents tools for Monitoring, Incidents and Status pages.

Telemetry tools

Your AI assistant can analyze logs, query metrics, and manage observability infrastructure through natural language. Ask questions like:

  • "Show me all error logs from the past hour"
  • "Create a new log source for my Node.js application"
  • "What metrics are available for my production source?"
  • "Build a query to find HTTP 500 errors in my API logs"
  • "Get field details for my application logs"

View all Telemetry tools.

Error tools

Your AI assistant can manage error tracking applications, analyze exceptions, and query error data through natural language. Ask questions like:

  • "Show me all error tracking applications"
  • "Create a new Python error tracking application"
  • "What errors occurred in production this week?"
  • "Show me all releases for my application"
  • "Build a query to find the most frequent exceptions"
  • "Create a Linear issue for the most frequent error this week"

View all Errors tools.

Team management tools

Your AI assistant can audit who has access to your teams, invite members and change their roles. Ask questions like:

  • "Who has access to my team?"
  • "Invite jane@example.com to the SRE team as a responder"
  • "Change John's role to team lead"

View all team management tools.

File upload tools

Your AI assistant can upload files, like logs and screenshots, and attach them to incident comments:

  • Create file upload: Uploads a file for Create incident comment to attach

Uploading needs an assistant that can run shell commands on your computer, like Claude Code.

Example queries

  • "Attach checkout-errors.log to incident #1234 with a summary of what it shows"

Next steps

Have any questions?

Please feel free to message us at hello@betterstack.com. We'll get back to you as soon as we can, typically within a few hours. 🙏 Thank you!