@translated/aws-cloudwatch-mcp
v1.0.5
Published
MCP server that helps you debug applications by searching for logs on AWS CloudWatch.
Downloads
16
Keywords
Readme
AWS Cloudwatch MCP
MCP server that helps you debug applications by searching for logs on AWS CloudWatch.
🛠 Available Tools
Inputs:
search_string(string): The string to search forenv(string): Environment name, one of 'staging', 'sandbox', or 'production'start_time(optional string): Start time for the searchend_time(optional string): End time for the search
Returns: An array of log events that match the search string
🚀 Getting Started
📋 Requirements
- AWS credentials:
- region
- accessKeyId
- secretAccessKey
- An LLM client that supports Model Context Protocol (MCP), such as Cursor
- NPX installed (comes with Node.js)
Installation & Configuration
Step 1: Open your client's MCP configuration JSON file with a text editor, then copy and paste the following snippet:
{
"mcpServers": {
"aws-cloudwatch-mcp": {
"command": "npx",
"args": ["-y", "@translated/aws-cloudwatch-mcp@latest"],
"env": {
"PRODUCTION_AWS_REGION":"<PRODUCTION_REGION>",
"PRODUCTION_AWS_ACCESS_KEY_ID":"<PRODUCTION_ACCESS_KEY_ID>",
"PRODUCTION_AWS_SECRET_ACCESS_KEY":"<PRODUCTION_ACCESS_KEY_SECRET>",
"PRODUCTION_CLOUDWATCH_LOG_GROUP_NAME":"<PRODUCTION_CLOUDWATCH_LOG_GROUP_NAME>",
"SANDBOX_AWS_REGION":"<SANDBOX_REGION>",
"SANDBOX_AWS_ACCESS_KEY_ID":"<SANDBOX_ACCESS_KEY_ID>",
"SANDBOX_AWS_SECRET_ACCESS_KEY":"<SANDBOX_ACCESS_KEY_SECRET>",
"SANDBOX_CLOUDWATCH_LOG_GROUP_NAME":"<SANDBOX_CLOUDWATCH_LOG_GROUP_NAME>",
"STAGING_AWS_REGION":"<STAGING_REGION>",
"STAGING_AWS_ACCESS_KEY_ID":"<STAGING_ACCESS_KEY_ID>",
"STAGING_AWS_SECRET_ACCESS_KEY":"<STAGING_ACCESS_KEY_SECRET>",
"STAGING_CLOUDWATCH_LOG_GROUP_NAME":"<STAGING_CLOUDWATCH_LOG_GROUP_NAME>"
}
}
}
}Step 2: Replace the placeholder values with your actual AWS credentials and CloudWatch log group names. If you use only one environment, you can remove the other two environments from the configuration.
Step 3: Restart your MCP client.
Verify Installation
After restarting your MCP client, you should see the MCP server in the list of available MCPs.
The method for viewing installed MCPs varies by client. Please consult your MCP client's documentation.
To verify MCP is working correctly, try translating with a simple prompt:
Search for "error" in production logsYour MCP client will begin generating a response. If MCP server is properly installed and configured, your client will either request approval for the action or display a notification that is being used.
Use case: TOS API
🧾 Transaction ID
Each API call in the system generates a unique transaction_id, which is included as a prefix in all logs related to that specific call. This allows for easy grouping and retrieval of the entire execution trace for a request, from initial input to final response.
By using the transaction_id, the MCP server can:
- Collect all related log entries across various components.
- Reconstruct the full execution flow in chronological order.
- Identify errors, warnings, and key operations associated with the call.
This identifier is essential for debugging, as it ensures full visibility into everything that happened during a single request lifecycle.
📚 Cursor rule
For a deeper understanding of how to debug using the transaction_id, refer to the cursor rule defined in the TOS API repository.
This rule outlines a clear and effective approach to follow when a transaction_id is available, including:
- How to trace the full lifecycle of a request.
- How to interpret different log levels.
- Best practices for identifying and isolating issues.
🎬 MCP in action

