Cover image
Try Now
2025-04-13

一个模型上下文协议(MCP)服务器,使AI助手可以使用AWS SDK通过标准化接口与Amazon CloudWatch登录进行交互。

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

Amazon CloudWatch Logs MCP Server

A Model Context Protocol (MCP) server that provides tools for interacting with Amazon CloudWatch Logs services. This server enables AI assistants to manage CloudWatch logs through a standardized interface using AWS SDK.

License: MIT Code Style npm version Docker Image

Note: This project is currently under active development and not yet ready for production use. Features and APIs may change significantly before the first stable release.

Overview

This MCP server allows AI assistants to interact with Amazon CloudWatch Logs through the Model Context Protocol. It provides a standardized interface for performing various CloudWatch Logs operations, enabling comprehensive management and monitoring of log data.

Quick Start

Prerequisites

  • AWS account with CloudWatch Logs access
  • AWS access key and secret key with appropriate permissions
  • Node.js (for npm installation) or Docker

Installation

Choose one of the following installation methods:

Option 1: npm Package

# Install the package
npm install -g @hyorimitsu/amazon-cloudwatch-logs-mcp-server

# Configure in your AI assistant's configuration
# See Configuration section below

Option 2: Docker Image

# Pull the Docker image
docker pull ghcr.io/hyorimitsu/mcp-amazon-cloudwatch-logs:latest

# Configure in your AI assistant's configuration
# See Configuration section below

Option 3: Local Development Build

# Clone the repository
git clone https://github.com/hyorimitsu/mcp-amazon-cloudwatch-logs.git
cd mcp-amazon-cloudwatch-logs

# Install dependencies
pnpm install

# Build the project
pnpm run build

# Configure in your AI assistant's configuration
# See Configuration section below

Configuration

Add the server to your AI assistant's configuration:

For npm Installation

{
  "mcpServers": {
    "amazon-cloudwatch-logs": {
      "command": "amazon-cloudwatch-logs-mcp-server",
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_KEY>"
      }
    }
  }
}

For Docker Installation

{
  "mcpServers": {
    "amazon-cloudwatch-logs": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "AWS_REGION",
        "-e",
        "AWS_ACCESS_KEY_ID",
        "-e",
        "AWS_SECRET_ACCESS_KEY",
        "ghcr.io/hyorimitsu/mcp-amazon-cloudwatch-logs"
      ],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_KEY>"
      }
    }
  }
}

For Local Development Build

{
  "mcpServers": {
    "amazon-cloudwatch-logs": {
      "command": "node",
      "args": ["/path/to/mcp-amazon-cloudwatch-logs/build/index.js"],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_KEY>"
      }
    }
  }
}

Environment Variables

Variable Required Description Default
AWS_REGION No The AWS region where your CloudWatch Logs resources are located us-east-1
AWS_ACCESS_KEY_ID Yes Your AWS access key ID for authentication -
AWS_SECRET_ACCESS_KEY Yes Your AWS secret access key for authentication -
READONLY No When set to "true", only read operations are allowed false

Read-Only Mode

Enable read-only mode by setting the READONLY environment variable to "true":

"env": {
  "AWS_REGION": "us-east-1",
  "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY>",
  "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_KEY>",
  "READONLY": "true"
}

In read-only mode:

  • Only READ operations (tools that retrieve or query information) are available
  • WRITE operations (tools that create, modify, or delete resources) are disabled

This is useful for scenarios where you want to allow log viewing but prevent any modifications to your CloudWatch Logs resources.

Available Tools

Log Group Operations

Tool Name Operation Type Description
create_log_group WRITE Creates a new Amazon CloudWatch Logs log group
describe_log_groups READ List and describe Amazon CloudWatch Logs log groups
delete_log_group WRITE Delete an Amazon CloudWatch Logs log group

Log Stream Operations

Tool Name Operation Type Description
create_log_stream WRITE Create a new log stream in a log group
describe_log_streams READ List and describe log streams in a log group
delete_log_stream WRITE Delete a log stream in a log group

Log Event Operations

Tool Name Operation Type Description
put_log_events WRITE Write log events to a specified log stream
get_log_events READ Retrieve log events from a specified log stream
filter_log_events READ Search log events with a pattern across log groups

For detailed documentation on each tool, including parameters and examples, see TOOLS.md.

Note: This project is under development. Additional CloudWatch Logs operations are planned for future releases.

Development

For information on developing and extending this project, please see CONTRIBUTING.md.

License

This project is licensed under the MIT License - see the LICENSE file for details.

相关推荐

  • 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.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • 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.

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

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

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

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

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

  • chongdashu
  • 使用模型上下文协议(MCP),启用Cursor,Windsurf和Claude Desktop等AI助手客户,以通过自然语言控制虚幻引擎。

  • wgpsec
  • 一款基于各大企业信息api的工具,解决在遇到的各种针对国内企业信息收集难题。一键收集控股公司icp 备案、 app 、小程序、微信公众号等信息聚合导出。支持 mcp接入

    Reviews

    5 (1)
    Avatar
    user_aiQCaYWr
    2025-04-17

    I've been using mcp-amazon-cloudwatch-logs by hyorimitsu and it's incredibly efficient for managing and analyzing Amazon CloudWatch logs. The integration is seamless and the interface is intuitive, making my logging tasks much simpler. Highly recommended for anyone needing streamlined log monitoring. Check it out at https://github.com/hyorimitsu/mcp-amazon-cloud-watch-logs.