Log-Analyzer-with
A Model Context Protocol (MCP) server that provides AI assistants access to AWS CloudWatch Logs for analysis, searching, and correlation
claude mcp add --transport stdio awslabs-log-analyzer-with-mcp uvx awslabs-log-analyzer-with-mcp \ --env AWS_REGION="<your-aws-region>" \ --env AWS_ACCESS_KEY_ID="<your-aws-access-key-id>" \ --env AWS_SESSION_TOKEN="<your-aws-session-token-if-applicable>" \ --env AWS_SECRET_ACCESS_KEY="<your-aws-secret-access-key>"
How to use
This MCP server provides an AI-enabled interface to AWS CloudWatch Logs, allowing a Claude-like assistant to browse log groups, run CloudWatch Logs Insights queries, summarize log data, and correlate events across multiple AWS services. Once running, you can use the associated MCP tools to list available log groups, dive into specific logs, execute queries using CloudWatch Logs Insights syntax, and generate human-readable summaries or anomaly detections from large log streams. The integration is designed for seamless interaction with AI assistants, enabling natural-language style queries that are translated into CloudWatch operations under the hood.
To use it, ensure your AWS credentials and region are configured and accessible to the running MCP server. Use the MCP-enabled assistant to request actions such as: listing log groups, searching logs with Insights queries, retrieving time-bound log events, summarizing findings, and drawing correlations across AWS services. The server abstracts CloudWatch interactions behind AI-friendly commands, so you can focus on analysis without manual AWS console steps.
How to install
Prerequisites:
- Python environment with uv (uvx) support as described in the project prerequisites.
- AWS account with CloudWatch Logs access and credentials configured.
Installation steps:
- Install Python and ensure python3 -V works on your system.
- Install uv (Python project manager) which includes uvx (as per the project prerequisites):
- Follow the uv installation guide from the repository or official docs to install the uv package and ensure uvx is available on your system.
- Install the MCP server package using uvx:
- uvx install awslabs-log-analyzer-with-mcp
- Run the server (using the specified mcp_config):
- uvx run awslabs-log-analyzer-with-mcp
- Ensure environment variables for AWS credentials are set (see below) and that the AWS region is configured.
Notes:
- If you manage credentials via a shared profile or role, ensure the environment is set up to source those credentials before starting the server.
- The exact package name for installation may vary; refer to the repository’s release notes or installation guide if uvx install awslabs-log-analyzer-with-mcp does not resolve.
Additional notes
Environment variables and configuration tips:
- AWS credentials: set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and optionally AWS_SESSION_TOKEN.
- AWS region: set AWS_REGION to the region where your CloudWatch Logs exist (e.g., us-east-1).
- If you run into permission issues, verify that the IAM role/user has CloudWatchLogs:DescribeLogGroups, CloudWatchLogs:FilterLogEvents, and CloudWatchLogs:StartQuery permissions.
- For large log datasets, consider setting query timeouts and pagination limits in CloudWatch Insights queries to avoid long-running requests.
- Keep the MCP server updated with the latest release to ensure compatibility with AWS API changes and MCP protocol updates.
- If using a local development environment, ensure network access to AWS endpoints is available and not blocked by firewall rules.
- When configuring the assistant integration, provide a clear mapping of natural language queries to CloudWatch Log Insights syntax to improve accuracy.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP