Skip to main content
Glama
oaslananka

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

마크다운 보고서 반환

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 토큰은 v1.0에서 로컬 SQLite 데이터베이스에 base64로 저장됩니다. 이는 암호화가 아닌 인코딩입니다. 자격 증명 저장 참고 사항을 참조하십시오.

경고 구성

set_alert를 사용하여 서버 하나를 구성합니다:

필드

의미

max_response_time_ms

이 지연 시간을 초과하면 경고

min_uptime_percent

선택한 가동 시간 창이 이 값 아래로 떨어지면 경고

consecutive_failures_before_alert

이 횟수만큼 연속으로 실패 결과가 나오면 경고

경고는 check_server, check_allget_dashboard에 의해 인라인으로 평가됩니다. 웹훅 전달은 v1.1에서 계획되어 있으며, v1.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

DB는 파일 기반 데이터베이스에서 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

기본 Node 런타임이 프로젝트 대상보다 최신인 워크스테이션에서는 npx --yes -p node@20.19.0 -p npm@10.8.2 npm <command>를 사용하십시오.

아키텍처

상위 수준 모듈 맵:

  • 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 파이프라인, 마크다운 보고서

  • [ ] v1.1: Slack, Discord 및 사용자 지정 엔드포인트를 위한 웹훅 알림

  • [ ] v1.2: 다중 공급자 파이프라인 및 일반 HTTP 모니터링

  • [ ] v2.0: 암호화된 PAT 저장 및 다중 사용자 지원

보안

취약점 보고는 SECURITY.md를, 구현별 저장 세부 정보는 docs/security.md를 참조하십시오.

기여

설정, 표준 및 PR 기대 사항은 contributing.md를 참조하십시오.

라이선스

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oaslananka/mcp-health-monitor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server