On-Call Health

io.github.Rootly-AI-Labs由 GitHub 帳號 Rootly-AI-Labs 發布v0.4.1更新於 Nov 5, 2026

On-call burnout analysis: team risk summaries, at-risk responders, daily health trends.

發布方自己的服務:Rootly

概覽

AI 產生的概覽

將助理連接到 On-Call Health,用來執行值班倦怠風險分析,並找出高風險或狀態良好的值班人員。

可以做什麼
  • 檢查並列出已連接的整合(Rootly、GitHub、Slack、Jira、Linear),查看目前值班人員
  • 啟動、輪詢並檢視健康分析,包括最近一次分析及其狀態
  • 讀取團隊摘要,含平均值、風險分布以及風險最高與最低的成員
  • 找出高風險人員、可替補的健康人員,以及單一成員的每日健康趨勢
  • 在需要全部欄位時取得完整的原始分析資料
適用情境
適合工程經理與值班負責人讓助理檢視團隊工作負荷、找出過勞風險較高的值班人員,並依據已同步到 On-Call Health 的資料建議更合適的排班。
執行需求
透過 uvx 以 stdio 在本機執行(PyPI 套件 oncallhealth-mcp),也可自行架設 HTTP 服務。需要 On-Call Health 帳號,並以環境變數 ONCALLHEALTH_API_KEY 提供 API 金鑰;需能連線至 On-Call Health API。選用設定包括 API 位址、輪詢間隔與 Code Mode。
安裝前請注意
API 金鑰屬於機密,請勿提交到版本控制,也不要寫進會被提交的設定檔。分析在後端啟動,逾時後可能仍在繼續執行。結果包含可辨識的個人健康與工作負荷資料,應視為敏感資訊處理。分數是工作負荷指標,並非醫療診斷。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 On-Call Health,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

oncallhealth-mcp

[PyPI version] [Python 3.10+]

MCP server for On-Call Health burnout analysis. Connects AI assistants to your on-call data for workload insights.

Prerequisites

Installation

The server runs locally over stdio with uvx (no install step) and reads the API key from the ONCALLHEALTH_API_KEY environment variable. Pick your client:

Claude Code

bash
claude mcp add oncallhealth --env ONCALLHEALTH_API_KEY=och_live_... -- uvx oncallhealth-mcp

Claude Desktop

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):

json
{  "mcpServers": {    "oncallhealth": {      "command": "uvx",      "args": ["oncallhealth-mcp"],      "env": { "ONCALLHEALTH_API_KEY": "och_live_your_api_key_here" }    }  }}

Cursor

Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for global):

json
{  "mcpServers": {    "oncallhealth": {      "command": "uvx",      "args": ["oncallhealth-mcp"],      "env": { "ONCALLHEALTH_API_KEY": "och_live_your_api_key_here" }    }  }}

VS Code / GitHub Copilot

Add to .vscode/mcp.json in your project:

json
{  "servers": {    "oncallhealth": {      "command": "uvx",      "args": ["oncallhealth-mcp"],      "env": { "ONCALLHEALTH_API_KEY": "och_live_your_api_key_here" }    }  }}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "oncallhealth": {      "command": "uvx",      "args": ["oncallhealth-mcp"],      "env": { "ONCALLHEALTH_API_KEY": "och_live_your_api_key_here" }    }  }}

Codex CLI

bash
codex mcp add oncallhealth --env ONCALLHEALTH_API_KEY=och_live_... -- uvx oncallhealth-mcp

Gemini CLI

bash
gemini mcp add oncallhealth -e ONCALLHEALTH_API_KEY=och_live_... uvx oncallhealth-mcp

Manual / other clients

bash
pip install oncallhealth-mcpexport ONCALLHEALTH_API_KEY=och_live_...oncallhealth-mcp

Or run without installing: ONCALLHEALTH_API_KEY=och_live_... uvx oncallhealth-mcp.

Configuration

VariableRequiredDefaultDescription
ONCALLHEALTH_API_KEYYes (stdio)-API key from oncallhealth.ai
ONCALLHEALTH_API_URLNohttps://api.oncallhealth.aiAPI endpoint URL
ONCALLHEALTH_CODE_MODENooff1 exposes the catalog through Code Mode meta-tools (see below)
ONCALLHEALTH_POLL_INTERVALNo5.0Seconds between status checks inside analysis_run (backs off to ONCALLHEALTH_POLL_MAX_INTERVAL, default 30.0)
ONCALLHEALTH_MCP_ALLOWED_HOSTSNo-HTTP only: comma-separated host names that enable the Host/Origin DNS-rebinding guard

Request timeouts, retries and circuit-breaker settings are also configurable; see oncallhealth_mcp/client/config.py.

Security note

Avoid committing API keys to version control. Use environment variables or a secrets manager instead of hardcoding keys in config files.

Protocol compatibility

The server implements MCP revision 2026-07-28 (stateless Streamable HTTP, Mcp-Method/Mcp-Name routing headers, cacheable list results, the Tasks extension) and negotiates older revisions per connection, so clients on the 2025 handshake-era protocol keep working. Every tool publishes annotations (read-only, idempotent, open-world) and a structured output schema. The deprecated HTTP+SSE transport is not served.

Tools

Start with validate_integrations, then analysis_current (or analysis_run for a fresh analysis), then analysis_summary and the member-level tools.

ToolWhat it does
validate_integrationsCheck that every connected integration has valid credentials. force_refresh bypasses the backend cache.
integrations_listList connected Rootly, GitHub, Slack, Jira and Linear integrations.
oncall_usersWho is currently on call for a Rootly integration (integration_id).
analysis_currentMetadata of the most recent analysis (status, timestamps, config).
analysis_runStart an analysis and wait for it: days_back (default 30), include_weekends, integration_id, wait_timeout_seconds (default 600). Returns the team summary. Runs as a background task for clients that support the MCP Tasks extension, inline otherwise, with progress messages while waiting.
analysis_startStart an analysis without waiting. Poll with analysis_status.
analysis_statusStatus and metadata of an analysis (analysis_id).
analysis_summaryTeam averages, risk distribution, top five at-risk and healthiest members.
analysis_resultsFull raw payload of a completed analysis (large; prefer the focused tools).
get_at_risk_usersMembers at or above min_och_score (default 50) in include_risk_levels (default ["medium", "high"]), with Rootly/PagerDuty/Slack/GitHub IDs.
get_safe_respondersMembers at or below max_och_score (default 30) who could take extra shifts, up to limit.
check_users_riskRisk check for specific rootly_user_ids (list of integers), split into at-risk, healthy and not-found.
member_daily_healthDay-by-day health, incident and after-hours breakdown for member_email.

OCH scores run 0-100; higher means more at risk. Scores inform staffing decisions and are not a medical diagnosis.

Resources

URIContent
oncallhealth://methodologyShort description of the scoring methodology
oncallhealth://analyses/latestMetadata of the most recent analysis (JSON)
oncallhealth://analyses/{analysis_id}/summaryTeam summary of a completed analysis (JSON)

Prompts

PromptArgumentsPurpose
weekly_briefteam_nameWeekly on-call health brief with follow-up actions
investigate_respondermember_email, analysis_idDig into one responder's trend and recommend shift changes

Code Mode (optional)

With --code-mode or ONCALLHEALTH_CODE_MODE=1 the catalog is exposed through FastMCP Code Mode: three meta-tools (search, get_schema, execute) let an agent discover tools on demand and chain calls in a sandboxed Python snippet. It saves context when an agent needs many calls per task, at the cost of hiding the tool list, annotations and output schemas from clients that read them directly. Off by default.

CLI reference

usage: oncallhealth-mcp [-h] [--transport {stdio,http}] [--host HOST]                        [--port PORT] [--code-mode] [-v] [--version]
options:  --transport {stdio,http}  Transport to use (default: stdio)  --host HOST               Host to bind to (http transport only, default: 127.0.0.1)  --port PORT               Port to bind to (http transport only, default: 8000)  --code-mode               Expose the catalog through Code Mode meta-tools  -v, --verbose             Enable verbose logging  --version                 show program's version number and exit

Hosted deployment (Streamable HTTP)

oncallhealth-mcp --transport http (or the Docker image, which runs uvicorn oncallhealth_mcp.transport:mcp_http_app) serves:

  • POST /mcp: stateless Streamable HTTP MCP endpoint
  • GET /health: unauthenticated health check

Every MCP request must carry the user's API key as Authorization: Bearer och_...; X-API-Key: och_... is accepted as well. Keys are verified against the On-Call Health API (successful checks are cached for five minutes) and unauthenticated requests get 401 before any tool runs. Tool calls are rate limited per key and per tool (for example analysis_run and analysis_start at 5/minute) identified from the JSON-RPC body, with 429 and Retry-After on excess.

Example remote client configuration (Claude Code):

bash
claude mcp add --transport http oncallhealth https://your-host/mcp --header "Authorization: Bearer och_live_..."

Because the server is stateless you can run several uvicorn workers or replicas. For analysis_run background tasks to be shared across workers, point FastMCP's task backend at Redis or Valkey with FASTMCP_DOCKET_URL; the default in-memory backend is per process.

Set ONCALLHEALTH_MCP_ALLOWED_HOSTS=mcp.example.com to enable FastMCP's Host/Origin DNS-rebinding guard for the public host name.

bash
docker build -t oncallhealth-mcp .docker run -p 8080:8080 oncallhealth-mcp

Links

License

Apache-2.0

來源:README.md,提交 918da0c

工具

13

validate_integrations

Validate Integrations

Check that every connected integration has valid credentials. Call this before starting an analysis. Returns per-integration validation status (GitHub, Slack, Jira, Linear) and an all_valid flag.

輸入參數force_refresh

integrations_list

Integrations List

List connected integrations (Rootly, GitHub, Slack, Jira, Linear).

無需輸入參數。

oncall_users

Oncall Users

Get the users currently on call for a Rootly integration. Cross-reference the returned emails with analysis data (for example get_at_risk_users) to see whether anyone currently on call is at risk.

輸入參數integration_id必填

analysis_current

Analysis Current

Get the most recent analysis for the current account. Returns metadata only (status, timestamps, configuration). Use analysis_summary with the returned id for the team overview.

無需輸入參數。

analysis_run

Analysis Run

Start a new health analysis, wait for it to finish, and return the summary. Runs as a background task for clients that support the MCP Tasks extension and inline otherwise. Progress messages report the analysis status while waiting. On timeout the analysis keeps running on the backend; use analysis_status with the reported analysis_id to pick it up later.

輸入參數days_backintegration_idinclude_weekendswait_timeout_seconds

analysis_start

Analysis Start

Start a new health analysis without waiting for it. Poll analysis_status until status is "completed", then use analysis_summary. Prefer analysis_run when you want a single call that waits for the result.

輸入參數days_backintegration_idinclude_weekends

analysis_status

Analysis Status

Get the status and metadata of an analysis.

輸入參數analysis_id必填

analysis_summary

Analysis Summary

Get a condensed team summary of a completed analysis. Returns team averages, the risk-level distribution and the five most and least at-risk members. Use analysis_results only when you need every field.

輸入參數analysis_id必填

analysis_results

Analysis Results

Get the full raw results for a completed analysis. WARNING: Returns complete data for 80+ members with ~40 fields each and may overwhelm a context window. Prefer analysis_summary, get_at_risk_users or member_daily_health unless you need every field.

輸入參數analysis_id必填

get_at_risk_users

Get At Risk Users

Get users at or above a health-risk threshold with their external IDs. Use this to identify at-risk responders and correlate them with Rootly, PagerDuty, Slack or GitHub using the returned platform IDs. Results are sorted by OCH score, highest risk first.

輸入參數analysis_id必填min_och_scoreinclude_risk_levels

get_safe_responders

Get Safe Responders

Get users with low health risk who could take additional on-call shifts. Use this to find replacement responders when removing at-risk users from schedules. Results are sorted by OCH score, healthiest first.

輸入參數limitanalysis_id必填max_och_score

check_users_risk

Check Users Risk

Check health risk for specific users by their Rootly user IDs. Use this after fetching a schedule from Rootly to see whether any scheduled responders are at risk. A user is at risk when their OCH score is at or above min_och_score or their risk level is medium or high.

輸入參數analysis_id必填min_och_scorerootly_user_ids必填

member_daily_health

Member Daily Health

Get the day-by-day health breakdown for one team member. Shows per-day health scores, incident counts and after-hours activity over the analysis period (only days with data are included).

輸入參數analysis_id必填member_email必填

版本歷史

1
  1. v0.4.1最新Nov 5, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Rootly 整合