MCP Health Monitor

io.github.oaslananka由 GitHub 帳號 oaslananka 發布v1.4.0更新於 Oct 24, 2026

Monitor MCP, CI, and HTTP targets with health history, TLS expiry, assertions, and diagnostics

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理登錄並巡檢 MCP 伺服器、GitHub Actions、GitLab 流水線與 HTTP 端點,並保留歷史與報告。

可以做什麼
登錄、列出與移除監控目標:MCP 伺服器(Streamable HTTP、SSE、需明確開啟的 stdio)、GitHub Actions 工作流程、GitLab 流水線和僅 GET 的 HTTP 端點,以及 webhook 告警目標與測試傳送。對單一或全部目標執行即時檢查,支援狀態碼、標頭、內容、JSON 與 TLS 到期斷言,並提供失敗作業或步驟診斷。檢視歷史與報告:可用率與延遲、跨供應商的 JSON 儀表板、Markdown 報告和監控統計。設定 MCP 告警門檻,例如回應時間、可用率百分比和連續失敗次數。
適用情境
適合讓助理持續關注 CI 流水線、MCP 端點或服務健康端點,並依時間彙整失敗、延遲或憑證到期情況。適合希望用一個本機工具按需或排程檢查並產生 Markdown 報告的維運與開發人員。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js 24。選用的 GITHUB_TOKEN 和 GITLAB_TOKEN 用於私有儲存庫和較高速率限制,僅儲存變數名稱。自架 GitLab 和私有 HTTP 來源須以環境變數加入允許清單。本機 stdio 檢查需設定 HEALTH_MONITOR_ALLOW_STDIO 並提供可執行檔允許清單。Webhook 密鑰需要 HEALTH_MONITOR_WEBHOOK_ENCRYPTION_KEY。歷史保存在本機 SQLite 資料庫。
安裝前請注意
登錄 webhook 會儲存密鑰,未設定 HEALTH_MONITOR_WEBHOOK_ENCRYPTION_KEY 時會被拒絕;輸出中的密鑰會被遮蔽。GITHUB_TOKEN 和 GITLAB_TOKEN 在檢查時讀取且不寫入資料庫,但可讀取私有儲存庫和流水線。登錄與註銷目標會寫入本機 SQLite 資料庫,註銷會刪除該目標的歷史。開啟 stdio 檢查會執行本機可執行檔,應讓允許清單盡量精簡。測試 webhook 會向外部位址送出請求。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

health-monitor-mcp

MCP server, CI workflow, and generic HTTP endpoint monitoring with health history, TLS expiry, assertions, diagnostics, and operational reports.

[CI] [codecov] [Release] [License: MIT] [OpenSSF Scorecard] [Node.js]

What This Does

health-monitor-mcp keeps local registries of MCP servers, GitHub Actions workflows, GitLab pipelines, and generic HTTP endpoints. It performs live checks, records bounded evidence in SQLite, evaluates MCP alert thresholds, and returns JSON or Markdown diagnostics suitable for agents and operators.

Supported target transports:

  • Streamable HTTP for current remote MCP servers.
  • SSE for legacy MCP servers.
  • stdio for trusted local executables after explicit opt-in.
  • GitHub Actions workflow runs, failed jobs, and failed steps for public or private repositories.
  • GitLab CI/CD pipelines, failed jobs, stages, refs, commits, URLs, and bounded trace excerpts for GitLab.com or allowlisted self-hosted instances.
  • Generic HTTP/HTTPS endpoints with status, header, body-substring, JSON-value, redirect, latency, and TLS-expiry checks.

Azure DevOps monitoring was retired in v1.1.0. GitHub Actions shipped in v1.2.0 and GitLab CI/CD in v1.3.0; generic HTTP/TLS monitoring completes the current multi-provider feature line.

Quick Start

Run the published package noninteractively with Node.js 24:

bash
npx -y health-monitor-mcp --version

Example MCP client configuration:

json
{  "mcpServers": {    "health-monitor": {      "command": "npx",      "args": ["-y", "health-monitor-mcp"]    }  }}

Tools

ToolPurposeTypical prompt
register_serverRegister an MCP targetRegister inventory-prod
check_serverRun one MCP health checkCheck inventory-prod now
register_github_actionsRegister a GitHub workflowMonitor ci.yml in owner/repo
check_github_actionsCheck latest GitHub run and failed job/step diagnosticsCheck repo-ci now
register_gitlab_pipelineRegister a GitLab project pipelineMonitor group/project on GitLab
check_gitlab_pipelineCheck latest pipeline and bounded failed-job tracesCheck gitlab-ci now
register_http_targetRegister a GET-only HTTP/HTTPS endpointMonitor the public health endpoint
check_http_targetCheck response assertions and TLS expiryCheck service-health now
register_webhookRegister a webhook target for alert deliveryRegister alert-webhook for notifications
test_webhookSend a test payload and return delivery diagnosticsTest alert-webhook delivery
check_allCheck all target kinds with bounded concurrencyCheck all production targets
get_uptimeReturn MCP uptime and latency historyShow 24h uptime for inventory-prod
get_dashboardReturn a cross-provider JSON dashboardGive me a 24h dashboard
get_reportReturn a cross-provider Markdown reportGenerate a 24h health report
list_serversList registered MCP targetsList monitored MCP servers
list_github_actionsList registered GitHub workflow targetsList monitored workflows
list_gitlab_pipelinesList registered GitLab pipeline targetsList monitored GitLab pipelines
list_http_targetsList registered HTTP targetsList monitored HTTP endpoints
list_webhooksList registered webhook targetsList webhook targets
unregister_serverRemove an MCP targetStop monitoring local-debugger
unregister_github_actionsRemove a GitHub target and its historyStop monitoring repo-ci
unregister_gitlab_pipelineRemove a GitLab target and its historyStop monitoring gitlab-ci
unregister_http_targetRemove an HTTP target and its historyStop monitoring service-health
unregister_webhookRemove a webhook target and its historyStop monitoring alert-webhook
set_alertConfigure MCP health thresholdsAlert if inventory-prod exceeds 500ms
get_monitor_statsInspect cross-provider monitor activityHow many checks are stored?

Expected configuration mistakes return stable error codes and remediation hints, including SERVER_NOT_FOUND, GITHUB_ACTIONS_TARGET_NOT_FOUND, GITLAB_PIPELINE_TARGET_NOT_FOUND, GITLAB_BASE_URL_NOT_ALLOWED, HTTP_TARGET_NOT_FOUND, HTTP_TARGET_URL_NOT_ALLOWED, NO_SERVERS_REGISTERED, STDIO_DISABLED, STDIO_COMMAND_REJECTED, WEBHOOK_ENCRYPTION_KEY_REQUIRED, WEBHOOK_REGISTRATION_FAILED, and WEBHOOK_NOT_FOUND.

Register Targets

Streamable HTTP:

text
register_server name="inventory-prod" type="http" url="https://inventory.example.com/mcp" tags=["production","inventory"]

Legacy SSE:

text
register_server name="legacy-search" type="sse" url="https://search.example.com/sse" tags=["legacy"]

Trusted local stdio:

bash
export HEALTH_MONITOR_ALLOW_STDIO=1export HEALTH_MONITOR_STDIO_ALLOWLIST=npx,node
text
register_server name="local-debugger" type="stdio" command="npx" args=["-y","mcp-debug-recorder"] tags=["local"]

The command field must contain one executable only. Put package names and flags in args. Remote-safe runtime profiles always disable stdio.

Register GitHub Actions

Public repositories can be checked without authentication. Private repositories and higher API rate limits require a token with Actions read access:

bash
export GITHUB_TOKEN=your-runtime-secret
text
register_github_actions name="repo-ci" owner="oaslananka" repository="health-monitor-mcp" workflow="ci.yml" branch="main" token_env="GITHUB_TOKEN" tags=["production","ci"]check_github_actions name="repo-ci" timeout_ms=5000

Only the environment-variable name in token_env is stored. The token value is read at check time and is never written to SQLite, logs, reports, or tool responses.

Register GitLab Pipelines

Public GitLab.com projects can be checked without authentication. Private projects require a token exposed only through the runtime environment:

bash
export GITLAB_TOKEN=your-runtime-secret
text
register_gitlab_pipeline name="gitlab-ci" project="group/project" ref="main" token_env="GITLAB_TOKEN" tags=["production","ci"]check_gitlab_pipeline name="gitlab-ci" timeout_ms=5000

GitLab.com is allowed by default. A self-hosted instance must use an HTTPS origin and be explicitly allowed:

bash
export HEALTH_MONITOR_GITLAB_BASE_URL_ALLOWLIST=https://gitlab.internal.example
text
register_gitlab_pipeline name="private-gitlab" base_url="https://gitlab.internal.example" project="platform/service" token_env="GITLAB_TOKEN"

Only token_env is persisted. Token values, response bodies, and full traces are never stored or returned. Failed-job trace excerpts are range-requested, sanitized, and bounded.

Register HTTP Targets

Public HTTP and HTTPS endpoints are allowed by default. The provider sends GET requests only and supports bounded status, header, body-substring, JSON scalar, and TLS-expiry assertions:

text
register_http_target name="service-health" url="https://status.example.com/health" expected_statuses=[200] header_assertions=[{"name":"x-ready","equals":"yes"}] body_contains=["ready"] json_assertions=[{"path":"status","equals":"ready"}] tls_expiry_days=30 tags=["production","http"]check_http_target name="service-health" timeout_ms=5000

Private, loopback, link-local, and other non-public addresses are blocked. A trusted private origin is available only in the full runtime profile and must be explicitly listed:

bash
export HEALTH_MONITOR_HTTP_TARGET_ALLOWLIST=https://status.internal.example:8443

Every DNS answer and every redirect destination is revalidated. Responses are capped at 262144 bytes; full response bodies and certificate chains are never stored or returned.

Register Webhook Targets

Webhook targets receive alert notifications via HTTPS POST with optional HMAC-SHA256 signing. Secrets are encrypted at rest when HEALTH_MONITOR_WEBHOOK_ENCRYPTION_KEY is configured (32+ characters); otherwise secret registration is rejected.

text
register_webhook name="alert-webhook" url="https://hooks.example/alerts" secret="webhook-secret" events=["down","alert"] tags=["production","alerts"]test_webhook name="alert-webhook"

Secrets are never returned in listings or diagnostics—always redacted. Delivery diagnostics include status, latency, HTTP status code, and error message.

Health Checks and Reports

text
check_server name="inventory-prod" timeout_ms=5000check_all timeout_ms=5000 tags=["production"]get_uptime name="inventory-prod" hours=24get_dashboard hours=24 include_tool_stats=trueget_report hours=24

HEALTH_MONITOR_MAX_CONCURRENCY limits MCP, GitHub Actions, GitLab, and HTTP checks through one shared scheduled and interactive queue. Results preserve MCP-then-GitHub-then-GitLab-then-HTTP registration order even when checks complete out of order.

Alerts

text
set_alert name="inventory-prod" max_response_time_ms=500 min_uptime_percent=99 consecutive_failures_before_alert=2

Alert findings are evaluated by check_server, check_all, and get_dashboard. Configure webhook targets with register_webhook to receive alert notifications.

Configuration

