MCP Health Monitor

MCP Health Monitor

Monitor MCP server health, uptime, response times, and Azure DevOps pipeline status

Category
访问服务器

README

mcp-health-monitor

MCP server health monitoring, uptime tracking, Azure DevOps pipeline status, and alert evaluation through natural-language tools.

npm version npm downloads License: MIT Node.js

What This Does

mcp-health-monitor keeps a registry of the MCP servers you care about, performs real MCP handshakes against them, records health history in SQLite, and reports uptime, latency, and alert thresholds back through MCP tools. It also tracks Azure DevOps pipelines so app health and delivery health can be checked from the same place.

Quick Start

Run the monitor over stdio:

npx -y mcp-health-monitor

Example Claude Desktop or VS Code MCP entry:

{
  "name": "mcp-health-monitor",
  "version": "1.0.2",
  "mcpName": "io.github.oaslananka/mcp-health-monitor",
  "description": "Monitor MCP server health, uptime, response times, and Azure DevOps pipelines",
  "transport": "stdio",
  "command": "npx",
  "args": ["-y", "mcp-health-monitor"]
}

Tools Reference

Tool Purpose Typical prompt
register_server Save an MCP server to monitor Register https://example.com/mcp as prod-gateway
check_server Run a live health check for one server Check prod-gateway now
check_all Check all registered servers Check all my MCP servers
get_uptime Return uptime plus latency stats Show 24h uptime for prod-gateway
get_dashboard Return JSON dashboard data Give me a 24h dashboard
get_report Return a Markdown report Generate a Markdown health report for 24h
list_servers Show registered servers List all monitored servers
unregister_server Remove a server Stop monitoring local-debugger
set_alert Configure thresholds Alert if prod-gateway exceeds 500ms or drops below 99% uptime
get_monitor_stats Show monitor-level stats How many checks has the monitor recorded?
register_azure_pipelines Register Azure pipeline groups Track CI and Publish pipelines for my repo
check_pipeline_status Read latest Azure pipeline runs Check pipeline status for my release group
get_pipeline_logs Fetch Azure build logs Show the failed logs for the latest Publish build
check_all_projects Combine MCP and Azure health Check all projects

Azure DevOps Integration

Register a pipeline group with an org, project, pipeline names, and a PAT:

register_azure_pipelines name="mcp-health-monitor" organization="oaslananka" project="open-source" pipeline_names=["mcp-health-monitor CI","mcp-health-monitor Publish"] pat_token="..."

PAT tokens are stored as base64 in the local SQLite database for v1.0. This is encoding, not encryption. See credential storage notes.

Alert Configuration

Use set_alert to configure one server:

Field Meaning
max_response_time_ms Alert when a check exceeds this latency
min_uptime_percent Alert when the selected uptime window drops below this value
consecutive_failures_before_alert Alert after this many non-up results in a row

Alerts are evaluated inline by check_server, check_all, and get_dashboard. Webhook delivery is planned for v1.1, and no webhook MCP tool is shipped in v1.0.x.

Data Storage

  • Default database path: ~/.mcp-health-monitor/health.db
  • Override path: HEALTH_MONITOR_DB=/custom/path/health.db
  • Optional background scheduler: HEALTH_MONITOR_AUTO_CHECK=1
  • HTTP server health endpoint: GET /health
  • Example configuration: .env.example

The DB uses WAL mode on file-backed databases and applies schema migrations automatically on startup.

Docker

Build and run:

docker build -t mcp-health-monitor .
docker run --rm -p 3000:3000 -e HEALTH_MONITOR_AUTO_CHECK=1 mcp-health-monitor

Then check:

curl http://localhost:3000/health

Development

npm install
npm run build
npm test
npm run test:integration
npm run lint
npm run lint:test
npm run format:check

Use npx --yes -p node@20.19.0 -p npm@10.8.2 npm <command> on workstations where the default Node runtime is newer than the project target.

Architecture

High-level module map:

  • src/app.ts: MCP tool registration and response formatting
  • src/checker.ts: Live MCP connectivity probes with retry/backoff
  • src/registry.ts: SQLite read/write paths for servers, checks, and pipeline records
  • src/db.ts + src/migrations.ts: Connection setup and schema upgrades
  • src/server-http.ts + src/mcp.ts: HTTP and stdio entrypoints
  • src/scheduler.ts: Optional background auto-check loop

More detail lives in architecture.md.

Roadmap

Detailed milestone planning lives in ROADMAP.md.

  • [x] v1.0: Core monitoring, uptime, alerts, Azure pipelines, Markdown reports
  • [ ] v1.1: Webhook notifications for Slack, Discord, and custom endpoints
  • [ ] v1.2: Multi-provider pipeline and generic HTTP monitoring
  • [ ] v2.0: Encrypted PAT storage and multi-user support

Security

Read SECURITY.md for vulnerability reporting and docs/security.md for implementation-specific storage details.

Contributing

See contributing.md for setup, standards, and PR expectations.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选