Skip to main content
Glama
MCP Health Monitor

MCP Health Monitor

mcp-health-monitor

Мониторинг состояния MCP-серверов, отслеживание времени безотказной работы, статуса конвейеров Azure DevOps и оценка оповещений с помощью инструментов на естественном языке.

npm version npm downloads License: MIT Node.js

Что это делает

mcp-health-monitor ведет реестр интересующих вас MCP-серверов, выполняет реальные рукопожатия MCP с ними, записывает историю состояния в SQLite и сообщает о времени безотказной работы, задержках и порогах оповещений через инструменты MCP. Он также отслеживает конвейеры Azure DevOps, чтобы состояние приложения и доставки можно было проверить из одного места.

Быстрый старт

Запустите монитор через stdio:

npx -y mcp-health-monitor

Пример записи для Claude Desktop или VS Code MCP:

{
  "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"]
}

Справочник инструментов

Инструмент

Назначение

Типичный запрос

register_server

Сохранить MCP-сервер для мониторинга

Register https://example.com/mcp as prod-gateway

check_server

Выполнить проверку состояния одного сервера

Check prod-gateway now

check_all

Проверить все зарегистрированные серверы

Check all my MCP servers

get_uptime

Вернуть время безотказной работы и статистику задержек

Show 24h uptime for prod-gateway

get_dashboard

Вернуть данные панели мониторинга в формате JSON

Give me a 24h dashboard

get_report

Вернуть отчет в формате Markdown

Generate a Markdown health report for 24h

list_servers

Показать зарегистрированные серверы

List all monitored servers

unregister_server

Удалить сервер

Stop monitoring local-debugger

set_alert

Настроить пороги

Alert if prod-gateway exceeds 500ms or drops below 99% uptime

get_monitor_stats

Показать статистику монитора

How many checks has the monitor recorded?

register_azure_pipelines

Зарегистрировать группы конвейеров Azure

Track CI and Publish pipelines for my repo

check_pipeline_status

Прочитать последние запуски конвейеров Azure

Check pipeline status for my release group

get_pipeline_logs

Получить журналы сборки Azure

Show the failed logs for the latest Publish build

check_all_projects

Объединить состояние MCP и Azure

Check all projects

Интеграция с Azure DevOps

Зарегистрируйте группу конвейеров с указанием организации, проекта, имен конвейеров и 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 хранятся в виде base64 в локальной базе данных SQLite в версии 1.0. Это кодирование, а не шифрование. См. примечания по хранению учетных данных.

Настройка оповещений

Используйте set_alert для настройки одного сервера:

Поле

Значение

max_response_time_ms

Оповещать, когда задержка проверки превышает это значение

min_uptime_percent

Оповещать, когда выбранный интервал безотказной работы падает ниже этого значения

consecutive_failures_before_alert

Оповещать после указанного количества неудачных результатов подряд

Оповещения оцениваются встроенными средствами check_server, check_all и get_dashboard. Доставка через вебхуки запланирована на версию 1.1, в версии 1.0.x инструменты MCP для вебхуков отсутствуют.

Хранение данных

  • Путь к базе данных по умолчанию: ~/.mcp-health-monitor/health.db

  • Переопределение пути: HEALTH_MONITOR_DB=/custom/path/health.db

  • Опциональный фоновый планировщик: HEALTH_MONITOR_AUTO_CHECK=1

  • Конечная точка состояния HTTP-сервера: GET /health

  • Пример конфигурации: .env.example

База данных использует режим WAL для файловых баз данных и автоматически применяет миграции схемы при запуске.

Docker

Сборка и запуск:

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

Затем проверьте:

curl http://localhost:3000/health

Разработка

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

Используйте npx --yes -p node@20.19.0 -p npm@10.8.2 npm <command> на рабочих станциях, где среда выполнения Node по умолчанию новее, чем целевая версия проекта.

Архитектура

Карта модулей высокого уровня:

  • src/app.ts: Регистрация инструментов MCP и форматирование ответов

  • src/checker.ts: Проверка связи с MCP в реальном времени с повторными попытками/экспоненциальной задержкой

  • src/registry.ts: Пути чтения/записи SQLite для серверов, проверок и записей конвейеров

  • src/db.ts + src/migrations.ts: Настройка подключения и обновление схемы

  • src/server-http.ts + src/mcp.ts: Точки входа HTTP и stdio

  • src/scheduler.ts: Опциональный цикл фоновой автоматической проверки

