Cover image
Try Now
2025-03-30

3 years

Works with Finder

16

Github Watches

1

Github Forks

16

Github Stars

CloudWatch Logs MCP Server

An MCP (Model Context Protocol) server that provides tools for accessing AWS CloudWatch logs. This server allows AI assistants to list log groups and read log entries from AWS CloudWatch.

Available Tools

list_groups

Lists available CloudWatch log groups.

Parameters:

  • prefix (optional): Log group name prefix
  • region (optional): AWS region
  • accessKeyId (optional): AWS access key ID
  • secretAccessKey (optional): AWS secret access key
  • sessionToken (optional): AWS session token

Returns: JSON string with the list of log groups, including logGroupName, creationTime, and storedBytes.

get_logs

Gets CloudWatch logs from a specific log group.

Parameters:

  • logGroupName (required): The name of the log group
  • logStreamName (optional): The name of the log stream
  • startTime (optional): Start time in ISO format or relative time (e.g., "5m", "1h", "1d")
  • endTime (optional): End time in ISO format
  • filterPattern (optional): Filter pattern for the logs
  • region (optional): AWS region
  • accessKeyId (optional): AWS access key ID
  • secretAccessKey (optional): AWS secret access key
  • sessionToken (optional): AWS session token

Returns: JSON string with the log events, including timestamp, message, and logStreamName.

Setup

AWS Credentials

Ensure you have AWS credentials configured. You can set them up using the AWS CLI or by setting environment variables:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Usage with Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "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": []
    }
  }
}

Docker

If you prefer to run the server in a Docker container, you can set up a Dockerfile and use the following configuration:

{
  "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>",
      }
    }
  }
}

Implementation Details

This server is built using the FastMCP class from the MCP SDK, which provides a simple way to create MCP servers. The server exposes two main tools:

  1. list_groups: Lists available CloudWatch log groups
  2. get_logs: Reads log entries from specific log groups

Each tool is implemented as an async function decorated with @mcp.tool(). The server uses the boto3 library to interact with the AWS CloudWatch Logs API.

License

MIT

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • jae-jae
  • MCP Server pour récupérer le contenu de la page Web à l'aide du navigateur sans tête du dramwright.

  • HiveNexus
  • Un bot de chat IA pour les petites et moyennes équipes, soutenant des modèles tels que Deepseek, Open AI, Claude et Gemini. 专为中小团队设计的 Ai 聊天应用 , 支持 Deepseek 、 Open Ai 、 Claude 、 Gemini 等模型。

  • ravitemer
  • Un puissant plugin Neovim pour gérer les serveurs MCP (Protocole de contexte modèle)

  • patruff
  • Pont entre les serveurs Olllama et MCP, permettant aux LLM locaux d'utiliser des outils de protocole de contexte de modèle

  • Sysc4lls
  • Lecteur de documentation IDA (Sort-of) MCP Server

    Reviews

    4 (1)
    Avatar
    user_DENoSUIl
    2025-04-16

    Cloudwatch-logs-mcp by serkanh is a fantastic tool for anyone working with CloudWatch logs. It offers seamless integration and outstanding functionality to manage and process logs efficiently. The ease of use and comprehensive documentation available at the Github link make it an invaluable resource for developers. Highly recommended for anyone looking to streamline their logging processes.