AWS CloudWatch Log Analyzer MCP

Official

AWS CloudWatch Log Analyzer MCP lets assistants search log groups, identify error patterns and correlate events using an AWS credential profile.

Local serverstdioPythonApache-2.0

What is the AWS CloudWatch Log Analyzer MCP Server?

AWS CloudWatch Log Analyzer MCP lets assistants search log groups, identify error patterns and correlate events using an AWS credential profile.

Investigate CloudWatch logs

This AWS Labs example brings CloudWatch log discovery, search and analysis into an MCP client. Tools can search a single group or several groups, filter events, summarize activity, identify repeated errors and correlate matching events. Resources expose additional log-group and stream information. The integration retrieves diagnostic evidence; it does not deploy a fix to the application producing the logs.

Connect with the documented Git source

The project supplies a uvx configuration that installs its server from the GitHub repository and launches cw-mcp-server over stdio. It supports an AWS profile and region through launch arguments, and can use the normal AWS credential chain. A named profile avoids treating a fixed set of environment variables as the only way to authenticate.

Keep the investigation bounded

Choose the account, region, log group and time range before searching. A multi-group query is useful when a request crosses services, but matching timestamps alone do not establish the cause of an error. Retain the original messages and request identifiers so the assistant's proposed explanation can be checked.

Start with a known incident

Find an error visible in the CloudWatch console and request the same interval through MCP. Compare event counts and raw entries, then expand the search to a related service. Use permissions appropriate to log analysis and check query limits and CloudWatch charges for the selected workflow.

Project documentation

Repository and setup guide

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
list_log_groupsList CloudWatch log groups with optional prefix and pagination.
search_logsSearch a selected log group over a bounded interval.
search_logs_multiSearch multiple log groups.
filter_log_eventsRetrieve events matching a filter pattern.
summarize_log_activitySummarize activity within a log group and interval.
find_error_patternsIdentify recurring error patterns in retrieved logs.
correlate_logsCorrelate matching events across selected log groups.

How to install the AWS CloudWatch Log Analyzer MCP Server

{
  "mcpServers": {
    "cw-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/awslabs/Log-Analyzer-with-MCP",
        "cw-mcp-server"
      ]
    }
  }
}

Uses the normal AWS credential chain. Add the documented --profile and --region arguments when needed.

Configuration

Python 3.12 or later, uv and AWS credentials with access to the selected CloudWatch Logs resources.

Example prompts to try

  • “Use Log Analyzer With MCP to Prerequisites.”

Frequently asked questions

The server can use the AWS credential chain and named profiles. Its documented launch also supports explicit profile and region arguments.