Use Better Stack with Claude
The Better Stack plugin puts our AI SRE in Claude, with its skills and every Better Stack tool. It runs on your Claude subscription with the latest Claude models, and it's free on every Better Stack plan.
Once it's connected, ask Claude to:
- Investigate an incident, find its root cause in your logs, metrics, traces, errors, and code, and open a pull request with the fix.
- Explain why a service got slow or started failing, and what changed around that time.
- Set up monitors, heartbeats, dashboards, and alerts for a new service, or post a status page update.
You can also have Claude fix your errors on a schedule, with pull requests you review, or investigate every new incident as soon as it starts.
Connect Claude to Better Stack
Claude Code
Install the Better Stack plugin:
Claude web, desktop, and mobile apps
- Add the Better Stack plugin in Claude.
- On the plugin's Connectors tab, connect Better Stack and sign in with your Better Stack account.
- Start a new chat.
Using Claude Team or Enterprise?
An Owner adds the Better Stack connector in Organization settings → Connectors before members can connect it.
Claude Tag in Slack
A Claude organization admin connects Better Stack once, and Claude uses it in your Slack channels.
- Create an API token for Claude in Better Stack → API tokens → Global tokens
- Go to Claude Tag → Claude's connectors, click Add, and select Custom connector.
- Enter
Better Stackas the Name and select MCP Connector as the Credential type. - In Provider, select Add custom connector…, name it
Better Stack, enterhttps://mcp.betterstack.comas its server URL, and save it. - On the Custom authentication tab, add the API token as a header:
- Header name:
X-Api-Key - Header prefix: leave it empty.
- Header secret: the API token.
- Header name:
- Save the connector. If its credential shows Not assigned yet, open Select access next to Slack under Assign access, pick the Better Stack credential, click Done, and click Save changes.
Then try it in a Slack channel: @Claude investigate our latest Better Stack incident and tell me the likely cause.
Prefer signing in to an API token?
Invite a Better Stack account for Claude in Settings → Teams → Members. Then, instead of authenticating with a header, choose the MCP Connector tab, click Sign in with Better Stack, and sign in as that account.
Fix errors on a schedule with Claude
Add a Claude scheduled task that checks your errors in Better Stack every 4 hours and fixes the obvious ones with pull requests. It runs in Anthropic's cloud, so you can close your laptop and merge the pull requests later from your phone.
- Connect Better Stack to your Claude account.
- Open Claude Code in your app's repository.
- Paste this prompt:
Claude creates the task and gives you its link. To try it right away, ask Claude to run it now.
What will Claude change?
It only opens pull requests, and each one links the Better Stack error it fixes. Nothing is merged until you review it. Errors that already have an open pull request are skipped, and so are outages and configuration problems.
Page Claude for your incidents
Have Claude investigate every new incident the moment it starts, alongside the people on call or a few minutes before them. Better Stack wakes a Claude task in Anthropic's cloud, which comments on the incident with the likely cause and the next step.
- Connect Better Stack to your Claude account.
- Open Claude Code in your app's repository, in your terminal or at claude.ai/code.
Paste this prompt:
Prompt to put Claude on callWhen Claude asks, add the task's API trigger:
- Open the task's link.
Click the arrow next to the task's name and choose Edit.
In Trigger, click + and choose API.
Copy the Fire URL, then click Generate token and copy the token.
Paste both into the chat.
Claude creates the Page Claude webhook in Better Stack, so incidents without an escalation policy wake Claude. It then asks which escalation policies Claude joins, alongside your people or a few minutes before them, and adds the webhook there.
Need help?
Please let us know at hello@betterstack.com.
We're happy to help! 🙏