Better Stack MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Better Stack MCP or direct API to query monitors, list incidents, search logs, and create incidents through natural language.

Better Stack MCP logoBetter Stack MCP
Dcr Oauth

Better Stack is an observability platform for monitoring, incident management, and log aggregation. Use it to detect, investigate, and resolve incidents quickly with real-time alerts.

111 Tools

Try Better Stack MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Better Stack MCP
Try asking
TOOLS

Supported Tools

Every Better Stack MCP action and event your agent gets out of the box.

Acknowledge incident

Acknowledge an ongoing incident

Add chart to dashboard

Add a new chart to a dashboard.

Add dashboard section

Add a section divider to a dashboard.

Application

Get comprehensive details of a specific application including its configuration, retention settings, ingestion details, custom bucket settings (if configured)

Applications

List all available applications in a paginated table format.

Available incident escalation policies

Get available escalation policies for an incident

Change team member role

Change a team member's role.

Chart

Get detailed information about a specific chart including its SQL queries, configuration, and settings.

Chart alert

Get detailed information about a specific chart alert including its configuration, SQL queries, status, and current incident info.

Chart alert help

Get instructions for creating and configuring chart alerts, including alert types, operators, configuration fields, supported chart types, and common mistakes.

Chart alerts

List chart alerts with optional filtering by team, chart, or dashboard.

Chart building help

Get comprehensive instructions for building charts and dashboards, including chart types, units, axis settings, column mapping, legend placement, layout tips, and common mistakes.

Clusters

List all available storage clusters for a specific team.

Create application

Create a new application in Better Stack.

Create chart alert

Create a new chart alert on an existing chart.

Create cloud connection

Create a secure cloud connection for direct ClickHouse query access to logs, spans, and metrics data.

Create dashboard

Create a new dashboard.

Create heartbeat

Create a new heartbeat that expects a periodic request from a cron job, worker, or other background task, and alerts when that request stops arriving.

Create incident

Create a new incident providing a summary of the issue, requester email, and other optional details

Create incident comment

Create a comment on an incident

Create metric expression

Create a new metric expression (extract-metrics-from-logs rule) on a source.

Create monitor

Create a new monitor that tracks the availability of a website, host, or service.

Create source

Create a new log source in Better Stack.

Create status page report

Create a new status page report

Create status page report update

Create a new status update for an existing status page report

Create status page resource

Add a resource (monitor, heartbeat, or group) to a status page.

Create status page section

Create a section (resource group) on a status page to group resources under a heading

Dashboard

Get detailed information about a specific dashboard including its charts, sections, layout, template variables, and configuration.

Dashboard query help

Get instructions for writing a ClickHouse query to use inside a Better Stack **Dashboard** chart (or chart alert).

Dashboards

List all available dashboards in a paginated table format.

Dashboard templates

List all available dashboard templates in a paginated table format.

Data regions

List all available data regions and clusters for application and source creation.

Delete chart alert

Delete a chart alert permanently.

Delete metric expression

Delete a metric expression from a source.

Documentation

Search for relevant documentation articles and return their contents

Edit application

Edit an existing application in Better Stack - rename it, pause or resume ingesting, or set its VRL transformations, including the exception grouping program.

Edit chart

Edit an existing chart name, query, type, or settings.

Edit chart alert

Edit an existing chart alert configuration.

Edit dashboard

Edit an existing dashboard's name or source eligibility.

Edit dashboard section

Edit an existing dashboard section.

Error

Get comprehensive details of a specific error including its type, message, call site information, first occurrence, current state (unhandled, unresolved, ignored, resolved, or reoccurred), and linked Linear/Jira issues

Errors

List error patterns for an application with occurrence counts, affected users, current state, and links.

Errors query help

Get comprehensive instructions for building SQL ClickHouse queries for error tracking, including both error patterns (metrics) and individual exceptions.

Escalate incident

Escalate an ongoing incident to a user, team, schedule, or policy

Escalation policies

List all escalation policies with their steps and configuration

Escalation policy

Get detailed information about a specific escalation policy

Exploration

Get detailed information about a specific exploration (saved Explore query) including its sources, chart type, template variables, saved time range, and query.

Explorations

List saved explorations (saved Explore queries) in a paginated table.

Explore logs query help

Get instructions for writing a ClickHouse query to use inside the Better Stack **Explore logs** page (and live-tail charts) for log and span data.

Export dashboard

Export a dashboard configuration as JSON.

Heartbeat

Get details of a specific heartbeat

Heartbeat availability

Get availability summary for a specific heartbeat

Heartbeats

List all heartbeats with filtering and pagination options

Import dashboard

Import a dashboard from JSON configuration.

Incident

Get detailed information about a specific incident

Incident comments

Get comments for an incident

Incidents

List incidents with filtering and pagination options

Incident timeline

Get the timeline of events for an incident

Invite team member

Invite someone to a Better Stack team by e-mail address.

Metric

Get comprehensive details about a specific metric.

Metric expressions

List the metric expressions (extract-metrics-from-logs rules) on a source.

Metrics query help

Get instructions for building SQL ClickHouse queries for metrics (available metrics, aggregations, examples) to run directly via the query tools (`query` / `render_chart`), using concrete `remote(.

Metrics schema

Get metrics and cardinality for a source.

Monitor

Get details of a specific monitor

Monitor availability

Get availability (SLA) summary for a specific monitor

Monitor response times

Get response time metrics for a specific monitor

Monitors

List monitors with optional filtering and pagination

Move charts

Move one or more charts to new positions on a dashboard.

On call

Get detailed information about a specific on-call calendar or the default calendar

On call event

Get detailed information about a specific on-call event

On call events

List all on-call schedule events for a specific calendar

On call rotation

Get on-call rotation configuration for a specific calendar

On calls

List all on-call calendars for the team

Query

Execute a ClickHouse SQL query to retrieve logs, traces/spans, errors, and metrics from telemetry data.

Query help

Get instructions for building SQL ClickHouse queries for logs and spans (fields, aggregations, examples) to run directly via the query tools (query / render_chart) against the ClickHouse proxy.

Releases

List all releases for a specific application in a paginated table format.

Remove chart

Remove a chart from its dashboard permanently.

Remove dashboard

Remove a dashboard permanently.

Remove dashboard section

Remove a section divider from a dashboard permanently.

Remove dashboard variable

Remove a dashboard template variable by name.

Remove exploration variable

Remove a variable from an exploration (saved Explore query) by name.

Remove status page resource

Remove a resource from a status page

Remove status page section

Remove a section from a status page.

Remove team member

Remove a member from a Better Stack team, or cancel a pending invitation.

Render chart

Execute a ClickHouse SQL query and visualize the result as a chart.

Reopen incident

Reopen a resolved incident (must be within 24 hours of resolution)

Replays query help

Get comprehensive instructions for building SQL ClickHouse queries for session replays.

Resolve incident

Resolve an ongoing incident

Set dashboard variable

Create or update a dashboard template variable — a user-facing filter in the dashboard toolbar, referenced in chart SQL as `{{name}}` (required — the chart errors until it resolves to a value) or `[[ AND col = {{name}} ]]` (optional — the whole `[[ .

Set exploration variable

Create or update a variable on an exploration (saved Explore query), referenced in its query as `{{name}}`.

Severities

List all severities (urgency levels) with their notification settings

Severity

Get detailed information about a specific severity (urgency level)

Source

Get comprehensive details of a specific source including its configuration, retention settings, ingestion details, custom bucket settings (if configured)

Source fields

Get complete field catalog for a logs or spans source.

Sources

List all available sources in a paginated table format.

Status page

Get details of a specific status page

Status page reports

List status reports (incidents/maintenance) for a specific status page

Status page report update

Get details of a specific status page report update

Status page report updates

List status updates for a specific status report

Status page resources

Get resources (monitors/heartbeats) for a specific status page

Status pages

List all status pages with filtering and pagination options

Status page sections

List the sections (resource groups) of a status page

Team members

List the members of a Better Stack team, including pending invitations.

Team roles

List the roles defined in a Better Stack organization, including their role_id and system-role identifier (admin, billing_admin, team_lead, responder, member, or "custom").

Teams

List all available teams in Better Stack Logs.

Toggle chart alert pause

Pause or unpause a chart alert.

Update error state

Update the state of a specific error (mark as resolved, ignored, or unresolved)

Update metric expression

Update an existing metric expression.

Update status page

Update the settings of a status page (company name, contact URL, theme, layout, and more)

Update status page resource

Update a resource on a status page.

Update status page section

Rename a status page section or move it by setting its position

SETUP GUIDE

Connect Better Stack MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["better_stack_mcp"],
  mcp: true,
});
Create a session scoped to Better Stack MCP and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "List active monitors with recent failures",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Better Stack MCP request
SETUP GUIDE

Connect Better Stack MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["better_stack_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Better Stack MCP
3

Run Better Stack MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "List active monitors with recent failures" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Better Stack MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native Better Stack MCP Integration

  • Supports both Better Stack MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Better Stack MCP data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Better Stack MCP access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Better Stack MCP
  • Scoped, least privilege access to Better Stack MCP resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Yes, Better Stack MCP requires you to configure your own Dcr Oauth credentials. Once set up, Composio handles secure credential storage and management for you.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Better Stack connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

When you connect a Better Stack account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Better Stack as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Whatever the credentials you connect allow inside Better Stack. If Better Stack lets you scope a key to specific permissions, create a scoped one so the agent can only do what you intend. You can revoke the key inside Better Stack at any time.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Better Stack connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

Composio's free Hobby plan includes 100,000 tool calls per month with no credit card, which covers most personal Better Stack use. Paid plans add higher limits and team features. Your Better Stack plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Better Stack accounts).

With Composio, you connect Better Stack once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Better Stack MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Better Stack MCP tool your agent needs.Free to start.

Start building