npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tocharianou/cloudwatch-mcp

v1.0.1

Published

AWS CloudWatch MCP Server – Logs Insights queries, log stream events, alarm status, and metric statistics for security investigations

Readme

cloudwatch-mcp

AWS CloudWatch MCP Server for security investigations – Logs Insights queries, log stream events, alarm status, and metric statistics.

Tools

| Tool | Description | |------|-------------| | query_logs | Run CloudWatch Logs Insights query against one or more log groups | | get_log_events | Retrieve raw events from a specific log stream | | list_log_groups | List available log groups (with prefix filter) | | list_log_streams | List streams in a log group, sorted by last event time | | describe_alarms | List CloudWatch alarms and their current state | | get_metric_statistics | Retrieve time-series metric statistics |

Configuration

All configuration is via environment variables:

| Variable | Required | Description | |----------|----------|-------------| | AWS_ACCESS_KEY_ID | Yes | IAM Access Key ID | | AWS_SECRET_ACCESS_KEY | Yes | IAM Secret Access Key | | AWS_DEFAULT_REGION | Yes | Target region (e.g. us-east-1) | | AWS_SESSION_TOKEN | No | Temporary credentials (AssumeRole / SSO) | | AWS_TIMEOUT | No | Request timeout ms (default: 30000) | | MAX_TOKEN_CALL | No | Token limit per response (default: 20000) |

IAM Minimum Permissions

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "logs:StartQuery",
        "logs:GetQueryResults",
        "logs:GetLogEvents",
        "logs:DescribeLogGroups",
        "logs:DescribeLogStreams",
        "cloudwatch:DescribeAlarms",
        "cloudwatch:GetMetricStatistics"
      ],
      "Resource": "*"
    }
  ]
}

Usage

Stdio (default)

AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=yyy AWS_DEFAULT_REGION=us-east-1 node dist/index.js

HTTP mode

MCP_TRANSPORT=http MCP_HTTP_PORT=3001 AWS_ACCESS_KEY_ID=xxx ... node dist/index.js

Security Investigation Examples

Query VPC Flow Logs for rejected traffic:

query_logs(
  logGroupNames: ["/aws/vpc/flowlogs"],
  queryString: "fields @timestamp, srcAddr, dstAddr, dstPort, action | filter action = 'REJECT' | sort @timestamp desc | limit 50",
  startTime: "1 hour ago"
)

Get Lambda errors:

query_logs(
  logGroupNames: ["/aws/lambda/my-function"],
  queryString: "fields @timestamp, @message | filter @message like /ERROR/ | limit 20"
)

Check active alarms:

describe_alarms(stateValue: "ALARM")

EC2 CPU spike during incident:

get_metric_statistics(
  namespace: "AWS/EC2",
  metricName: "CPUUtilization",
  dimensions: [{name: "InstanceId", value: "i-1234567890abcdef0"}],
  startTime: "2 hours ago",
  statistics: ["Maximum", "Average"]
)

License

Apache 2.0 – Copyright (c) 2024 TocharianOU Contributors