CloudWatch Logs

Provides tools to access AWS CloudWatch logs, including listing log groups and reading log entries.
  • python

27

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "serkanh-cloudwatch-logs-mcp": {
      "command": "python3",
      "args": [
        "/path/to/cloudwatch-logs-mcp/main.py"
      ],
      "env": {
        "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY_ID>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_ACCESS_KEY>"
      }
    }
  }
}

You have a CloudWatch Logs MCP Server that exposes two tools to interact with AWS CloudWatch: list_groups to enumerate log groups and get_logs to fetch log events. This server lets your AI assistants query CloudWatch data directly, making it easier to build insights from your logs.

How to use

You will run an MCP client against the CloudWatch Logs MCP Server to access CloudWatch data. Use the list_groups tool to see available log groups, optionally filtering by prefix and region. Then use get_logs to retrieve log events from a chosen log group, with optional time windows and filters to narrow the results.

Typical workflows include listing log groups to determine which groups exist in your account and region, then pulling recent entries from a specific log group for monitoring, debugging, or analytics. You can provide credentials through your environment so the server can authenticate with AWS and access the logs.

How to install

Prerequisites: you need Python installed on your machine, or you can run the server in a container using Docker.

Option A — Run as a local Python process using MCP entry point shown in examples.

Option B — Run in Docker using the container image provided for the CloudWatch Logs MCP Server.

Additional sections

{ 
  "mcpServers": {
    "cloudwatch_logs": {
      "command": "python3",
      "args": ["/path/to/cloudwatch-logs-mcp/main.py"],
      "env": {
        "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY_ID>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_ACCESS_KEY>"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
{
  "mcpServers": {
    "cloudwatch_logs": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "AWS_ACCESS_KEY_ID",
        "-e",
        "AWS_SECRET_ACCESS_KEY",
        "mcp/cloudwatch-logs"
      ],
      "env": {
        "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY_ID>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_ACCESS_KEY>"
      }
    }
  }
}

Available tools

list_groups

Lists available CloudWatch log groups with optional prefix, region, and credentials. Returns a JSON string containing logGroupName, creationTime, and storedBytes for each group.

get_logs

Retrieves log events from a specific CloudWatch log group. Supports optional log stream name, time range, filter pattern, region, and AWS credentials. Returns a JSON string with events including timestamp, message, and logStreamName.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational