Skip to main content
Glama

CloudWatch Logs MCP Server

by serkanh

CloudWatch Logs MCP サーバー

AWS CloudWatch ログにアクセスするためのツールを提供する MCP(Model Context Protocol)サーバー。このサーバーにより、AI アシスタントはロググループを一覧表示し、AWS CloudWatch からログエントリを読み取ることができます。

利用可能なツール

リストグループ

利用可能な CloudWatch ロググループを一覧表示します。

パラメータ:

  • prefix (オプション):ロググループ名のプレフィックス
  • region (オプション): AWS リージョン
  • accessKeyId (オプション): AWS アクセスキー ID
  • secretAccessKey (オプション): AWS シークレットアクセスキー
  • sessionToken (オプション): AWSセッショントークン

戻り値: logGroupNamecreationTimestoredBytesを含むログ グループのリストを含む JSON 文字列。

ログを取得する

特定のロググループから CloudWatch ログを取得します。

パラメータ:

  • logGroupName (必須): ロググループの名前
  • logStreamName (オプション): ログストリームの名前
  • startTime (オプション): ISO 形式または相対時間での開始時刻 (例: "5m"、"1h"、"1d")
  • endTime (オプション): ISO 形式の終了時刻
  • filterPattern (オプション): ログのフィルターパターン
  • region (オプション): AWS リージョン
  • accessKeyId (オプション): AWS アクセスキー ID
  • secretAccessKey (オプション): AWS シークレットアクセスキー
  • sessionToken (オプション): AWSセッショントークン

戻り値: timestampmessagelogStreamNameを含むログ イベントを含む JSON 文字列。

設定

AWS 認証情報

AWS 認証情報が設定されていることを確認してください。AWS CLI を使用するか、環境変数を設定することで設定できます。

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Claude Desktopでの使用

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 コンテナ内でサーバーを実行する場合は、Dockerfile をセットアップして次の構成を使用できます。

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

実装の詳細

このサーバーは、MCPサーバーを簡単に作成できるMCP SDKのFastMCPクラスを使用して構築されています。このサーバーは、主に2つのツールを公開しています。

  1. list_groups : 利用可能な CloudWatch ロググループを一覧表示します
  2. get_logs : 特定のロググループからログエントリを読み取ります

各ツールは@mcp.tool()で修飾された非同期関数として実装されています。サーバーはboto3ライブラリを使用してAWS CloudWatch Logs APIとやり取りします。

ライセンス

マサチューセッツ工科大学

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

ロググループを一覧表示し、ログエントリを読み取ることで、AI アシスタントが AWS CloudWatch ログにアクセスできるようにする MCP サーバー。

  1. 利用可能なツール
    1. リストグループ
    2. ログを取得する
  2. 設定
    1. AWS 認証情報
    2. Claude Desktopでの使用
    3. ドッカー
  3. 実装の詳細
    1. ライセンス

      Related MCP Servers

      • Amazon Web Services
        aws-mcp

        A
        security
        F
        license
        A
        quality
        A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your AWS environment. This allows for natural language querying and management of your AWS resources during conversations. Think of better Amazon Q alternative.
        Last updated -
        3
        264
        TypeScript
        • Apple
      • A
        security
        A
        license
        A
        quality
        An MCP server that lets AI assistants interact with your Lunchmoney data, enabling natural language queries about transactions, budgets, and spending patterns.
        Last updated -
        4
        3
        8
        TypeScript
        MIT License
      • A
        security
        A
        license
        A
        quality
        MCP-compatible server that enables AI assistants to interact with Lightdash analytics data, providing tools to list and retrieve projects, spaces, charts, dashboards, and metrics through a standardized interface.
        Last updated -
        13
        22
        17
        TypeScript
        MIT License
      • -
        security
        A
        license
        -
        quality
        A lightweight service that enables AI assistants to execute AWS CLI commands through the Model Context Protocol (MCP), allowing AI tools to retrieve AWS documentation and interact with AWS services.
        Last updated -
        57
        Python
        MIT License
        • Apple

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/serkanh/cloudwatch-logs-mcp'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server