Более подробная информация находится в architecture.md.

Дорожная карта

Подробное планирование этапов находится в ROADMAP.md.

  • [x] v1.0: Базовый мониторинг, время безотказной работы, оповещения, конвейеры Azure, отчеты в формате Markdown

  • [ ] v1.1: Уведомления через вебхуки для Slack, Discord и пользовательских конечных точек

  • [ ] v1.2: Конвейеры от нескольких провайдеров и общий HTTP-мониторинг

  • [ ] v2.0: Шифрованное хранилище PAT и поддержка нескольких пользователей

Безопасность

Прочитайте SECURITY.md для получения информации об уязвимостях и docs/security.md для получения сведений о хранении данных, специфичных для реализации.

Участие в разработке

См. contributing.md для настройки, стандартов и ожиданий от PR.

Лицензия

MIT

Available Tools

14 tools
check_allCheck All ServersB
Read-only

Check health of all registered MCP servers in parallel.

Inputs: timeout_ms, tags.

check_all_projectsCheck All Projects HealthA
Read-only

Check both MCP server health and Azure DevOps pipeline status across all registered projects.

Inputs: timeout_ms.

check_pipeline_statusCheck Azure Pipeline StatusA
Read-only

Get the latest run status of registered Azure DevOps pipelines for one group or all groups.

Inputs: group_name.

check_serverCheck Server HealthC
Read-only

Check the health of a registered MCP server, list tools, and measure response time.

Inputs: name (required), timeout_ms.

get_dashboardGet Health DashboardA
Read-only

Get a dashboard overview of all registered MCP servers with uptime and performance stats.

Inputs: hours, include_tool_stats.

get_monitor_statsGet Monitor StatisticsA
Read-only

Get statistics about the health monitor itself, including database activity.

Inputs: no named parameters.

get_pipeline_logsGet Pipeline LogsA
Read-only

Fetch logs from a specific Azure DevOps build to investigate pipeline failures.

Inputs: group_name (required), pipeline_name (required), build_id, failed_only.

get_reportGet Health Report (Markdown)A
Read-only

Get a human-readable Markdown health report for all servers. Paste directly into chat or docs.

Inputs: hours.

get_uptimeGet Uptime StatisticsA
Read-only

Get uptime history and statistics for a registered MCP server.

Inputs: name (required), hours.

list_serversList Registered ServersC
Read-only

List all registered MCP servers with their current status.

Inputs: tags, status.

register_azure_pipelinesRegister Azure DevOps PipelinesB

Register Azure DevOps pipelines to monitor for CI, publish, and mirror status.

Inputs: name (required), organization (required), project (required), pipeline_names (required), +1 more.

register_serverRegister MCP ServerA

Register an MCP server to monitor. Supports http, sse, and stdio transports.

Inputs: name (required), type (required), url, command, +4 more.

set_alertSet Alert ThresholdsA

Configure alert thresholds for response time, uptime, and consecutive failures.

Inputs: name (required), max_response_time_ms, min_uptime_percent, consecutive_failures_before_alert.

unregister_serverUnregister ServerB
Destructive

Remove a server from monitoring.

Inputs: name (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools are clearly distinct: registration, checks, logs, alerts, reports, and stats each target a different concern. However, 'get_dashboard' and 'get_report' overlap significantly (both provide overviews of monitored servers), and 'check_all' vs 'check_all_projects' could be confused by an agent (one covers only servers, the other covers servers plus pipelines).

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern (register_*, check_*, get_*, set_*, list_*, unregister_*). Even the compound 'check_all_projects' fits the pattern as a verb with a clear object. There are no mixed naming conventions or vague verbs like 'process' or 'execute'.

    Tool Count5/5

    14 tools is well within the ideal 3-15 range. Each tool has a specific purpose in the monitoring domain, and the count supports comprehensive coverage without overwhelming an agent. The tool set is broad enough to cover registration, health checks, pipeline status, logs, reports, alerts, and stats.

    Completeness4/5

    The tool surface covers the core lifecycle: register, check, unregister, get logs, get history, get reports, and set alerts. Minor gaps include lack of explicit update/edit for registered servers or pipelines (e.g., changing transport or platform), and no tool to pause/resume monitoring, but agents can often work around those by re-registering.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors