MCP server

Connect AI assistants to your Uptime 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: Generate your API token

You'll need a Better Stack API token to authenticate the MCP server. Follow our API authentication guide to create one.

Step 2: Install the MCP server

The Better Stack MCP server runs as a remote HTTP server. Add this configuration to your MCP client:

For clients supporting HTTP servers:

Example remote configuration
{
  "mcpServers": {
    "betterstack": {
      "type": "streamableHttp",
      "url": "https://mcp.betterstack.com",
      "headers": {
        "Authorization": "Bearer $TOKEN"
      }
    }
  }
}

For clients without HTTP server support:

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

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

Step 3: 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"

Query your logs & metrics

You can execute ClickHouse queries directly against your Better Stack data using our read-only query API. This requires an HTTP client tool like @mcp-get-community/server-curl:

HTTP client configuration
{
  "mcpServers": {
    "betterstack": {
      // ... your Better Stack MCP config
    },
    "@mcp-get-community/server-curl": {
      "runtime": "node",
      "command": "npx",
      "args": [
        "-y",
        "@mcp-get-community/server-curl"
      ]
    }
  }
}

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!