MCP server for AI tools
Connect Claude, Cursor and other MCP clients to SutramX so AI assistants can check monitors, read check results, handle incidents and manage status pages.
The SutramX MCP server lets AI assistants and agents work with your SutramX workspace through the Model Context Protocol. Once connected, you can ask Claude, Cursor or any other MCP client things like "which monitors are down right now?", "why is checkout down?" or "acknowledge the checkout incident", and it uses SutramX tools to answer.
The server is the npm package @sutramx/mcp-server, listed in the MCP Registry as io.github.SutramX/mcp-server. The source is at github.com/SutramX/mcp-server.
How it works#
The server calls the public SutramX API with a workspace API key. It can do exactly what that key can do and nothing more: it can't see other workspaces, billing, team members or API keys. Plan limits apply exactly as in the dashboard.
There are two ways to run it:
| Transport | When to use it |
|---|---|
| Local (stdio) | Your MCP client starts the server on your machine. One user, key from the SUTRAMX_API_KEY environment variable. |
| HTTP | The server runs as a web endpoint (POST /mcp). Every request sends its own API key (or, on the hosted endpoint, an access token from signing in), so one server can serve several people and workspaces. |
1. Create an API key#
Open Account settings → API keys → Create API key. Keys start with sk_ and are shown only once. Whether you can create API keys depends on your plan: see Plans & limits.
Choose the access level for what you want the assistant to do. The level is fixed when the key is created.
| Access level | What the assistant can do |
|---|---|
| Read-only (the dashboard default, recommended) | Use every read tool: monitors, check results, incidents, status pages, uptime reports, maintenance windows. SutramX refuses every change it attempts with 403 READ_ONLY_ACCESS, even if a write tool is offered. |
| Standard | Also create, change, pause, resume and delete monitors, run checks, acknowledge and resolve incidents, add incident notes and manage status pages. This is enough for every tool. |
| Automation | Not needed: the server has no tools for alert channels. |
A read-only key is the safest choice for assistants that only look things up (triage, reporting): even an assistant that is tricked by text it reads can't change anything. Use a Standard key only for an assistant that really needs to make changes.
2. Connect your client#
For a local (stdio) connection, MCP clients start the npm package @sutramx/mcp-server (Node.js 20 or newer) with npx, as in the examples below.
Claude Code#
claude mcp add sutramx \
--env SUTRAMX_API_KEY=sk_your_key \
-- npx -y @sutramx/mcp-serverOr share it with your team through a .mcp.json file in your project. Keep the key out of version control by reading it from the environment:
{
"mcpServers": {
"sutramx": {
"command": "npx",
"args": ["-y", "@sutramx/mcp-server"],
"env": { "SUTRAMX_API_KEY": "${SUTRAMX_API_KEY}" }
}
}
}Claude Desktop#
Edit claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"sutramx": {
"command": "npx",
"args": ["-y", "@sutramx/mcp-server"],
"env": { "SUTRAMX_API_KEY": "sk_your_key" }
}
}
}Restart Claude Desktop. Then try: "Which SutramX monitors are down right now, and since when?"
Cursor#
Add the server to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"sutramx": {
"command": "npx",
"args": ["-y", "@sutramx/mcp-server"],
"env": { "SUTRAMX_API_KEY": "sk_your_key" }
}
}
}Other MCP clients#
Any client that can start a local (stdio) MCP server works. Configure:
- Command:
npx - Arguments:
-y @sutramx/mcp-server - Environment:
SUTRAMX_API_KEY=sk_your_key
Connect over HTTP#
SutramX runs the server at https://api.sutramx.com/mcp. Send your key as a bearer token on every request:
POST /mcp HTTP/1.1
Host: api.sutramx.com
Authorization: Bearer sk_your_key
Content-Type: application/json
Accept: application/json, text/event-streamFor example, in Claude Code:
claude mcp add --transport http sutramx https://api.sutramx.com/mcp \
--header "Authorization: Bearer sk_your_key"The HTTP endpoint is stateless and answers with JSON. A request without credentials gets HTTP 401 with a sign-in challenge. Clients that support MCP sign-in (OAuth), such as a Claude.ai connector, can use it instead of an API key: you sign in to SutramX, choose the workspace and approve the app. Apps connected this way are listed under Account settings → Authorized apps, where you can revoke them. An app connected by a viewer, or without write access, gets only the read tools.
On the hosted endpoint, the destructive tools (the two delete tools and sutramx_set_status_page_monitors) are never offered, and publishing is off (see Tool modes). You can still narrow a client to the read tools with a request header:
claude mcp add --transport http sutramx https://api.sutramx.com/mcp \
--header "Authorization: Bearer sk_your_key" \
--header "X-SutramX-Read-Only: true"Tool modes#
You, not the assistant, decide which tools the server offers. Tools that aren't offered are hidden from the assistant completely.
| Mode | Tools offered | Local (stdio) server | HTTP request header |
|---|---|---|---|
| Default | Every tool except the destructive ones marked "Destructive" in the tool list | Nothing to set | Nothing to send |
| Read-only | Only the tools marked "Read" in the tool list | SUTRAMX_READ_ONLY=true | X-SutramX-Read-Only: true |
| Destructive mode | Every tool, including sutramx_delete_monitor, sutramx_delete_status_page and sutramx_set_status_page_monitors, and actions that change what the public sees | SUTRAMX_ALLOW_DESTRUCTIVE=true | X-SutramX-Allow-Destructive: true, only on a server whose operator also set SUTRAMX_HTTP_ALLOW_DESTRUCTIVE_HEADER=true (not the hosted endpoint) |
- The values
true,1,yesandonall switch a mode on. - Read-only wins: with both set, the destructive tools stay hidden.
- Without destructive mode, the server also refuses actions that change what the public sees:
sutramx_create_status_pagecreates pages that aren't public,sutramx_update_status_pagecan't changeis_publicorslugand can't edit a page that is already public, andsutramx_add_incident_notecan't post a public update. Do those in the dashboard. - On a server you run with
--http, the environment variables apply to every request. A header can narrow a request to read-only, but can't turn off a read-only mode set in the server's environment. - Read-only mode hides the write tools; a read-only API key makes SutramX refuse every change. Use both for an assistant that should only look.
For a local server, add the variable to the env block of your client config, next to SUTRAMX_API_KEY:
"env": { "SUTRAMX_API_KEY": "sk_your_key", "SUTRAMX_READ_ONLY": "true" }Configuration#
These environment variables apply when you run the server yourself.
| Variable | What it does | Default |
|---|---|---|
SUTRAMX_API_KEY | Workspace API key. Required for the local (stdio) transport. | |
SUTRAMX_API_URL | API base URL. Must use https:// (plain http:// only for localhost). | https://api.sutramx.com |
SUTRAMX_READ_ONLY | true offers only the read tools (see Tool modes) | false |
SUTRAMX_ALLOW_DESTRUCTIVE | true turns on destructive mode | false |
SUTRAMX_HTTP_ALLOW_DESTRUCTIVE_HEADER | true lets HTTP clients turn on destructive mode with X-SutramX-Allow-Destructive: true | false |
SUTRAMX_MAX_WRITES_PER_MINUTE / SUTRAMX_MAX_WRITES_PER_HOUR | Most changes the server makes per session (per API key over HTTP) | 20 / 200 |
SUTRAMX_MAX_PAUSES_PER_HOUR | Most monitor pauses per session when destructive mode is off | 10 |
MCP_OAUTH | off accepts API keys only, with no OAuth sign-in | on |
TRANSPORT | http runs the HTTP server instead of stdio (same as the --http flag) | stdio |
HOST / PORT | Where the HTTP server listens | 127.0.0.1 / 3333 |
MCP_ALLOWED_HOSTS | Comma-separated Host header values to accept when not listening on loopback | none |
MCP_ALLOWED_ORIGINS | Extra browser origins allowed to call /mcp, comma-separated, e.g. https://app.example.com | none |
Running your own HTTP server:
PORT=3333 npx -y @sutramx/mcp-server --httpThe endpoint is then POST http://127.0.0.1:3333/mcp, and GET /health returns the server version.
- While the server listens on loopback (the default),
SUTRAMX_API_KEYis used for requests that send noAuthorizationheader. A header that isn't a valid credential is rejected with 401, never replaced by the server's key. - With
NODE_ENV=production, the HTTP server won't start unlessOAUTH_RESOURCE_PROXY_SECRETis set orMCP_OAUTH=off. For a self-hosted server that only takes API keys, setMCP_OAUTH=off. - With any other
HOST, the environment key is ignored and every request must send its own key. Put the server behind HTTPS, and setMCP_ALLOWED_HOSTSto keep DNS-rebinding protection when binding to0.0.0.0. - Browser requests are accepted only from a loopback origin or one listed in
MCP_ALLOWED_ORIGINS. Requests without anOriginheader are always allowed.
Tools#
The server has 26 tools. "Read" tools never change anything and are always offered; "Write" tools are hidden in read-only mode and refused for a read-only key; "Destructive" tools are offered only in destructive mode (see Tool modes).
Most read tools take an optional response_format: markdown (a readable summary, the default) or json (the full structured data).
Account and regions#
| Tool | What it does | Parameters | Kind |
|---|---|---|---|
sutramx_whoami | Workspace, plan and limits (monitors, minimum interval, locations per monitor, status pages), the key's access level, whether it is read-only and whether it may manage alert channels | response_format | Read |
sutramx_list_regions | Every probe location: code, city, country, continent and whether it is online | response_format | Read |
Monitors#
| Tool | What it does | Parameters | Kind |
|---|---|---|---|
sutramx_monitor_summary | Counts by status, open incidents, workspace 24h uptime and last incident | response_format | Read |
sutramx_list_monitors | Monitors with live status and uptime | status, tag, search, limit (1–200, default 50), offset, response_format | Read |
sutramx_get_monitor | One monitor's config, regions, status, uptime, last check and open incident | monitor_id or key, response_format | Read |
sutramx_get_check_results | Check history, newest first, one row per check per region | monitor_id, limit (1–500, default 50), before, region, status, response_format | Read |
sutramx_create_monitor | Create a monitor; with key, create or update | name, type (default http), url, interval_seconds, config, tags, regions, key, paused | Write |
sutramx_update_monitor | Change a monitor; only the fields you pass change | monitor_id, name, url, interval_seconds, config, tags, regions | Write |
sutramx_pause_monitor | Stop checks and alerts until resumed; history is kept | monitor_id | Write |
sutramx_resume_monitor | Resume a paused monitor; it is checked right away | monitor_id | Write |
sutramx_run_check | Run one real check now from one region and record it like a scheduled check | monitor_id | Write |
sutramx_delete_monitor | Permanently delete a monitor with its check history and incidents | monitor_id | Destructive |
Parameter details:
statusonsutramx_list_monitorsis one ofup,down,degraded,paused,pending,maintenance.searchmatches the name or URL.typeishttp,api,ping,port,udp,cron,dns,multistepormcp(anmcpmonitor needs anhttps://url).interval_secondsis 15–900 and not below your plan's minimum.tagsare up to 20 lower-case labels of up to 32 characters.regionsare location codes such as["fra1", "usa-az-probe"].configholds type-specific settings, for example{"timeout": 10000, "expected_status_codes": [200], "keyword": "ok"}for HTTP,{"host": "db.example.com", "port": 5432}for a port check, or{"cron_expression": "*/5 * * * *"}for a heartbeat.- Stored credentials in a monitor's config (secret headers, tokens, passwords) are shown to the assistant as
[REDACTED]. When it sends[REDACTED]back in an update, the stored value is kept. - On
sutramx_update_monitor,configreplaces the whole config object andregionsreplaces the locations. The assistant is told to read the monitor first and send the merged config. The type can't be changed. sutramx_create_monitorwith akeybehaves like monitors as code: the monitor is created once and updated on later calls. Without a key, every call creates a new monitor.sutramx_run_checkis refused for paused monitors and is rate limited to 30 per 5 minutes.- On
sutramx_get_check_results,statusisup,down,degradedorproblem(every check that wasn't up). Page back withbeforeset to thenext_beforevalue of the previous page.
Incidents#
| Tool | What it does | Parameters | Kind |
|---|---|---|---|
sutramx_list_incidents | Incidents, newest first, with confirming regions and acknowledgement | status (all, ongoing, resolved, acknowledged, suppressed), monitor_id, query, from, to, page, page_size (1–100, default 25), response_format | Read |
sutramx_get_incident | One incident with its timeline, error details, notes, runbook and postmortem | incident_id, response_format (default json) | Read |
sutramx_explain_incident | Why an incident was opened, or why a monitor is (or isn't) down: the verdict, whose fault it is, each region's vote, the quorum rule and whether it was met, the failure class, vendor signals and the flakiness score. See Why this alert | one of incident_id, monitor_id or monitor (name, key or URL fragment); include_last_incident (default true), response_format | Read |
sutramx_acknowledge_incident | Acknowledge an ongoing incident; stops escalation to the next on-call step | incident_id | Write |
sutramx_resolve_incident | Resolve an ongoing incident by hand | incident_id, note (up to 5000 characters) | Write |
sutramx_add_incident_note | Add a note to the incident timeline | incident_id, body (up to 5000 characters), public (default false) | Write |
sutramx_explain_incident answers questions like "why is checkout down?", "was that alert real?" or "is it us or Stripe?" from the same deterministic explanation as the dashboard's Why this alert panel, on every plan:
- For a monitor with an open incident it explains that incident. Without one, it explains the monitor's current state per region and, unless
include_last_incidentisfalse, its most recent incident. outcomeisongoing,resolved,healthy,failing_unconfirmed(failing checks, but too few regions agree for an incident),no_data,pausedorambiguous.in_maintenanceistruewhile a maintenance window silences alerts, andincidents_totalis0for a monitor that never had an incident.faultisyours,external(a vendor or third party),checker(our checker, not your site) orunknown. Regions whose checks were blocked by bot protection or were inconclusive on our side abstain and are not counted toward the quorum.- Vendor signals say how many SutramX accounts saw the same vendor fail only as
severalormany, never an exact number or who they are. - When several monitors match
monitor, the tool lists up to 10 of them and the assistant asks which one you mean.
from and to are ISO-8601 times. A note with public: true is published as a public update instead of an internal team note; this needs destructive mode. Incidents also resolve automatically when checks recover, so manual resolution is only for when you know the issue is fixed.
Status pages#
| Tool | What it does | Parameters | Kind |
|---|---|---|---|
sutramx_list_status_pages | Status pages with slug, visibility, custom domain and monitor count | response_format | Read |
sutramx_get_status_page | One page's settings and its monitors, with sections | status_page_id, response_format | Read |
sutramx_create_status_page | Create a page (counts against your plan's status page limit). Without destructive mode, the page is created not public | title, description, is_public | Write |
sutramx_update_status_page | Change page settings; only the fields you pass change | status_page_id, title, description, slug, is_public, logo_url, accent_color, favicon_url, show_response_times, hide_powered_by, other_fields | Write |
sutramx_set_status_page_monitors | Replace the monitors shown on a page, in order | status_page_id, monitors (list of { monitor_id, section }, up to 500), remove_all (default false) | Destructive |
sutramx_delete_status_page | Permanently delete a page and its subscriber list; monitors aren't affected | status_page_id | Destructive |
hide_powered_by and favicon_url work only on plans with white-label status pages. logo_url and favicon_url must be https:// URLs. other_fields accepts the same settings nested in one object, for clients that send them that way; anything else is refused. Monitors left out of sutramx_set_status_page_monitors are removed from the page, not deleted, and an empty list is refused unless remove_all is true. Custom domains are managed in the dashboard.
Uptime reports and maintenance windows#
| Tool | What it does | Parameters | Kind |
|---|---|---|---|
sutramx_uptime_report | Uptime report: per monitor uptime %, incident count, mean time to recovery (MTTR), number of checks and a 0–100 health score, plus each SLO with its error budget and burn rates | days (7, 14, 30 or 90, default 30), monitor_id, response_format | Read |
sutramx_list_maintenance_windows | Maintenance windows, newest start first, with their state, times, time zone, impact, scope (all monitors, monitors or groups) and recurrence | status (scheduled, ongoing, completed, cancelled), response_format | Read |
- In the uptime report, degraded (slow) checks count as up. SLO targets are set in the dashboard; without them the SLO part is empty. See Reliability insights.
- The maintenance
statusfilter uses the window's live state, so a scheduled window whose start time has passed counts asongoing. Alerts are silenced while a window is active. The assistant can only list windows: the workspace owner creates and changes them in the dashboard, see Maintenance windows.
Safety#
- Scope. The server can only do what the API key can do, in that key's workspace. It has no tools for alert channels, maintenance windows, billing, team members or API keys.
- Read-only keys. With a read-only key, SutramX itself refuses every change, whatever the assistant tries.
- Tool modes. Destructive tools and public-facing changes are off unless the server operator enables them, and read-only mode hides every write tool.
- Session limits. The server makes at most 20 changes a minute, 200 an hour and 10 monitor pauses an hour per session (per API key over HTTP). Beyond that it refuses with "session limit of this MCP server".
- Tool hints. Every tool is annotated as read-only or not, and the destructive tools are marked destructive. Clients that support these hints ask you before running a destructive tool, and the tool descriptions tell the assistant to confirm with you first.
- Untrusted text. Error messages, notes and names come from monitored websites or other people. The server tells the assistant to treat them as data, never as instructions.
- Revoking access. Delete the API key in Account settings → API keys, or revoke a signed-in app in Account settings → Authorized apps; the server's requests then fail.
Example prompts#
- "Give me a health summary of my SutramX workspace."
- "Which monitors are down or degraded, and since when?"
- "Why is the checkout API down? Is it us or a vendor?"
- "Was last night's alert on the homepage a real outage?"
- "Show the failed checks for the checkout API in the last hour, by region."
- "Give me a 90-day uptime report with incident counts and MTTR for every monitor."
- "Is a maintenance window active right now?"
- "Run a check on the homepage monitor now."
- "Create an HTTP monitor for https://example.com/health every minute from fra1 and usa-az-probe, tagged prod."
- "Pause every monitor tagged staging."
- "Acknowledge the ongoing incident on the payments API and add a note that we're rolling back."
- "Which status pages show the checkout API monitor?"
Troubleshooting#
| Problem | What to do |
|---|---|
SUTRAMX_API_KEY is not set | Add the key to the env block of your client config |
| HTTP 401 from the HTTP endpoint | Send Authorization: Bearer sk_... with a valid key, or sign in again if your client uses OAuth |
READ_ONLY_ACCESS | The API key is read-only, so changes are refused. Use a Standard key if the assistant should make changes. |
| The assistant has no delete tool, or no write tools at all | Destructive tools are off by default (and always on the hosted endpoint), and read-only mode hides write tools. See Tool modes. |
Refused: ... is disabled on this server | The action needs destructive mode. Do it in the dashboard, or enable destructive mode on a server you run yourself. |
Refused: ... (session limit of this MCP server) | Too many changes in a short time. Wait, or make bulk changes in the dashboard. |
ENTITLEMENT_LIMIT_REACHED or FEATURE_NOT_AVAILABLE | Your plan doesn't allow the change. Ask the assistant to run sutramx_whoami and see Plans & limits. |
Origin not allowed | Add the browser origin to MCP_ALLOWED_ORIGINS on your own server |
| An update removed config settings | config replaces the whole object. Ask the assistant to read the monitor and send the merged config. |
Related
- REST API
- CLI & monitors as code
- Incidents
- AI incident assist
- Developer overview
- Features: MCP Server Monitoring
- Guides: How to Monitor MCP Servers
- More from SutramX: Developers & API
Last updated . Something unclear or missing on this page? Tell us at support@sutramx.com.