Skip to main content
Glama
@incidentpilot/mcp-aws

@incidentpilot/mcp-aws

README.md
# @incidentpilot/mcp-aws

[![npm version](https://badge.fury.io/js/@incidentpilot%2Fmcp-aws.svg)](https://www.npmjs.com/package/@incidentpilot/mcp-aws)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Open-source MCP server for AWS infrastructure. Give Claude, ChatGPT, or any AI assistant secure access to your AWS resources for incident investigation and automated remediation.

**Your credentials stay local. Always.**

## Why This Exists

Traditional incident management tools require you to:
- Install agents in your AWS account
- Grant cross-account IAM access to third parties
- Trust closed-source code with your credentials

This MCP server runs **locally on your machine**. Your AWS credentials never leave your environment. The AI connects to your infrastructure through MCP, and you approve every action.

## Features

| Service | Read Operations | Write Operations (with approval) |
|---------|-----------------|----------------------------------|
| **EC2** | Describe instances, status checks | Start, stop, reboot |
| **RDS** | Describe databases, events | - |
| **Lambda** | Get function config, list functions | Invoke (with approval) |
| **S3** | List buckets, get bucket info | - |
| **EKS** | List/describe clusters, node groups | - |
| **IAM** | Get user/role details | - |
| **CloudWatch** | Query metrics, list alarms | - |
| **Auto Scaling** | Describe groups, activities | Scale up/down |
| **ELB** | Describe load balancers, targets | - |
| **SQS** | List queues, get attributes | Purge DLQ |
| **SNS** | List topics, subscriptions | - |
| **Route 53** | List hosted zones, records | - |

## Quick Start

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "aws": {
      "command": "npx",
      "args": ["-y", "@incidentpilot/mcp-aws@latest"],
      "env": {
        "AWS_PROFILE": "default"
      }
    }
  }
}
```

That's it. Restart Claude Desktop and ask: *"What EC2 instances are running in us-east-1?"*

### Claude Code

```bash
claude mcp add aws -- npx -y @incidentpilot/mcp-aws@latest
```

### Using AWS Profiles

```json
{
  "mcpServers": {
    "aws-prod": {
      "command": "npx",
      "args": ["-y", "@incidentpilot/mcp-aws@latest"],
      "env": {
        "AWS_PROFILE": "production",
        "AWS_REGION": "us-west-2"
      }
    },
    "aws-dev": {
      "command": "npx",
      "args": ["-y", "@incidentpilot/mcp-aws@latest"],
      "env": {
        "AWS_PROFILE": "development",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

## Environment Variables

| Variable | Description | Required |
|----------|-------------|----------|
| `AWS_PROFILE` | AWS CLI profile name | No (uses default) |
| `AWS_REGION` | Default region | No (defaults to us-east-1) |
| `AWS_ACCESS_KEY_ID` | Access key (if not using profile) | No |
| `AWS_SECRET_ACCESS_KEY` | Secret key (if not using profile) | No |

## Example Conversations

**Investigate an incident:**
> "My application is slow. Check CloudWatch metrics for the production ECS service and see if there are any alarms firing."

**Quick status check:**
> "List all EC2 instances in us-west-2 that aren't running"

**Remediation (with approval):**
> "Restart the api-server EC2 instance - it's not responding to health checks"
>
> *Claude will ask for confirmation before executing*

## IAM Permissions

Minimum permissions for read-only operations:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:Describe*",
        "rds:Describe*",
        "lambda:GetFunction",
        "lambda:ListFunctions",
        "s3:ListBuckets",
        "s3:GetBucket*",
        "eks:Describe*",
        "eks:List*",
        "iam:GetUser",
        "iam:GetRole",
        "cloudwatch:GetMetricData",
        "cloudwatch:DescribeAlarms",
        "autoscaling:Describe*",
        "elasticloadbalancing:Describe*",
        "sqs:ListQueues",
        "sqs:GetQueueAttributes",
        "sns:ListTopics",
        "sns:ListSubscriptions",
        "route53:ListHostedZones",
        "route53:ListResourceRecordSets"
      ],
      "Resource": "*"
    }
  ]
}
```

For write operations (remediation), add:

```json
{
  "Effect": "Allow",
  "Action": [
    "ec2:StartInstances",
    "ec2:StopInstances",
    "ec2:RebootInstances",
    "autoscaling:SetDesiredCapacity"
  ],
  "Resource": "*"
}
```

## Security

- **Local execution**: Your credentials never leave your machine
- **Human-in-the-loop**: All write operations require explicit approval
- **Audit logging**: Every operation is logged to stderr
- **Rate limiting**: Built-in protection against runaway requests
- **No telemetry**: We don't collect any usage data

## Available Tools

### Read-Only (always allowed)

- `aws_describe_instances` - List EC2 instances with filters
- `aws_get_instance_status` - Get EC2 health checks
- `aws_describe_rds_instances` - List RDS databases
- `aws_get_lambda_function` - Get Lambda configuration
- `aws_list_s3_buckets` - List S3 buckets
- `aws_get_s3_bucket_info` - Get bucket details
- `aws_list_eks_clusters` - List EKS clusters
- `aws_describe_eks_cluster` - Get cluster details
- `aws_get_cloudwatch_alarms` - List CloudWatch alarms
- `aws_get_cloudwatch_metrics` - Query metrics
- `aws_describe_auto_scaling_groups` - List ASG details

### Write Operations (require approval)

- `aws_stop_instance` - Stop EC2 instances
- `aws_start_instance` - Start EC2 instances
- `aws_reboot_instance` - Reboot EC2 instances
- `aws_scale_asg` - Scale Auto Scaling groups

## Development

```bash
# Clone the repo
git clone https://github.com/incidentpilot/mcp-aws.git
cd mcp-aws

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build for production
npm run build

# Run tests
npm test
```

## Contributing

Contributions welcome! Please read our [Contributing Guide](CONTRIBUTING.md) first.

## Related Projects

- [@incidentpilot/mcp-gcp](https://github.com/incidentpilot/mcp-gcp) - Google Cloud Platform
- [@incidentpilot/mcp-azure](https://github.com/incidentpilot/mcp-azure) - Microsoft Azure
- [@incidentpilot/mcp-kubernetes](https://github.com/incidentpilot/mcp-kubernetes) - Kubernetes clusters
- [@incidentpilot/mcp-docker](https://github.com/incidentpilot/mcp-docker) - Docker containers

## License

MIT - see [LICENSE](LICENSE)

## Support

- Issues: https://github.com/incidentpilot/mcp-aws/issues
- Docs: https://incidentpilot.ai/docs/mcp
- Discord: [Join our community](https://discord.gg/incidentpilot)

---

Built with love by [Incident Pilot](https://incidentpilot.ai) - AI Runbooks for Cloud Operations

TDQS

B3/5.0

Scored across 65 tools

Disambiguation4/5

Nearly every tool is scoped to a single AWS service prefix plus a distinct action, so an agent can reliably pick e.g. ecs_list_clusters vs eks_list_clusters vs rds_list_clusters. The only real overlaps are the generic cloudwatch_get_metrics versus service-specific metric tools (sqs_get_queue_metrics, s3_get_bucket_metrics), where an agent may not know which to reach for.

Naming Consistency4/5

The dominant pattern is service_verb_noun (ec2_list_instances, iam_get_role_details, autoscaling_set_desired_capacity), applied consistently across ~60 tools. Minor deviations: singular names for multi-instance actions (ec2_start_instance, ec2_reboot_instance), the redundant vpc_list_vpcs, and the customer_* group which mixes noun-first (customer_info) with verb-first (customer_initialize, customer_switch, customer_clear).

Tool Count2/5

65 tools is well past the point where an agent can hold the surface in context, and many are narrow list/get pairs per service. While AWS is a genuinely large domain, the set could be consolidated (e.g. generic list/get with a resource-type parameter, or a single metrics tool) rather than one tool per resource kind.

Completeness3/5

Read coverage is broad across compute, networking, storage, and IAM, and write operations are consistently approval-gated, which fits an incident-response server. However, the surface is almost entirely read-only with no update/delete paths for most services, and critically for an incident tool there is no CloudWatch Logs or Lambda log access, and no per-resource metrics for EC2/ECS beyond the generic metric call.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues