OpenUptime

MCP server

To monitor another MCP server, see MCP Uptime Monitor.

Let an AI agent such as Claude, Cursor or any MCP client manage your monitors, incidents and status pages.

claude mcp add --transport http openuptime https://openuptime.app/api/mcp

That is the whole setup for Claude Code; other clients are below. Only want to read a public status page? No sign-in is needed.

Connect

OpenUptime speaks the Model Context Protocol over Streamable HTTP at https://openuptime.app/api/mcp (use your own domain if you self-host). Every tool calls the REST API with the caller's own credentials, so scopes and project limits apply unchanged. Any client that supports remote MCP servers works; the common ones are below. Each client opens your browser once to authorize with OAuth.

Claude Code

claude mcp add --transport http openuptime https://openuptime.app/api/mcp

Then run /mcp inside Claude Code, pick openuptime and choose Authenticate.

Claude Desktop and claude.ai

Open Settings → Connectors → Add custom connector, name it OpenUptime and paste https://openuptime.app/api/mcp. Then click Connect to authorize.

Codex

Add the server to ~/.codex/config.toml:

[mcp_servers.openuptime]
url = "https://openuptime.app/api/mcp"

Then sign in with codex mcp login openuptime.

Cursor

Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project), then open Settings → MCP and click Connect next to openuptime:

{
  "mcpServers": {
    "openuptime": { "url": "https://openuptime.app/api/mcp" }
  }
}

VS Code (GitHub Copilot)

Add this to .vscode/mcp.json and start the server from the editor:

{
  "servers": {
    "openuptime": { "type": "http", "url": "https://openuptime.app/api/mcp" }
  }
}

Gemini CLI

Add this to ~/.gemini/settings.json, then run /mcp auth openuptime:

{
  "mcpServers": {
    "openuptime": { "httpUrl": "https://openuptime.app/api/mcp" }
  }
}

Any other client

Use the URL above as a remote (Streamable HTTP) server. A client that only speaks stdio can go through mcp-remote:

npx mcp-remote https://openuptime.app/api/mcp

With an API key instead of OAuth

For unattended agents or clients without OAuth, create an API key and send it as a bearer token. A key is bound to one workspace and can be limited to some projects. In Claude Code:

claude mcp add --transport http openuptime https://openuptime.app/api/mcp \
  --header "Authorization: Bearer ou_..."

In Cursor, VS Code and Gemini CLI put the same value in the server's headers ("Authorization": "Bearer ou_..."). In Codex use bearer_token_env_var = "OPENUPTIME_API_KEY" in the server's table.

Authorization

Clients discover the authorization server from /.well-known/oauth-protected-resource, register themselves dynamically (OAuth 2.1, PKCE, RFC 8707 resource) and send you to a consent screen. There you choose what the agent may reach:

  • All workspaces: every project, including workspaces you join and projects you create later.
  • Selected workspaces: every project in the workspaces you tick; projects created later are included.
  • Selected projects: only the projects you tick.

Scopes are mcp:read (look) and mcp:write (change). Access is checked live on every call: if you lose access to a workspace, the agent loses it too. Revoke an agent any time under API keys → Authorized agents.

Revoking access

Open the app and go to API keys → Authorized agents. Each connected client is listed there; click Revoke and it is cut off on its very next call, even if it still holds a token that has not expired. Removing the server from the client's own settings only forgets it locally, so revoke it here as well.

An API key is revoked the same way: delete it under API keys. To narrow an agent instead of removing it, revoke it and authorize again with fewer workspaces or projects.

Choosing where to act

Every tool takes optional workspace and project ids (from list_workspaces); omit them to use the default. Over REST these are the x-workspace-id and x-project-id headers.

Tools

  • list_workspaces: Workspaces and projects this connection can use, with their ids.
  • create_workspace: Create a workspace with a first project. Only with access to all workspaces.
  • create_project: Create a project. Only where the connection has all projects of that workspace.
  • list_monitors: Monitors with status, uptime and latency.
  • get_monitor: One monitor with recent checks and uptime.
  • create_monitor: Create an http, tcp, websocket, dns, heartbeat, postgres, mysql, redis, ssl, domain or mcp monitor.
  • preview_monitor_import: Preview monitor import validation, duplicate identities, warnings and plan capacity without writes.
  • import_monitors: Import reviewed records using stable source/sourceId values and the preview destination; duplicates are skipped. Source IDs ignore surrounding whitespace.
  • update_monitor: Change fields of a monitor.
  • pause_monitor / resume_monitor: Stop or restart checks and alerts.
  • run_check: Run a check right now and record the result. With a region, a one-off request from that region that is not recorded.
  • list_regions: Regions a monitor can check from, and how many one monitor may use.
  • delete_monitor: Permanently delete a monitor and its history.
  • list_incidents / get_incident: Incidents, open ones first, with their timeline.
  • create_incident: Open a manual incident, optionally tied to a monitor.
  • update_incident: Set or clear an incident's root cause and postmortem, and publish them to the status page.
  • post_incident_update: Add an update (public or internal) or resolve an incident.
  • acknowledge_incident: Acknowledge an incident.
  • list_channels: Alert channels.
  • list_status_pages: Status pages.
  • create_status_page: Create a public status page showing the given monitors.
  • update_status_page: Change a status page's title, theme, latency display or monitors.
  • get_status_page_domain / connect_status_page_domain / disconnect_status_page_domain: Hosted service only: read, connect or remove a status page's custom domain. Connecting and removing need a workspace owner or admin.
  • list_maintenance: Maintenance occurrences, series ids and recurrence settings.
  • create_maintenance: Schedule one window or a bounded daily/weekly series in an IANA time zone.
  • skip_maintenance: Remove one occurrence without changing the rest of its series. Owner/admin only.
  • end_maintenance: End the active occurrence now and retain history. Owner/admin only.
  • cancel_maintenance_series: Cancel future occurrences and end active ones, retaining completed history. Owner/admin only.

Creating projects and workspaces is limited as described above; create_workspace is capped at 10 owned workspaces per account.

Public status pages, no sign-in

A second endpoint, https://openuptime.app/api/mcp/public, needs no credentials and offers only three read-only tools. They take the slug of a published status page and return what the public page already shows. The tools above still need authorization.

claude mcp add --transport http acme-status https://openuptime.app/api/mcp/public
  • get_public_status_page: overall state, each component with its status and 90-day uptime, active incidents.
  • list_public_status_page_incidents: recent incidents with their updates.
  • list_public_status_page_maintenance: scheduled and ongoing maintenance windows.

Existing clients may still call the legacy names status_page_overview, status_page_incidents and status_page_maintenance; discovery lists the names above.

The owner of a page can turn the MCP tools off with Allow the public MCP tools to read this page in the status page editor; the page, its feeds and llms.txt stay public. These tools send no credentials: if a custom deployment protects status pages with an access policy, the tools are refused for those pages. Discovery document: /.well-known/mcp.json lists both endpoints. Each page also has a short llms.txt at /api/public/status/<slug>/llms.txt.

Example prompts

  • “Add an HTTP monitor for https://api.example.com/health that checks every minute, and put it on a new status page.”
  • “Which monitors are down right now, and what was the last check result for each?”
  • “Open an incident for the checkout monitor, then post an update that we are investigating.”
  • “Pause the staging monitors during tonight's maintenance, then resume them.”

Troubleshooting

  • 401 or “authorization required”: the client has no valid token yet. Authenticate again from the client (for example /mcp in Claude Code), or check that an API key is sent as Authorization: Bearer ou_....
  • The agent sees no workspaces or projects: the grant did not include them. Revoke the agent under API keys → Authorized agents and authorize again with the right scope.
  • Write tools fail but read tools work: the grant only has mcp:read, or the role in that workspace is read-only.
  • Self-hosted and the client rejects the token: tokens are issued for <BETTER_AUTH_URL>/api/mcp. The URL you give the client must match BETTER_AUTH_URL exactly, including the scheme.
  • Client only supports stdio: use npx mcp-remote as shown above.

Agent skill

Install the OpenUptime skill so your coding agent knows the usual workflows (adding monitors, handling incidents, pausing for maintenance, building status pages):

npx skills add becoolme/openuptime

MCP Registry

The hosted server is listed in the official MCP Registry as app.openuptime/mcp. Self-hosted servers use the same tools; point the client at your own /api/mcp URL.

MCP 服务

让 Claude、Cursor 等任意 MCP 客户端中的 AI Agent 管理你的监控、事件和状态页。

claude mcp add --transport http openuptime https://openuptime.app/api/mcp

Claude Code 只需这一行;其他客户端见下文。只想读取公开状态页?无需登录。

接入

OpenUptime 通过 Streamable HTTP 提供 Model Context Protocol 服务,地址 https://openuptime.app/api/mcp(自托管请换成你自己的域名)。每个工具都以调用者自己的凭证调用 REST API,因此权限与项目范围保持不变。任何支持远程 MCP 服务的客户端都可以接入,常见的写在下面。每个客户端第一次会打开浏览器,用 OAuth 完成授权。

Claude Code

claude mcp add --transport http openuptime https://openuptime.app/api/mcp

然后在 Claude Code 里运行 /mcp,选择 openuptime,点 Authenticate。

Claude Desktop 和 claude.ai

打开 Settings → Connectors → Add custom connector,名称填 OpenUptime,地址填 https://openuptime.app/api/mcp,然后点 Connect 授权。

Codex

在 ~/.codex/config.toml 里添加:

[mcp_servers.openuptime]
url = "https://openuptime.app/api/mcp"

然后运行 codex mcp login openuptime 登录。

Cursor

把下面内容加到 ~/.cursor/mcp.json(或项目里的 .cursor/mcp.json),然后打开 Settings → MCP,点 openuptime 旁的 Connect:

{
  "mcpServers": {
    "openuptime": { "url": "https://openuptime.app/api/mcp" }
  }
}

VS Code(GitHub Copilot)

把下面内容加到 .vscode/mcp.json,然后在编辑器里启动该服务:

{
  "servers": {
    "openuptime": { "type": "http", "url": "https://openuptime.app/api/mcp" }
  }
}

Gemini CLI

把下面内容加到 ~/.gemini/settings.json,然后运行 /mcp auth openuptime:

{
  "mcpServers": {
    "openuptime": { "httpUrl": "https://openuptime.app/api/mcp" }
  }
}

其他客户端

把上面的地址作为远程(Streamable HTTP)服务填入。只支持 stdio 的客户端可以通过 mcp-remote 中转:

npx mcp-remote https://openuptime.app/api/mcp

用 API 密钥代替 OAuth

无人值守的 Agent,或不支持 OAuth 的客户端,可以创建 API 密钥并作为 Bearer 令牌发送。密钥绑定一个工作区,也可以限定为部分项目。以 Claude Code 为例:

claude mcp add --transport http openuptime https://openuptime.app/api/mcp \
  --header "Authorization: Bearer ou_..."

Cursor、VS Code、Gemini CLI 把同样的值放进服务配置的 headers("Authorization": "Bearer ou_...");Codex 在服务配置里用 bearer_token_env_var = "OPENUPTIME_API_KEY"。

授权

客户端会从 /.well-known/oauth-protected-resource 发现授权服务器,自动注册(OAuth 2.1、PKCE、RFC 8707 resource),并把你带到授权页。在那里选择 Agent 可以访问的范围:

  • 所有工作区:全部项目,包括之后加入的工作区和新建的项目。
  • 选定的工作区:所勾选工作区内的全部项目,之后新建的项目也包含在内。
  • 选定的项目:只有你勾选的项目。

权限范围为 mcp:read(只读)和 mcp:write(可修改)。每次调用都会实时校验访问权限:你失去某个工作区的权限,Agent 也随之失去。可随时在 API 密钥 → 已授权的 Agent 撤销。

撤销授权

打开应用,进入 API 密钥 → 已授权的 Agent。每个已连接的客户端都列在这里,点 吊销 后它的下一次调用就会被拒绝,即使它手里的令牌还没过期。只在客户端自己的设置里删除该服务,只是让客户端本地忘掉,所以还需要在这里撤销。

API 密钥同理:在 API 密钥 页面删除即可。想收窄 Agent 的范围而不是彻底移除,可以先撤销,再用更少的工作区或项目重新授权。

指定操作位置

每个工具都可带可选的 workspace 和 project id(从 list_workspaces 获得),不填则用默认值。通过 REST 调用时对应 x-workspace-id 和 x-project-id 请求头。

工具

  • list_workspaces:当前连接可用的工作区和项目及其 id。
  • create_workspace:创建工作区(含第一个项目)。仅限已授权所有工作区的连接。
  • create_project:创建项目。仅限已授权该工作区全部项目的连接。
  • list_monitors:监控项及其状态、可用率和延迟。
  • get_monitor:单个监控项及最近的检测和可用率。
  • create_monitor:创建 http、tcp、websocket、dns、heartbeat、postgres、mysql、redis、ssl、domain 或 mcp 监控。
  • preview_monitor_import:预览监控导入的校验、重复身份、警告和套餐容量,不写入数据。
  • import_monitors:使用稳定的 source/sourceId 和预览目标导入已审阅记录,跳过重复项;来源 ID 忽略首尾空白。
  • update_monitor:修改监控项字段。
  • pause_monitor / resume_monitor:暂停或恢复检测与告警。
  • run_check:立即执行一次检测并记录结果。传入 region 时,仅从该区域发出一次不记录的请求。
  • list_regions:监控项可用的检测区域,以及单个监控项最多可用的区域数。
  • delete_monitor:永久删除监控项及其历史。
  • list_incidents / get_incident:事件列表(未结束的在前)及时间线。
  • create_incident:创建手动事件,可关联监控项。
  • update_incident:设置或清除事件的根因和复盘,并可发布到状态页。
  • post_incident_update:发布事件更新(公开或内部)或标记为已解决。
  • acknowledge_incident:确认事件。
  • list_channels:告警渠道。
  • list_status_pages:状态页。
  • create_status_page:创建公开状态页,展示指定的监控项。
  • update_status_page:修改状态页的标题、主题、延迟显示或监控项。
  • get_status_page_domain / connect_status_page_domain / disconnect_status_page_domain:仅托管服务:查看、绑定或解绑状态页的自定义域名。绑定和解绑需要工作区所有者或管理员。
  • list_maintenance:维护窗口、系列 ID 和重复设置。
  • create_maintenance:创建一次性窗口或按指定时区每天、每周重复的有限系列。
  • skip_maintenance:跳过单次,不影响系列其他窗口。仅限所有者或管理员。
  • end_maintenance:立即结束当前窗口并保留历史。仅限所有者或管理员。
  • cancel_maintenance_series:取消未来窗口并结束当前窗口,保留已完成历史。仅限所有者或管理员。

创建项目和工作区受上述授权范围限制;create_workspace 每个账号最多拥有 10 个工作区。

公开状态页,无需登录

另有一个端点 https://openuptime.app/api/mcp/public,不需要任何凭证,只提供三个只读工具。它们接收已发布状态页的 slug,返回公开页面本来就显示的内容。上面的其他工具仍然需要授权。

claude mcp add --transport http acme-status https://openuptime.app/api/mcp/public
  • get_public_status_page:整体状态、各组件的状态与 90 天可用率、进行中的事件。
  • list_public_status_page_incidents:近期事件及其更新。
  • list_public_status_page_maintenance:计划中和进行中的维护窗口。

已有客户端仍可调用旧名称 status_page_overview、status_page_incidents 和 status_page_maintenance;工具发现返回上面的新名称。

页面所有者可在状态页编辑界面关闭 允许公开的 MCP 工具读取此页面,这只影响 MCP 工具;页面、订阅源和 llms.txt 仍然公开。这些工具不携带任何凭据:如果定制部署用访问策略保护了状态页,这些工具对受保护的页面会被拒绝。发现文档 /.well-known/mcp.json 列出两个端点。每个状态页还有一份简短的 llms.txt,地址是 /api/public/status/<slug>/llms.txt。

示例提示词

  • “给 https://api.example.com/health 加一个 HTTP 监控,每分钟检测一次,并放到一个新的状态页上。”
  • “现在有哪些监控是挂的?每个最近一次检测结果是什么?”
  • “为 checkout 监控创建一个事件,然后发布一条‘正在排查’的更新。”
  • “今晚维护期间暂停 staging 的监控,结束后再恢复。”

排错

  • 401 或“需要授权”:客户端还没有有效令牌。在客户端里重新授权(例如 Claude Code 里的 /mcp),或检查 API 密钥是否以 Authorization: Bearer ou_... 发送。
  • Agent 看不到工作区或项目:授权范围没有包含它们。到 API 密钥 → 已授权的 Agent 撤销后,用正确的范围重新授权。
  • 读工具可用、写工具失败:授权只包含 mcp:read,或你在该工作区的角色是只读。
  • 自托管时客户端拒绝令牌:令牌签发给 <BETTER_AUTH_URL>/api/mcp,填给客户端的地址必须与 BETTER_AUTH_URL 完全一致,包括协议。
  • 客户端只支持 stdio:按上文用 npx mcp-remote 中转。

Agent 技能

安装 OpenUptime 技能,让编码 Agent 熟悉常见流程(添加监控、处理事件、维护期暂停、创建状态页):

npx skills add becoolme/openuptime

MCP Registry

托管服务已收录在官方 MCP Registry,名称为 app.openuptime/mcp。自托管服务的工具相同,把客户端指向你自己的 /api/mcp 地址即可。

Last updated 2026-10-17最后更新:2026-10-17