--- id: awslabs-cloudwatch-mcp-server version: "0.1.8" license: Apache-2.0 license_treatment: permissive maintenance: active --- # awslabs.cloudwatch-mcp-server — An AWS Labs Model Context Protocol (MCP) server for cloudwatch License: permissive · Maintenance: active · Downloads: 195.7K/mo ## What it is and what it does This is an MCP server that bridges AI agents and LLMs to CloudWatch observability data. It wraps CloudWatch APIs into task-oriented tools—alarm troubleshooting, log anomaly detection, metric analysis, and PromQL queries—so agents can diagnose and resolve AWS service issues without custom integrations. The server runs locally alongside your LLM client and requires AWS credentials to access your account's CloudWatch telemetry. The package depends on boto3 for AWS API calls, pydantic for data validation, and statistical libraries (numpy, statsmodels, pandas) to analyze trends, seasonality, and anomalies in metrics and logs. It also uses loguru for logging and the mcp library to implement the protocol itself. The tool set includes alarm history analysis, log pattern detection, metric metadata retrieval, and both instant and range PromQL queries—designed to support incident response workflows where agents need to correlate metrics, logs, and alarm state to recommend remediation. Use it for: - Automated root cause analysis: agent queries active alarms, retrieves related metrics and logs, analyzes patterns to identify the underlying issue. - Anomaly detection in logs: agent scans CloudWatch log groups for error patterns and message anomalies within a time window to surface operational problems. - Metric trend analysis: agent retrieves metric data with percentile statistics and math expressions to understand performance trends and seasonality. - Cross-region log search: agent runs Logs Insights queries across multiple log groups and regions in a single batch call with automatic chunking and throttling. - Alarm configuration recommendations: agent analyzes a metric's statistical properties and suggests alarm thresholds and evaluation periods. - PromQL-based metric discovery: agent queries OTLP-ingested and enriched AWS metrics using PromQL label selectors to find relevant time series. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Exposes CloudWatch metrics, logs, alarms, and PromQL queries through a Model Context Protocol (MCP) server that AI agents can use for root cause analysis and troubleshooting recommendations. Yes—if you are building an AI agent or LLM-based troubleshooting system that needs to query CloudWatch. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. Prerequisites are AWS credentials and Python 3.10+; the server must run on the same host as your LLM client. Not suitable for standalone CLI use or non-agent workflows. ## Install pip install awslabs-cloudwatch-mcp-server uv add awslabs-cloudwatch-mcp-server poetry add awslabs-cloudwatch-mcp-server ## Installing awslabs.cloudwatch-mcp-server Before you install: Low friction: pure Python wheel with no compiled dependencies. Active maintenance—released 4 days ago with 9598 repository stars. Requires Python 3.10 or later and AWS credentials configured locally. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install awslabs.cloudwatch-mcp-server from mcp.server import Server import boto3 # Initialize and configure the MCP server with CloudWatch client # Server exposes tools like get_active_alarms(), analyze_log_group(), execute_promql_query() Requires AWS credentials configured (via aws configure or environment variables) and an AWS account with CloudWatch permissions. Must run on the same host as the LLM client. Verify before relying: - Specific AWS IAM permissions required beyond 'CloudWatch access' for all tool operations - Performance characteristics when querying large log groups or metric ranges - Whether PromQL enrichment requires additional setup beyond the documented `aws cloudwatch start-otel-enrichment` command ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 195.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cloudwatch mcp server, ai agent cloudwatch integration, llm troubleshooting tools, cloudwatch log analysis, aws observability agent, promql cloudwatch queries, alarm root cause analysis, mcp-server, aws-integration, ai-observability [View on SkillFed](https://skillfed.io/packages/awslabs-cloudwatch-mcp-server) · [View on PyPI](https://pypi.org/project/awslabs-cloudwatch-mcp-server/)