incident-mcp
incident-mcp
インシデント検知(detection) → 分析(analysis) を支援する Python MCP(Model Context Protocol) サーバーです。 メトリクス時系列から異常兆候を検知し、相関関係を束ねて 根本原因候補 と 推奨アクション まで提示します。
1つのツール契約(tool contract)を2つのバックエンドが共有します:
サーバー | バックエンド | 用途 |
| 組み込み合成データ (決定論的) | VMなしで開発・デモ・回帰テスト |
| 実際の VictoriaMetrics HTTP API | 運用/実測インシデント分析 |
2つのサーバーのツールシグネチャは100%同一なので、mockでワークフローを開発した後、無停止で実際のVMに切り替えができます。
アーキテクチャ
incident_mcp/
├── core/ # 백엔드 무관 공통 로직 (순수 함수 → 테스트 용이)
│ ├── models.py # Pydantic: Anomaly, IncidentAnalysis, Series ...
│ ├── datasource.py # Protocol(인터페이스) — VM/Mock이 구현
│ ├── detection.py # 이상탐지: zscore · spike · trend · threshold
│ └── analysis.py # 상관분석 + 근본원인 휴리스틱
├── datasources/
│ ├── mock_ds.py # 재현 가능한 합성 메트릭 + 주입된 인시던트 시나리오
│ └── vm_ds.py # VictoriaMetrics(Prometheus 호환) HTTP 클라이언트
├── servers/
│ ├── mock_server.py # B: mock 데이터소스 주입
│ └── vm_server.py # A: VictoriaMetrics 데이터소스 주입
└── tools.py # 공통 MCP 도구 4종 (두 서버가 공유)MCPツール4種
ツール | 説明 |
| 利用可能なメトリクスカタログ |
| 生時系列の取得 (確認/デバッグ) |
| 異常検知の実行 (zscore/spike/trend) |
| 検知→分析のワンステップ (根本原因候補 + 推奨アクション) |
Related MCP server: MCP Server for vmanomaly
クイックスタート
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# 단위 테스트
pytest -q
# mock 서버로 종단(E2E) 데모 — mock 2개 시나리오 + 실제 VM
python examples/e2e_client.pyドキュメント (ステップ別)
異常検知手法 (概要)
手法 | 捉えるパターン | インシデント例 |
| 平均から大きく外れた瞬間値 | 瞬間スパイク |
| 直前区間に対する急激な変化率 | エラー率の急増 |
| 緩やかな単調増加/減少 | メモリリーク (zscore/spikeでは検知できない) |
| 絶対しきい値の違反 | SLA限界の超過 |
💡 メモリリークのように「じわじわ漏れる」パターンは、瞬間値ベース(zscore/spike)では検知できないため、 回帰勾配ベースの
trend検知器を別途用意しました。 — step2 参照
ライセンス
MIT
Related MCP Connectors
AI-powered incident management and server monitoring via MCP.
MCP-native AI SRE: ask what's broken in production, get a reviewed GitHub fix PR.
Read-only MCP server for AIStatusDashboard status, incidents, metrics, and fallback recommendations.
Manage uptime monitors, incidents and status pages from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA comprehensive, AI-powered performance analysis and monitoring platform for OpenShift/Kubernetes clusters. This project provides Model Context Protocol (MCP) servers for analyzing etcd, network, and OVN-Kubernetes components with deep performance insights, automated root cause analysis, and actionable recommendations.1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server that integrates with VictoriaMetrics vmanomaly API to enable AI-assisted anomaly detection, model management, and configuration generation.11Apache 2.0
- AlicenseAqualityDmaintenanceExposes an observability REST API as MCP tools, enabling incident investigation through automated correlation of deploys with errors, log and metrics queries.6MIT
- FlicenseAqualityDmaintenanceAI-powered incident management MCP server that enables investigation, root cause analysis, and response actions for production incidents using mocked data for demo purposes.8-