MCP server
Let an AI agent such as Claude, Cursor or any MCP client manage your monitors, incidents and status pages.
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/mcpThen 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/mcpWith 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, dns, heartbeat, postgres, mysql or redis monitor.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.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.post_incident_update: Add an update or resolve an incident.acknowledge_incident: Acknowledge an incident.list_channels: Alert channels.list_status_pages: Status pages.list_maintenance: Maintenance windows.
Creating projects and workspaces is limited as described above; create_workspace is capped at 10 owned workspaces per account.
MCP 服务
让 Claude、Cursor 等任意 MCP 客户端中的 AI Agent 管理你的监控、事件和状态页。
接入
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、dns、heartbeat、postgres、mysql 或 redis 监控。update_monitor:修改监控项字段。pause_monitor / resume_monitor:暂停或恢复检测与告警。run_check:立即执行一次检测并记录结果。delete_monitor:永久删除监控项及其历史。list_incidents / get_incident:事件列表(未结束的在前)及时间线。create_incident:创建手动事件,可关联监控项。post_incident_update:发布事件更新或标记为已解决。acknowledge_incident:确认事件。list_channels:告警渠道。list_status_pages:状态页。list_maintenance:维护窗口。
创建项目和工作区受上述授权范围限制;create_workspace 每个账号最多拥有 10 个工作区。
Last updated 2026-10-11最后更新:2026-10-11