{
  "markdown": "# health-monitor-mcp\n\n> MCP server, CI workflow, and generic HTTP endpoint monitoring with health history, TLS expiry, assertions, diagnostics, and operational reports.\n\n[![CI](https://github.com/oaslananka/health-monitor-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/oaslananka/health-monitor-mcp/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/oaslananka/health-monitor-mcp/graph/badge.svg)](https://codecov.io/gh/oaslananka/health-monitor-mcp)\n[![Release](https://github.com/oaslananka/health-monitor-mcp/actions/workflows/release.yml/badge.svg)](https://github.com/oaslananka/health-monitor-mcp/actions/workflows/release.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/oaslananka/health-monitor-mcp/badge)](https://scorecard.dev/viewer/?uri=github.com/oaslananka/health-monitor-mcp)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D24-brightgreen)](https://nodejs.org)\n\n## What This Does\n\n`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.\n\nSupported target transports:\n\n- **Streamable HTTP** for current remote MCP servers.\n- **SSE** for legacy MCP servers.\n- **stdio** for trusted local executables after explicit opt-in.\n- **GitHub Actions** workflow runs, failed jobs, and failed steps for public or private repositories.\n- **GitLab CI/CD** pipelines, failed jobs, stages, refs, commits, URLs, and bounded trace excerpts for GitLab.com or allowlisted self-hosted instances.\n- **Generic HTTP/HTTPS** endpoints with status, header, body-substring, JSON-value, redirect, latency, and TLS-expiry checks.\n\nAzure 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.\n\n## Quick Start\n\nRun the published package noninteractively with Node.js 24:\n\n```bash\nnpx -y health-monitor-mcp --version\n```\n\nExample MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"health-monitor\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"health-monitor-mcp\"]\n    }\n  }\n}\n```\n\n## Tools\n\n| Tool                         | Purpose                                                 | Typical prompt                          |\n| ---------------------------- | ------------------------------------------------------- | --------------------------------------- |\n| `register_server`            | Register an MCP target                                  | `Register inventory-prod`               |\n| `check_server`               | Run one MCP health check                                | `Check inventory-prod now`              |\n| `register_github_actions`    | Register a GitHub workflow                              | `Monitor ci.yml in owner/repo`          |\n| `check_github_actions`       | Check latest GitHub run and failed job/step diagnostics | `Check repo-ci now`                     |\n| `register_gitlab_pipeline`   | Register a GitLab project pipeline                      | `Monitor group/project on GitLab`       |\n| `check_gitlab_pipeline`      | Check latest pipeline and bounded failed-job traces     | `Check gitlab-ci now`                   |\n| `register_http_target`       | Register a GET-only HTTP/HTTPS endpoint                 | `Monitor the public health endpoint`    |\n| `check_http_target`          | Check response assertions and TLS expiry                | `Check service-health now`              |\n| `check_all`                  | Check all target kinds with bounded concurrency         | `Check all production targets`          |\n| `get_uptime`                 | Return MCP uptime and latency history                   | `Show 24h uptime for inventory-prod`    |\n| `get_dashboard`              | Return a cross-provider JSON dashboard                  | `Give me a 24h dashboard`               |\n| `get_report`                 | Return a cross-provider Markdown report                 | `Generate a 24h health report`          |\n| `list_servers`               | List registered MCP targets                             | `List monitored MCP servers`            |\n| `list_github_actions`        | List registered GitHub workflow targets                 | `List monitored workflows`              |\n| `list_gitlab_pipelines`      | List registered GitLab pipeline targets                 | `List monitored GitLab pipelines`       |\n| `list_http_targets`          | List registered HTTP targets                            | `List monitored HTTP endpoints`         |\n| `unregister_server`          | Remove an MCP target                                    | `Stop monitoring local-debugger`        |\n| `unregister_github_actions`  | Remove a GitHub target and its history                  | `Stop monitoring repo-ci`               |\n| `unregister_gitlab_pipeline` | Remove a GitLab target and its history                  | `Stop monitoring gitlab-ci`             |\n| `unregister_http_target`     | Remove an HTTP target and its history                   | `Stop monitoring service-health`        |\n| `set_alert`                  | Configure MCP health thresholds                         | `Alert if inventory-prod exceeds 500ms` |\n| `get_monitor_stats`          | Inspect cross-provider monitor activity                 | `How many checks are stored?`           |\n\nExpected 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`, and `STDIO_COMMAND_REJECTED`.\n\n## Register Targets\n\nStreamable HTTP:\n\n```text\nregister_server name=\"inventory-prod\" type=\"http\" url=\"https://inventory.example.com/mcp\" tags=[\"production\",\"inventory\"]\n```\n\nLegacy SSE:\n\n```text\nregister_server name=\"legacy-search\" type=\"sse\" url=\"https://search.example.com/sse\" tags=[\"legacy\"]\n```\n\nTrusted local stdio:\n\n```bash\nexport HEALTH_MONITOR_ALLOW_STDIO=1\nexport HEALTH_MONITOR_STDIO_ALLOWLIST=npx,node\n```\n\n```text\nregister_server name=\"local-debugger\" type=\"stdio\" command=\"npx\" args=[\"-y\",\"mcp-debug-recorder\"] tags=[\"local\"]\n```\n\nThe `command` field must contain one executable only. Put package names and flags in `args`. Remote-safe runtime profiles always disable stdio.\n\n## Register GitHub Actions\n\nPublic repositories can be checked without authentication. Private repositories and higher API rate limits require a token with Actions read access:\n\n```bash\nexport GITHUB_TOKEN=your-runtime-secret\n```\n\n```text\nregister_github_actions name=\"repo-ci\" owner=\"oaslananka\" repository=\"health-monitor-mcp\" workflow=\"ci.yml\" branch=\"main\" token_env=\"GITHUB_TOKEN\" tags=[\"production\",\"ci\"]\ncheck_github_actions name=\"repo-ci\" timeout_ms=5000\n```\n\nOnly 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.\n\n## Register GitLab Pipelines\n\nPublic GitLab.com projects can be checked without authentication. Private projects require a token exposed only through the runtime environment:\n\n```bash\nexport GITLAB_TOKEN=your-runtime-secret\n```\n\n```text\nregister_gitlab_pipeline name=\"gitlab-ci\" project=\"group/project\" ref=\"main\" token_env=\"GITLAB_TOKEN\" tags=[\"production\",\"ci\"]\ncheck_gitlab_pipeline name=\"gitlab-ci\" timeout_ms=5000\n```\n\nGitLab.com is allowed by default. A self-hosted instance must use an HTTPS origin and be explicitly allowed:\n\n```bash\nexport HEALTH_MONITOR_GITLAB_BASE_URL_ALLOWLIST=https://gitlab.internal.example\n```\n\n```text\nregister_gitlab_pipeline name=\"private-gitlab\" base_url=\"https://gitlab.internal.example\" project=\"platform/service\" token_env=\"GITLAB_TOKEN\"\n```\n\nOnly `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.\n\n## Register HTTP Targets\n\nPublic 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:\n\n```text\nregister_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\"]\ncheck_http_target name=\"service-health\" timeout_ms=5000\n```\n\nPrivate, 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:\n\n```bash\nexport HEALTH_MONITOR_HTTP_TARGET_ALLOWLIST=https://status.internal.example:8443\n```\n\nEvery 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.\n\n## Health Checks and Reports\n\n```text\ncheck_server name=\"inventory-prod\" timeout_ms=5000\ncheck_all timeout_ms=5000 tags=[\"production\"]\nget_uptime name=\"inventory-prod\" hours=24\nget_dashboard hours=24 include_tool_stats=true\nget_report hours=24\n```\n\n`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.\n\n## Alerts\n\n```text\nset_alert name=\"inventory-prod\" max_response_time_ms=500 min_uptime_percent=99 consecutive_failures_before_alert=2\n```\n\nAlert findings are evaluated by `check_server`, `check_all`, and `get_dashboard`. Outbound webhook delivery is not yet exposed as a public MCP tool.\n\n## Configuration\n\n| Variable                                   | Default                           | Purpose                                         |\n| ------------------------------------------ | --------------------------------- | ----------------------------------------------- |\n| `HEALTH_MONITOR_DB`                        | `~/.mcp-health-monitor/health.db` | SQLite database path                            |\n| `HEALTH_MONITOR_AUTO_CHECK`                | `0`                               | Enable scheduled checks with `1`                |\n| `HEALTH_MONITOR_RETENTION_DAYS`            | `30`                              | Health-history retention                        |\n| `HEALTH_MONITOR_MAX_CONCURRENCY`           | `5`                               | Scheduled and interactive check concurrency     |\n| `GITHUB_TOKEN`                             | unset                             | Optional GitHub Actions read token              |\n| `GITLAB_TOKEN`                             | unset                             | Optional GitLab project/pipeline/job read token |\n| `HEALTH_MONITOR_GITLAB_BASE_URL_ALLOWLIST` | unset                             | Allowed self-hosted GitLab HTTPS origins        |\n| `HEALTH_MONITOR_HTTP_TARGET_ALLOWLIST`     | unset                             | Private HTTP(S) origins allowed in full profile |\n| `HEALTH_MONITOR_ALLOW_STDIO`               | `0`                               | Allow trusted local stdio checks                |\n| `HEALTH_MONITOR_STDIO_ALLOWLIST`           | unset                             | Optional comma-separated executable allowlist   |\n| `HEALTH_MONITOR_HTTP_TOKEN`                | unset                             | Bearer token for `POST /mcp`                    |\n| `HEALTH_MONITOR_HTTP_ORIGIN_ALLOWLIST`     | unset                             | Allowed remote client origins                   |\n| `HEALTH_MONITOR_HTTP_MAX_BODY_BYTES`       | `1048576`                         | Maximum inbound MCP body                        |\n| `HEALTH_MONITOR_HTTP_BODY_TIMEOUT_MS`      | `15000`                           | Inbound body read timeout                       |\n| `HEALTH_MONITOR_HTTP_STATEFUL_SESSIONS`    | `0`                               | Enable stateful Streamable HTTP sessions        |\n| `HEALTH_MONITOR_HTTP_SESSION_TTL_MS`       | `1800000`                         | Stateful session TTL                            |\n| `HEALTH_MONITOR_HTTP_MAX_SESSIONS`         | `100`                             | Stateful session cap                            |\n\n## HTTP Deployment\n\nThe server binds to `127.0.0.1` by default. A non-loopback bind requires a remote-safe profile, bearer token, and Origin allowlist.\n\n```bash\nHOST=0.0.0.0 \\\nHEALTH_MONITOR_PROFILE=remote-safe \\\nHEALTH_MONITOR_HTTP_TOKEN=change-me \\\nHEALTH_MONITOR_HTTP_ORIGIN_ALLOWLIST=https://client.example \\\nnpx -y health-monitor-mcp-http\n```\n\n`GET /health` is unauthenticated and exposes only status and version. `POST /mcp` requires `Authorization: Bearer <token>`.\n\n## Docker\n\nPersist `/data`; otherwise the SQLite database disappears with the container.\n\n```bash\ndocker volume create health-monitor-data\n\ndocker run --rm \\\n  -v health-monitor-data:/data \\\n  -p 127.0.0.1:3000:3000 \\\n  -e HOST=0.0.0.0 \\\n  -e HEALTH_MONITOR_PROFILE=remote-safe \\\n  -e HEALTH_MONITOR_HTTP_TOKEN=change-me \\\n  -e HEALTH_MONITOR_HTTP_ORIGIN_ALLOWLIST=https://client.example \\\n  ghcr.io/oaslananka/health-monitor-mcp:latest\n```\n\n## Development\n\nThe repository pins Node.js 24.18.0 and pnpm 11.14.0 through `.mise.toml`.\n\n```bash\nmise trust\nmise install\npnpm install --frozen-lockfile\npnpm run ci\n```\n\nUseful gates:\n\n```bash\npnpm run build\npnpm run typecheck\npnpm run lint\npnpm run lint:test\npnpm run test:coverage\npnpm run test:integration\npnpm run docs:api:check\npnpm run security:supply-chain\npnpm run check:metadata\npnpm run check:package\n```\n\n## Coverage and Test Analytics\n\nJest remains the blocking coverage gate with repository-local thresholds. The CI validation job runs\nall unit and integration tests once, writes `coverage/lcov.info` and\n`reports/junit/junit.xml`, and uploads both reports to Codecov. Codecov project and patch statuses\nstart as informational with `target: auto` and a 1% tolerance, adding pull-request diff coverage,\nfile-level visibility, and failed-test analytics without duplicating the local merge gate.\n\nCodecov Bundle Analysis is intentionally not enabled. This package ships Node.js entrypoints compiled\nwith `tsc`; it does not currently produce a Rollup, Vite, or Webpack application bundle whose download\nsize is a product metric.\n\n## Architecture and Roadmap\n\n- [Architecture](docs/architecture.md)\n- [Operations](docs/operations.md)\n- [Security](docs/security.md)\n- [Usage](docs/usage.md)\n- [Roadmap](ROADMAP.md)\n- [Release process](docs/release.md)\n- [Generated API reference](docs/api/README.md)\n\n## Agent Runtime Configuration\n\nThis repository owns its product-specific MCP configuration, plugin manifest, and skills:\n\n| File                           | Purpose                               |\n| ------------------------------ | ------------------------------------- |\n| `.claude-plugin/plugin.json`   | Claude Code plugin manifest           |\n| `.mcp.json`                    | Project-local MCP configuration       |\n| `.codex/config.example.toml`   | Codex CLI example                     |\n| `.vscode/mcp.example.json`     | VS Code / Copilot example             |\n| `opencode.example.jsonc`       | OpenCode example                      |\n| `skills/`                      | Product-specific monitoring workflows |\n| `docs/agent-runtime-config.md` | Runtime setup and validation          |\n\n## Security and Contributing\n\nReport vulnerabilities through GitHub Private Vulnerability Reporting. See [SECURITY.md](SECURITY.md) and [docs/security.md](docs/security.md).\n\nContribution setup and standards are documented in [docs/contributing.md](docs/contributing.md). Usage questions belong in GitHub Discussions; actionable work belongs in issues.\n\n## License\n\nMIT\n",
  "bytes": 16058,
  "sha": "bc12191613c8f4a9c7e2841886eebc4de43d2387e932a4c9c977dc9e65dfd70a",
  "repo_slug": "oaslananka/health-monitor-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_oaslananka_health_monitor_mcp_06792eb2/readme"
}