Skip to content

Connect Better Stack to ChatGPT: Manage incidents & status pages

A complete engineering guide to connecting Better Stack to ChatGPT via an MCP server. Automate incident management, on-call escalations, and status page updates.

Uday Gajavalli Uday Gajavalli · · 8 min read
Connect Better Stack to ChatGPT: Manage incidents & status pages

If you need to connect Better Stack to ChatGPT to automate incident management, update status pages, or query on-call schedules, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between an LLM's tool-calling format and Better Stack's underlying REST APIs. You can either build, host, and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses Claude, check out our guide on connecting Better Stack to Claude or explore our broader architectural overview on connecting Better Stack to AI Agents.

Giving an AI agent read and write access to your primary observability and incident response platform requires precision. You cannot afford an agent hallucinating API payloads during a severity-1 outage. This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Better Stack, connect it natively to ChatGPT, and execute complex DevOps workflows using natural language.

The Engineering Reality of the Better Stack API

A custom MCP server is a self-hosted API middleware. While the open MCP standard provides a predictable way for models to discover tools, implementing it against vendor APIs is entirely your responsibility. If you are building for scale, it is worth understanding how to architect a multi-tenant MCP server for enterprise environments. Better Stack aggregates uptime monitoring, incident escalation, and status page management into a single platform. Integrating an LLM against this surface area exposes several domain-specific challenges.

Status Page Relational Complexity Status pages in Better Stack are highly normalized. A single status page is not a flat object. It contains sections, which contain resources, which generate reports, which have report updates. If you want an LLM to "post an update to the database outage on the status page," the agent cannot simply call a generic update endpoint. It must navigate a deep hierarchy, querying the status page ID, finding the specific report ID, and then injecting the new status update payload. If your MCP server does not enforce strictly typed JSON schemas for these relational inputs, the LLM will fail to map the foreign keys correctly.

Incident Timeline Pagination A major outage generates a massive timeline of events. If an LLM attempts to read the entire history of an incident to summarize it, it cannot ingest 10,000 records at once. The Better Stack API paginates large collections. Your integration layer must handle cursor-based pagination effectively, explicitly instructing the LLM to pass cursor values back unchanged to fetch the next set of records.

Strict Rate Limits During Incident Storms Better Stack enforces strict API rate limits. During a widespread outage, an aggressive AI agent attempting to rapidly poll monitors, heartbeats, and incident comments will inevitably hit these limits. When an upstream API returns an HTTP 429 Too Many Requests response, Truto passes that error directly back to the caller. Truto normalizes the upstream rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. Truto does not retry, throttle, or apply backoff on rate limit errors. The calling AI agent or orchestration framework is strictly responsible for implementing exponential backoff logic based on these normalized headers. If you attempt to swallow these errors, the LLM will assume the tool call succeeded and hallucinate the response.

Generating a Better Stack MCP Server via Truto

Instead of building a custom Node.js or Python application to act as your MCP server, Truto allows you to dynamically generate a compliant JSON-RPC 2.0 server directly from your connected Better Stack account.

Truto uses documentation-driven tool generation. Rather than hand-coding tool definitions, Truto derives them from the integration's defined resources and documentation records. Every generated tool corresponds to a specific method (e.g., list, get, create) and includes query and body schemas automatically translated into LLM-friendly formats.

You can create an MCP server for Better Stack using either the Truto UI or the REST API.

Method 1: Via the Truto UI

  1. Navigate to the Integrated Accounts page in your Truto dashboard and select your active Better Stack connection.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Configure your server. You can limit operations by selecting specific methods (like read or write) and apply tool tags to group functionalities.
  5. Click Create and copy the generated MCP server URL (e.g., https://api.truto.one/mcp/a1b2c3d4e5f6...).

Method 2: Via the Truto API

For platform engineers building automated provisioning flows, you can generate the MCP server programmatically. The API will validate your configuration, generate a secure, hashed token stored in Cloudflare KV, and return the server URL.

curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer <YOUR_TRUTO_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Better Stack Incident Copilot",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'

Response payload:

{
  "id": "mcp_srv_01H...",
  "name": "Better Stack Incident Copilot",
  "config": {
    "methods": ["read", "write", "custom"]
  },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}

The returned URL is fully self-contained. It encodes the integrated account identity and the tool configurations, requiring no additional authentication unless explicitly configured.

Connecting the MCP Server to ChatGPT

Once you have your Truto MCP URL, you can use Truto to bring 100 custom connectors to ChatGPT so the model can natively discover and execute the Better Stack tools.

Method A: Via the ChatGPT UI (Custom Connectors)

If you are using ChatGPT Pro, Plus, Enterprise, or Education accounts, you can add custom MCP servers directly via the web interface.

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Toggle on Developer mode.
  3. Under the MCP servers / Custom connectors section, click to add a new server.
  4. Enter a descriptive name (e.g., "Better Stack Ops").
  5. Paste your Truto MCP URL into the Server URL field.
  6. Click Save.

ChatGPT will perform an initialization handshake with Truto, pull down the allowed Better Stack tools, and make them available in your conversational context.

Method B: Via Manual Config File

If you are running local AI agents, custom desktop clients, or automated test harnesses, you can define the server connection using a standard MCP configuration file, utilizing an SSE transport.

{
  "mcpServers": {
    "betterstack_ops": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/a1b2c3d4e5f6..."
      ]
    }
  }
}

Hero Tools for Better Stack

Truto exposes the entirety of the Better Stack API. Because input namespaces are flat, Truto intelligently maps parameters from the LLM across the required query and request body schemas. Here are the core tools you will rely on for automated incident management.

list_all_better_stack_incidents

Lists all incidents across your Better Stack account. The tool inherently supports pagination, instructing the LLM on how to pass next_cursor values to iterate through historical outage records.

"Fetch all active incidents currently tracked in Better Stack. Ignore anything marked as resolved."

better_stack_incidents_resolve

Resolves a specific Better Stack incident, marking it as closed in the system and stopping escalation policies. Requires the incident_id.

"I have confirmed the database recovery is complete. Resolve incident ID 894321."

better_stack_incidents_escalate

Escalates an existing incident to a higher severity or notifies additional responders configured in the policy. Crucial for automated triage workflows when initial remediation scripts fail.

"The CPU utilization hasn't dropped after the reboot. Escalate incident ID 894321 immediately."

list_all_better_stack_on_call_schedules

Retrieves the configurations for all on-call schedules. This allows an AI agent to determine which rotation is active before making routing decisions or notifying personnel.

"Who is currently on-call for the primary database schedule?"

create_a_better_stack_status_page_report

Posts a new status report to an existing Better Stack status page. This requires mapping the status_page_id and passing the exact report configuration payload.

"Create a new report on our public status page indicating we are currently investigating latency issues affecting the European region."

create_a_better_stack_heartbeat

Creates a new heartbeat monitor. Useful when an AI agent provisions new infrastructure or background jobs and needs to programmatically set up cron monitoring.

"Create a new heartbeat monitor called 'Nightly ETL Job' and set its expectation window to 24 hours."

For the complete inventory of available Better Stack tools and their exact JSON schema requirements, visit the Better Stack integration page.

Workflows in Action

Providing an LLM with API tools is only valuable if it can orchestrate multi-step reasoning to solve real problems. Here is how a DevOps engineer uses ChatGPT to manage incidents and comms in real-time.

Scenario 1: Automated Triage and Public Communication

A monitoring alert fires indicating an API gateway issue. The engineer asks ChatGPT to investigate the current incident state and update the public status page to reduce incoming support tickets.

"Find the most recent active incident regarding the API gateway. Acknowledge it, then create a new status report on our primary public status page stating we are investigating elevated error rates."

Execution sequence:

  1. list_all_better_stack_incidents: ChatGPT queries active incidents and filters for the gateway alert to retrieve its ID.
  2. better_stack_incidents_acknowledge: ChatGPT executes the custom method to mark the incident as seen.
  3. list_all_better_stack_status_pages: ChatGPT fetches available status pages to find the ID of the public-facing one.
  4. create_a_better_stack_status_page_report: ChatGPT writes the initial "Investigating" update to the public dashboard.

Outcome: The on-call engineer has successfully acknowledged the alert and updated customers in seconds without context-switching between Slack, the incident dashboard, and the status page editor.

Scenario 2: Managing On-Call Escalation

An incident has been open for 30 minutes without resolution. The junior responder needs to escalate the issue but isn't sure who is currently on the secondary rotation.

"Incident #55214 is still ongoing. Look up the backend on-call schedule and escalate the incident so the next tier is notified."

Execution sequence:

  1. list_all_better_stack_on_call_schedules: ChatGPT maps the schedule name to its unique ID.
  2. list_all_better_stack_on_call_schedule_rotations: ChatGPT fetches the current rotation to confirm the target.
  3. better_stack_incidents_escalate: ChatGPT invokes the escalation action on the specific incident ID.

Outcome: The incident is correctly routed to the tier-two responder based on real-time scheduling data, enforcing strict operational procedures via natural language.

Security and Access Control

Exposing an incident management API to an LLM requires strict boundary setting. Truto's MCP implementation provides four distinct layers of security to prevent runaway actions or unauthorized access.

  • Method Filtering: You can strictly scope the MCP server during creation using the config.methods property. Setting methods: ["read"] ensures the LLM can only retrieve incident data and schedules, physically preventing it from resolving incidents or deleting monitors.
  • Tag Filtering: Truto allows you to group tools logically via config.tags. You can create an MCP server limited only to status_page resources, isolating your internal escalation data from the public communications agent.
  • Time-to-Live Expiration: You can set an expires_at timestamp when creating the server. Once the timestamp passes, the cryptographic token is purged from Cloudflare KV and the database, instantly terminating the server's access. Ideal for granting temporary access during a post-mortem review.
  • Secondary Authentication Layer: By default, the MCP URL acts as a bearer token. By enabling require_api_token_auth: true, Truto forces the connecting client to also pass a valid Truto API token in the Authorization header, ensuring only validated users in your infrastructure can execute the tools.

Stop Building Boilerplate Connectors

The value of AI in DevOps operations comes from the orchestration and reasoning models provide, not from hand-coding JSON-RPC endpoints to satisfy pagination requirements. Better Stack is a complex platform, and writing a custom MCP server requires managing deep object hierarchies, strict rate limit backoffs, and constant schema maintenance.

Truto eliminates this integration tax. By dynamically generating highly-curated, documented tools directly from the vendor's API definitions, you can connect ChatGPT to Better Stack in minutes, fully secured by read/write method filters and temporal expirations.

FAQ

Does Truto automatically retry Better Stack API requests if they hit rate limits?
No. When the Better Stack API returns an HTTP 429 Too Many Requests error, Truto passes that error directly to the caller. Truto normalizes the rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset), but the calling AI framework must handle its own retry and backoff logic.
Do I need to write custom JSON schemas for Better Stack tools?
No. Truto automatically generates MCP tool definitions - including operation descriptions and strictly typed JSON schemas for queries and request bodies - directly from the Better Stack integration's documentation records.
Can I restrict my ChatGPT agent to read-only access for Better Stack?
Yes. When generating the MCP server via Truto, you can use method filtering to restrict the server to specific operations, such as ['read'], preventing the LLM from executing destructive actions like deleting monitors.
How do I securely share an MCP server with other team members?
You can enable the require_api_token_auth flag when creating the MCP server. This requires clients connecting to the URL to provide a valid Truto API token in the Authorization header, adding a second layer of security beyond just the URL.

More from our Blog