Sponsored by Deepsite.site

Mcp Monitoring

Created By
reemshai106 months ago
A sophisticated Model Context Protocol (MCP) server that provides intelligent monitoring and observability integration. This server enables natural language interactions with Prometheus, AlertManager, and Grafana through chat-style commands, advanced query processing, and comprehensive monitoring automation. ## 🌟 Overview This MCP server transforms how you interact with monitoring infrastructure by providing: - **Natural Language Processing**: Ask monitoring questions in plain English - **Intelligent Query Translation**: Automatically converts questions to PromQL queries - **Historical Alert Analysis**: Count failures, outages, and incidents over time - **Multi-Source Integration**: Seamlessly works with Prometheus, AlertManager, and Grafana - **Automated Incident Detection**: Smart pattern recognition for service failures ## ✨ Key Features ### 🧠 **Natural Language Query Engine** - **Smart Intent Recognition**: Understands monitoring questions like "How many times did service X fail?" - **Automatic Time Range Parsing**: Handles phrases like "last 2 weeks", "yesterday", "past month" - **Service Name Detection**: Recognizes services like opengrok, jenkins, grafana, prometheus - **Alert Pattern Matching**: Identifies automation failures, service outages, and critical incidents - **Context-Aware Responses**: Provides detailed breakdowns with incident counts and durations ### 🔍 **Prometheus Integration** - **Advanced PromQL Generation**: Automatically creates complex queries based on natural language - **Historical Data Analysis**: Analyzes alert trends and service availability over time - **Metric Discovery**: Browse and search available metrics with intelligent filtering - **Range Query Optimization**: Smart step sizing for different time ranges - **Alert History Tracking**: Tracks firing periods and incident detection ### 🚨 **AlertManager Integration** - **Real-time Alert Monitoring**: Query active, pending, and resolved alerts - **Smart Alert Filtering**: Filter by service, severity, alertname, or custom labels - **Alert Fingerprinting**: Track unique alert instances and their lifecycle - **Incident Correlation**: Group related alerts and calculate total impact ### 📊 **Grafana Integration** (Optional) - **Dashboard Discovery**: Find dashboards related to specific services - **Dynamic Dashboard Links**: Generate direct links to relevant monitoring views - **Service Context Mapping**: Connect services to their monitoring dashboards
Overview

🛠️ Available Tools

Natural Language Query

// Ask monitoring questions in plain English
mcp_monitoring_natural_language_query({
  question: "how many times did jenkins fail in the last week?",
  timeRange: "last week"  // optional
})

Active Alerts

// Get currently firing alerts
mcp_monitoring_get_active_alerts({
  filter: "alertname=cleanup-zuultmp"  // optional filter
})

Prometheus Instant Query

// Execute PromQL queries
mcp_monitoring_query_prometheus({
  query: "up{job='prometheus'}",
  time: "2024-01-15T10:30:00Z"  // optional timestamp
})

Prometheus Range Query

// Get historical time series data
mcp_monitoring_query_prometheus_range({
  query: "ALERTS{severity='critical'}",
  start: "2024-01-01T00:00:00Z",
  end: "2024-01-15T00:00:00Z",
  step: "1h"  // optional resolution
})

🚀 Quick Start

Installation

git clone <repository-url>
cd monitoring-mcp
npm install
npm run build

Configuration

Set environment variables:

export PROMETHEUS_URL="https://prometheus.example.com"
export ALERTMANAGER_URL="https://alertmanager.example.com"
export GRAFANA_URL="https://grafana.example.com"          # Optional
export GRAFANA_API_TOKEN="your-grafana-token"             # Optional - Ask admin to create service user and provide token

Running the Server

npm start
# or
node dist/index.js

Server Config

{
  "mcpServers": {
    "monitoring-mcp": {
      "command": "node",
      "args": [
        "/Users/MCP/mcp-monitoring/dist/index.js"
      ],
      "env": {
        "PROMETHEUS_URL": "${input:prometheus_base_url}",
        "ALERTMANAGER_URL": "${input:alertmanager_base_url}",
        "GRAFANA_URL": "${input:grafana_base_url}",
        "GRAFANA_API_KEY": "${input:grafana_api_key}"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
DeepChatYour AI Partner on Desktop
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code