AWS Builder Center

Supercharge your Observability with AI-Powered Troubleshooting

Amazon CloudWatch MCP Server is an AI-powered solution that simplifies monitoring and troubleshooting of complex distributed applications.

Monitoring and troubleshooting mission-critical applications can be a complex and time-consuming task. As systems become more distributed and dynamic, the volume of telemetry data continues to grow, making it challenging for teams to quickly identify and resolve issues.
The newly launched Amazon CloudWatch MCP Server aims to address these challenges by providing a powerful set of AI-driven tools to streamline observability and accelerate incident response. This MCP (Model Context Protocol) server integrates seamlessly with CloudWatch, the comprehensive monitoring service from AWS, to deliver comprehensive observability and troubleshooting capabilities through standardized interfaces.
In this blog post, we'll walk through the key features and capabilities of the Amazon CloudWatch MCP Server and how you can get started using it to improve your operational visibility and incident response.
Features and Capabilities
1. Alarm-Based Troubleshooting
- Identifies active alarms, retrieves related metrics and logs
- Analyzes historical alarm patterns to determine root causes of triggered alerts
- Provides context-aware recommendations for remediation
2. Log Analyzer
- Analyzes a CloudWatch log group for anomalies, message patterns, and error patterns within a specified time window
3. Metric Definition Analyzer
- Provides comprehensive descriptions of what metrics represent, how they're calculated, and recommended statistics to use for metric data retrieval
4. Alarm Recommendations
- Suggests recommended alarm configurations for CloudWatch metrics, including thresholds, evaluation periods, and other alarm settings
Prerequisites
Before you can use the Amazon CloudWatch MCP Server, make sure you have the following:
  1. An  AWS account  with access to CloudWatch
  1. AWS credentials with the necessary permissions (see "Required IAM Permissions" in the webpage)
  1. Install Python using  uv python install 3.10 
  1. Use any MCP Client of your preference. (I used CLINE in VS Code)
  1. Local Docker Installation
Installation and Setup
1. Clone the MCP repository from GitHub:
git clone https://github.com/awslabs/mcp.git
2. Navigate to the `src/cloudwatch-mcp-server/` directory:
cd mcp/src/cloudwatch-mcp-server/
3. Build the Docker image locally:
docker build -t awslabs/cloudwatch-mcp-server:latest .
4. Configure your LLM client's settings:
- Create a `.env` file with your AWS credentials:
AWS_ACCESS_KEY_ID=<your-access-key-id>
AWS_SECRET_ACCESS_KEY=<your-secret-access-key>
AWS_SESSION_TOKEN=<your-session-token>
- Update your LLM client's configuration (e.g., `~/.aws/amazonq/mcp.json`) with the CloudWatch MCP Server settings:
{
"mcpServers": {
"awslabs.cloudwatch-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"--env-file",
"/full/path/to/file/.env",
"awslabs/cloudwatch-mcp-server:latest"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
Now you're ready to start using the Amazon CloudWatch MCP Server to enhance your observability and troubleshooting capabilities. Explore the available tools, such as alarm-based troubleshooting, log analysis, metric definition analysis, and alarm recommendations, to streamline your incident response and gain deeper insights into your CloudWatch data.
I used to CLINE on VS Code to establish this connection to CloudWatch MCP Server. Screenshot below:

Start asking Questions around Observability to CLINE using Chat:

The complete Orchestration is taken taken by the CloudWatch MCP Server. You can check the rationale to execute the steps to reach to final result.
Conclusion:
The Amazon CloudWatch MCP Server is a powerful addition to your observability toolkit, providing AI-driven tools to simplify monitoring, reduce context switching, and accelerate incident resolution. By integrating with the comprehensive CloudWatch service, the MCP server offers a unified interface to access a wide range of observability capabilities, enabling cross-service correlations and insights that were previously difficult to achieve.
As you start using the CloudWatch MCP Server, you'll be able to gain a deeper understanding of your application's behavior, identify and resolve issues more efficiently, and ultimately improve the overall reliability and performance of your systems.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article