An AWS Labs Model Context Protocol (MCP) server for cloudwatch-logs
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
AWS Labs cloudwatch-logs MCP Server (DEPRECATED)
An AWS Labs Model Context Protocol (MCP) server for cloudwatch-logs. (DEPRECATED). Please use CloudWatch MCP Server for unified CloudWatch Telemetry related tools.
Instructions
Use this MCP server to run read-only commands and analyze CloudWatchLogs. Supports discovering logs groups as well as running CloudWatch Log Insight Queries. With CloudWatch Logs Insights, you can interactively search and analyze your log data in Amazon CloudWatch Logs and perform queries to help you more efficiently and effectively respond to operational issues.
Features
- Discovering log groups and metadata about them within your AWS account or accounts connected by CloudWatch Cross Account Observability
- Converting human-readable questions and commands into CloudWatch Log Insight queries and executing them against the discovered log groups.
Prerequisites
- Install
uvfrom Astral or the GitHub README - Install Python using
uv python install 3.10 - An AWS account with CloudWatch Log Groups
- This MCP server can only be run locally on the same host as your LLM client.
- Set up AWS credentials with access to AWS services
- You need an AWS account with appropriate permissions
- Configure AWS credentials with
aws configureor environment variables
Available Tools
describe_log_groups- Describe log groups in the account and region, including user saved queries applicable to them. Supports Cross Account Observability.analyze_log_group- Analyzes a CloudWatch log group for anomalies, top message patterns, and top error patterns within a specified time window. Log group must have at least one CloudWatch Log Anomaly Detector configured to search for anomalies.execute_log_insights_query- Execute a Log Insights query against one or more log groups. Will wait for the query to complete for a configurable timeout.get_query_results- Get the results of a query previously started byexecute_log_insights_query.cancel_query- Cancel an ongoing query that was previously started byexecute_log_insights_query.
Required IAM Permissions
logs:Describe*logs:Get*logs:List*logs:StartQuerylogs:StopQuery
Installation
(DEPRECATED). Please use CloudWatch MCP Server for unified CloudWatch Telemetry related tools.
Example for Amazon Q Developer CLI (~/.aws/amazonq/mcp.json):
{
"mcpServers": {
"awslabs.cloudwatch-logs-mcp-server": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"command": "uvx",
"args": [
"awslabs.cloudwatch-logs-mcp-server@latest"
],
"env": {
"AWS_PROFILE": "[The AWS Profile Name to use for AWS access]",
"AWS_REGION": "[The AWS region to run in]",
"FASTMCP_LOG_LEVEL": "ERROR"
},
"transportType": "stdio"
}
}
}
Build and install docker image locally on the same host of your LLM client
git clone https://github.com/awslabs/mcp.git- Go to sub-directory 'src/cloudwatch-logs-mcp-server/'
- Run 'docker build -t awslabs/cloudwatch-logs-mcp-server:latest .'
Add or update your LLM client's config with following:
{
"mcpServers": {
"awslabs.cloudwatch-logs-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "AWS_PROFILE=[your data]",
"-e", "AWS_REGION=[your data]",
"awslabs/cloudwatch-logs-mcp-server:latest"
]
}
}
}
Contributing
Contributions are welcome! Please see the CONTRIBUTING.md in the monorepo root for guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file awslabs_cloudwatch_logs_mcp_server-0.0.3.tar.gz.
File metadata
- Download URL: awslabs_cloudwatch_logs_mcp_server-0.0.3.tar.gz
- Upload date:
- Size: 80.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e49fb6892ea47932d8b529a51ff56f5258fad7292e9400aa0c53c78423e2097
|
|
| MD5 |
f77b4dc3162dc97320e644312dc1dbda
|
|
| BLAKE2b-256 |
964078b18f60941e808a9a7fe7a8cd6ebc4837e21ab462aa03472e89434caa23
|
Provenance
The following attestation bundles were made for awslabs_cloudwatch_logs_mcp_server-0.0.3.tar.gz:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_cloudwatch_logs_mcp_server-0.0.3.tar.gz -
Subject digest:
4e49fb6892ea47932d8b529a51ff56f5258fad7292e9400aa0c53c78423e2097 - Sigstore transparency entry: 262377771
- Sigstore integration time:
-
Permalink:
awslabs/mcp@aa67735222dc976fbfad0899e238f65b1f8d0da9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa67735222dc976fbfad0899e238f65b1f8d0da9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file awslabs_cloudwatch_logs_mcp_server-0.0.3-py3-none-any.whl.
File metadata
- Download URL: awslabs_cloudwatch_logs_mcp_server-0.0.3-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4830dca87a0fe39257f41367f378fdbf0c67ae94944bc4192fd847716dc59ec1
|
|
| MD5 |
7a4c85c9ec83324c7107903b51da258f
|
|
| BLAKE2b-256 |
077d7c3aaa9eb05a8eb5d85a667e715b1790dc68128215c18986aa76992b2458
|
Provenance
The following attestation bundles were made for awslabs_cloudwatch_logs_mcp_server-0.0.3-py3-none-any.whl:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_cloudwatch_logs_mcp_server-0.0.3-py3-none-any.whl -
Subject digest:
4830dca87a0fe39257f41367f378fdbf0c67ae94944bc4192fd847716dc59ec1 - Sigstore transparency entry: 262377776
- Sigstore integration time:
-
Permalink:
awslabs/mcp@aa67735222dc976fbfad0899e238f65b1f8d0da9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa67735222dc976fbfad0899e238f65b1f8d0da9 -
Trigger Event:
workflow_dispatch
-
Statement type: