CloudWatch Logs MCP サーバー
AWS CloudWatch ログにアクセスするためのツールを提供する MCP(Model Context Protocol)サーバー。このサーバーにより、AI アシスタントはロググループを一覧表示し、AWS CloudWatch からログエントリを読み取ることができます。
利用可能なツール
リストグループ
利用可能な CloudWatch ロググループを一覧表示します。
パラメータ:
prefix
(オプション):ロググループ名のプレフィックスregion
(オプション): AWS リージョンaccessKeyId
(オプション): AWS アクセスキー IDsecretAccessKey
(オプション): AWS シークレットアクセスキーsessionToken
(オプション): AWSセッショントークン
戻り値: logGroupName
、 creationTime
、 storedBytes
を含むログ グループのリストを含む JSON 文字列。
ログを取得する
特定のロググループから CloudWatch ログを取得します。
パラメータ:
logGroupName
(必須): ロググループの名前logStreamName
(オプション): ログストリームの名前startTime
(オプション): ISO 形式または相対時間での開始時刻 (例: "5m"、"1h"、"1d")endTime
(オプション): ISO 形式の終了時刻filterPattern
(オプション): ログのフィルターパターンregion
(オプション): AWS リージョンaccessKeyId
(オプション): AWS アクセスキー IDsecretAccessKey
(オプション): AWS シークレットアクセスキーsessionToken
(オプション): AWSセッショントークン
戻り値: timestamp
、 message
、 logStreamName
を含むログ イベントを含む JSON 文字列。
設定
AWS 認証情報
AWS 認証情報が設定されていることを確認してください。AWS CLI を使用するか、環境変数を設定することで設定できます。
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
Claude Desktopでの使用
claude_desktop_config.json
に以下を追加します。
ドッカー
Docker コンテナ内でサーバーを実行する場合は、Dockerfile をセットアップして次の構成を使用できます。
実装の詳細
このサーバーは、MCPサーバーを簡単に作成できるMCP SDKのFastMCPクラスを使用して構築されています。このサーバーは、主に2つのツールを公開しています。
list_groups
: 利用可能な CloudWatch ロググループを一覧表示しますget_logs
: 特定のロググループからログエントリを読み取ります
各ツールは@mcp.tool()
で修飾された非同期関数として実装されています。サーバーはboto3ライブラリを使用してAWS CloudWatch Logs APIとやり取りします。
ライセンス
マサチューセッツ工科大学
This server cannot be installed
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 サーバー。
Related MCP Servers
- AsecurityFlicenseAqualityA 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 -3264TypeScript
- AsecurityAlicenseAqualityAn MCP server that lets AI assistants interact with your Lunchmoney data, enabling natural language queries about transactions, budgets, and spending patterns.Last updated -438TypeScriptMIT License
- AsecurityAlicenseAqualityMCP-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 -132217TypeScriptMIT License
- -securityAlicense-qualityA 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 -57PythonMIT License