@plugix/mcp-aws
v0.1.0
Published
MCP Server for AWS - EC2, Cost Management, Resource Optimization
Maintainers
Readme
@plugix/mcp-aws
MCP server for AWS infrastructure management and cost optimization.
Features
- get_ec2_instances - List EC2 instances with filters
- get_cost_report - AWS cost analysis by service
- get_idle_resources - Find wasteful resources (EBS, EIPs)
- stop_instances - Stop EC2 instances (with confirmation)
- delete_volumes - Delete unused EBS volumes (with confirmation)
Installation
npm install @plugix/mcp-awsOr run directly:
npx @plugix/mcp-awsConfiguration
Set environment variables:
# Plugix API connection
API_URL=wss://api.plugix.ai
API_TOKEN=plx_live_your_token_here
# AWS credentials
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=us-east-1Or use IAM roles (recommended for EC2/ECS):
API_URL=wss://api.plugix.ai
API_TOKEN=plx_live_your_token_here
AWS_REGION=us-east-1
# No access keys needed - uses instance roleUsage
Development
npm run devProduction
npm run build
npm startDocker (ECS/Fargate)
docker build -t plugix-mcp-aws .
docker run --env-file .env plugix-mcp-awsClaude Desktop Integration
Add to claude_desktop_config.json:
{
"mcpServers": {
"aws": {
"command": "npx",
"args": ["@plugix/mcp-aws"],
"env": {
"API_URL": "wss://api.plugix.ai",
"API_TOKEN": "plx_live_your_token",
"AWS_REGION": "us-east-1"
}
}
}
}Tools Reference
get_ec2_instances
List EC2 instances with optional filters.
Parameters:
| Name | Type | Description | |------|------|-------------| | state | string | Filter: running, stopped, pending, terminated | | instanceType | string | Filter by type (t3.micro, m5.large, etc.) | | tagName | string | Filter by Name tag (partial match) |
Example:
{
"name": "get_ec2_instances",
"arguments": {
"state": "running",
"tagName": "production"
}
}get_cost_report
Get AWS cost breakdown for a date range.
Parameters:
| Name | Type | Required | Description | |------|------|----------|-------------| | startDate | string | Yes | YYYY-MM-DD | | endDate | string | Yes | YYYY-MM-DD | | granularity | string | No | DAILY or MONTHLY |
Example:
{
"name": "get_cost_report",
"arguments": {
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"granularity": "DAILY"
}
}get_idle_resources
Find resources that could be deleted to save costs.
Checks:
- Stopped EC2 instances (EBS charges continue)
- Unattached EBS volumes
- Unassociated Elastic IPs
Parameters: None
stop_instances
Stop one or more EC2 instances. Requires confirmation.
Parameters:
| Name | Type | Required | Description |
|------|------|----------|-------------|
| instanceIds | array | Yes | List of instance IDs |
| confirmed | boolean | Yes | Must be true to stop |
Example:
{
"name": "stop_instances",
"arguments": {
"instanceIds": ["i-1234567890abcdef0"],
"confirmed": true
}
}delete_volumes
Delete unattached EBS volumes. HIGH RISK - requires confirmation.
Parameters:
| Name | Type | Required | Description |
|------|------|----------|-------------|
| volumeIds | array | Yes | List of volume IDs |
| confirmed | boolean | Yes | Must be true to delete |
IAM Permissions
Minimum required IAM policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeVolumes",
"ec2:DescribeAddresses",
"ec2:StopInstances",
"ec2:DeleteVolume"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ce:GetCostAndUsage"
],
"Resource": "*"
}
]
}For read-only access, remove StopInstances and DeleteVolume.
Testing
npm testLicense
MIT
