
SutramX
io.github.SutramXv0.1.1更新于 Oct 4, 2026
SutramX uptime monitoring: monitors, check results, incidents, status pages and uptime/SLO reports.
概览
让助手读取和管理 SutramX 正常运行时间监控:监控项、检查结果、事件、状态页以及可用率/SLO 报告。
- 功能
- 通过公开 API 把助手连接到 SutramX 工作区。只读工具涵盖工作区信息、监控项汇总与列表、检查历史、事件、状态页、探测区域,以及带错误预算的可用率/SLO 报告。写入工具可创建、修改、暂停、恢复和立即运行监控项,确认或手动解决事件、添加时间线备注,以及创建或修改状态页及其监控项列表。两个删除工具默认隐藏,需显式启用。
- 适用场景
- 适合让助手排查故障、回答监控状态与事件相关问题,或基于 SutramX 工作区生成可用率与 SLO 报告。也适合需要创建或调整监控项和状态页的代理。只读模式适合只需查看的助手。
- 运行要求
- 本地运行 Node.js 20 或更新版本的进程,可通过 npx 或构建后的入口启动。需要 SutramX 工作区 API 密钥,放在 SUTRAMX_API_KEY(建议代理使用只读密钥)。可选设置:SUTRAMX_READ_ONLY、SUTRAMX_ALLOW_DESTRUCTIVE、SUTRAMX_API_URL,以及 HTTP 模式的 HOST、PORT、MCP_ALLOWED_HOSTS、MCP_ALLOWED_ORIGINS。需要访问 SutramX API 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 SutramX,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
SutramX MCP server
A Model Context Protocol server that lets AI agents and assistants (Claude Code, Claude Desktop and other MCP clients) work with your SutramX workspace: list and change monitors, read check results, handle incidents and manage status pages.
It talks to the public SutramX API with a workspace API key, so it can do exactly what that key can do and nothing more.
Tools
Destructive tools are annotated with destructiveHint, so clients that support it ask before running them.
Access modes
Agents can be steered by text they read (prompt injection), so the user, not the agent, chooses which tools the server offers. Tools that are not allowed are not registered at all: the agent never sees them.
- Both settings are off by default, so
sutramx_delete_monitorandsutramx_delete_status_pageare hidden unless deletes are enabled.true,1,yesandon(any case) turn a setting on; anything else leaves it off. - Read-only wins: with read-only on, the delete tools stay hidden even when deletes are enabled.
- HTTP mode: a header can only add to the server's environment, not take away from it.
SUTRAMX_READ_ONLY=trueon the server makes every request read-only whatever the headers say, andSUTRAMX_ALLOW_DESTRUCTIVE=trueon the server enables deletes for every request that is not read-only. Without them, each client chooses with its own headers. - Use read-only mode for assistants that only need to look (triage, reporting), ideally together with a Read-only API key (below).
1. Create an API key
In SutramX, open Settings → API keys → Create API key. Keys start with sk_ and are shown once.
Recommended for agents: a Read-only key. It can call every "no" tool above, and the SutramX API itself refuses every change it attempts (403 READ_ONLY_ACCESS), so a leaked key or a prompt-injected agent cannot create, pause, acknowledge, resolve or delete anything. This holds even if the server's own read-only mode is off; combine both (SUTRAMX_READ_ONLY=true hides the write tools from the agent as well). Use a Standard key only for an agent that really needs to change things; it is enough for every tool above.
2. Build
Node.js 20 or newer is required.
3. Connect a client
Claude Code
Or add it to .mcp.json in a project:
Claude Desktop
Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):
Restart Claude Desktop. Try: "Which SutramX monitors are down right now, and since when?"
Streamable HTTP (remote or shared)
The endpoint is POST http://127.0.0.1:3333/mcp (stateless, JSON responses). Every request must send its own SutramX key:
so one server can serve several users and workspaces. Connect Claude Code to it with:
When the server listens on loopback (the default, HOST=127.0.0.1), SUTRAMX_API_KEY is used for requests that send no Authorization header (a header that is not a SutramX key is rejected with 401). Browser requests are only accepted from a loopback Origin or one listed in MCP_ALLOWED_ORIGINS. With any other HOST the environment key is ignored, and you should put the server behind HTTPS. Set MCP_ALLOWED_HOSTS (comma-separated host names) to keep DNS-rebinding protection when binding to 0.0.0.0. GET /health returns the server version.
Configuration
Notes
- Plan limits apply exactly as in the dashboard. When a tool returns
ENTITLEMENT_LIMIT_REACHEDorFEATURE_NOT_AVAILABLE, the plan does not allow it. - Billing, team members and API keys cannot be managed with an API key, and so not with this server. Per-monitor alert recipients (
config.notification_emails) can only be set with an API key that has Automation access; other keys get a clear error. - Maintenance windows can be listed but not created, changed or deleted: they silence alerting, so the API makes them owner-only and refuses every API key (
403 WORKSPACE_OWNER_REQUIRED). SLO targets are set in the dashboard;sutramx_uptime_reportreads them. - With a read-only key,
sutramx_whoamireportsread_only: true, and any write tool returnsREAD_ONLY_ACCESSwith a hint telling the agent not to retry. configonsutramx_update_monitorreplaces the whole object. Agents are told to read the monitor first and send the merged config.
Security
SUTRAMX_API_URLmust behttps://(plainhttp://only for loopback); the server refuses to start otherwise, warns whenNODE_TLS_REJECT_UNAUTHORIZED=0, and never follows redirects with a key.- Credentials stored in monitor config (headers such as
Authorization/Cookie, keys named like*token*,*secret*,*password*,*api_key*, and passwords in URLs) are returned as[REDACTED]. Sending[REDACTED]back insutramx_update_monitorkeeps the stored value; it cannot stand for a value that is not stored. - Text that comes from monitored sites or other people (check errors, names, notes) is shown single-line inside
«», without control characters, and the server instructions tell the agent to treat it as data. - Ids are UUIDs, keys and slugs match strict patterns, times must be ISO-8601, so tool arguments cannot change the API path or add query parameters.
- HTTP mode: every request needs its own
Authorization: Bearer sk_...; the env key is only a fallback on loopback. Put a rate limiter in front of a public deployment (the API itself rate-limits per key).
Development
License
MIT, see LICENSE.
来源:README.md,提交 9b2526a
工具
0版本历史
1- v0.1.1最新Oct 4, 2026