VariableDefaultPurpose
HEALTH_MONITOR_DB~/.mcp-health-monitor/health.dbSQLite database path
HEALTH_MONITOR_AUTO_CHECK0Enable scheduled checks with 1
HEALTH_MONITOR_RETENTION_DAYS30Health-history retention
HEALTH_MONITOR_MAX_CONCURRENCY5Scheduled and interactive check concurrency
GITHUB_TOKENunsetOptional GitHub Actions read token
GITLAB_TOKENunsetOptional GitLab project/pipeline/job read token
HEALTH_MONITOR_GITLAB_BASE_URL_ALLOWLISTunsetAllowed self-hosted GitLab HTTPS origins
HEALTH_MONITOR_HTTP_TARGET_ALLOWLISTunsetPrivate HTTP(S) origins allowed in full profile
HEALTH_MONITOR_ALLOW_STDIO0Allow trusted local stdio checks
HEALTH_MONITOR_STDIO_ALLOWLISTunsetOptional comma-separated executable allowlist
HEALTH_MONITOR_HTTP_TOKENunsetBearer token for POST /mcp
HEALTH_MONITOR_HTTP_ORIGIN_ALLOWLISTunsetAllowed remote client origins
HEALTH_MONITOR_HTTP_MAX_BODY_BYTES1048576Maximum inbound MCP body
HEALTH_MONITOR_HTTP_BODY_TIMEOUT_MS15000Inbound body read timeout
HEALTH_MONITOR_HTTP_STATEFUL_SESSIONS0Enable stateful Streamable HTTP sessions
HEALTH_MONITOR_HTTP_SESSION_TTL_MS1800000Stateful session TTL
HEALTH_MONITOR_HTTP_MAX_SESSIONS100Stateful session cap
HEALTH_MONITOR_WEBHOOK_ENCRYPTION_KEYunset32+ char key for encrypting webhook secrets
HEALTH_MONITOR_WEBHOOK_TIMEOUT_MS5000Webhook delivery timeout in milliseconds

HTTP Deployment

The server binds to 127.0.0.1 by default. A non-loopback bind requires a remote-safe profile, bearer token, and Origin allowlist.

bash
HOST=0.0.0.0 \HEALTH_MONITOR_PROFILE=remote-safe \HEALTH_MONITOR_HTTP_TOKEN=change-me \HEALTH_MONITOR_HTTP_ORIGIN_ALLOWLIST=https://client.example \npx -y health-monitor-mcp-http

GET /health is unauthenticated and exposes only status and version. POST /mcp requires Authorization: Bearer <token>.

Docker

Persist /data; otherwise the SQLite database disappears with the container.

bash
docker volume create health-monitor-data
docker run --rm \  -v health-monitor-data:/data \  -p 127.0.0.1:3000:3000 \  -e HOST=0.0.0.0 \  -e HEALTH_MONITOR_PROFILE=remote-safe \  -e HEALTH_MONITOR_HTTP_TOKEN=change-me \  -e HEALTH_MONITOR_HTTP_ORIGIN_ALLOWLIST=https://client.example \  ghcr.io/oaslananka/health-monitor-mcp:latest

Development

The repository pins Node.js 24.18.0 and pnpm 11.14.0 through .mise.toml.

bash
mise trustmise installpnpm install --frozen-lockfilepnpm run ci

Useful gates:

bash
pnpm run buildpnpm run typecheckpnpm run lintpnpm run lint:testpnpm run test:coveragepnpm run test:integrationpnpm run docs:api:checkpnpm run security:supply-chainpnpm run check:metadatapnpm run check:package

Coverage and Test Analytics

Jest remains the blocking coverage gate with repository-local thresholds. The CI validation job runs all unit and integration tests once, writes coverage/lcov.info and reports/junit/junit.xml, and uploads both reports to Codecov. Codecov project and patch statuses start as informational with target: auto and a 1% tolerance, adding pull-request diff coverage, file-level visibility, and failed-test analytics without duplicating the local merge gate.

Codecov Bundle Analysis is intentionally not enabled. This package ships Node.js entrypoints compiled with tsc; it does not currently produce a Rollup, Vite, or Webpack application bundle whose download size is a product metric.

Architecture and Roadmap

Agent Runtime Configuration

This repository owns its product-specific MCP configuration, plugin manifest, and skills:

FilePurpose
.claude-plugin/plugin.jsonClaude Code plugin manifest
.mcp.jsonProject-local MCP configuration
.codex/config.example.tomlCodex CLI example
.vscode/mcp.example.jsonVS Code / Copilot example
opencode.example.jsoncOpenCode example
skills/Product-specific monitoring workflows
docs/agent-runtime-config.mdRuntime setup and validation

Security and Contributing

Report vulnerabilities through GitHub Private Vulnerability Reporting. See SECURITY.md and docs/security.md.

Contribution setup and standards are documented in docs/contributing.md. Usage questions belong in GitHub Discussions; actionable work belongs in issues.

License

MIT

來源:README.md,提交 77e4dcc

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.4.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分