Execute AWS CLI commands in a secure containerized environment
AWS CLI MCP Server provides a secure bridge between AI assistants and AWS infrastructure management. It enables AI tools like Claude and Cursor to execute AWS CLI commands in a containerized environment through the Model Context Protocol (MCP). With comprehensive security validation and configurable protection levels, it allows for safe cloud infrastructure management while preventing potentially dangerous operations.
AWS CLI MCP Server enables AI assistants to execute AWS CLI commands securely through the Model Context Protocol (MCP). This integration allows AI tools like Claude and Cursor to help you manage AWS infrastructure by running commands in a safe, containerized environment.
The simplest way to run AWS CLI MCP Server is using Docker:
docker run -p 8080:8080 \
-e AWS_ACCESS_KEY_ID=your_access_key \
-e AWS_SECRET_ACCESS_KEY=your_secret_key \
-e AWS_SESSION_TOKEN=your_session_token \
-e AWS_REGION=us-west-2 \
ghcr.io/alexei-led/aws-mcp-server:latest
For a more streamlined experience, you can use Smithery:
pip install smithery
smithery run alexei-led/aws-mcp-server
AWS CLI MCP Server supports various configuration options through environment variables:
AWS_ACCESS_KEY_ID
: Your AWS access keyAWS_SECRET_ACCESS_KEY
: Your AWS secret keyAWS_SESSION_TOKEN
: Your AWS session token (if using temporary credentials)AWS_REGION
: Default AWS region (e.g., us-west-2)The server implements a comprehensive security system with three configurable modes:
AWS_MCP_SECURITY_MODE
: Set to one of:
strict
(default): Blocks all potentially dangerous commandsmoderate
: Allows more commands but still blocks high-risk operationspermissive
: Minimal restrictions, use with cautioncustom
: Use a custom security configuration fileAWS_MCP_SECURITY_CONFIG
: Path to a custom security configuration YAML file (when using custom
mode)
AWS_MCP_SERVER_HOST
: Host address (default: 0.0.0.0)AWS_MCP_SERVER_PORT
: Port number (default: 8080)AWS_MCP_LOG_LEVEL
: Logging level (default: INFO)To use AWS CLI MCP Server with Claude, add the following to your prompt:
I'd like to use the AWS CLI to manage my AWS resources. Please use the AWS CLI MCP Server to execute commands.
To configure Cursor to use AWS CLI MCP Server, add the following to your MCP configuration:
"mcpServers": {
"aws-cli": {
"url": "http://localhost:8080"
}
}
Use the strictest security mode possible for your use case. The default strict
mode is recommended for most users.
Create dedicated IAM credentials with minimal permissions for the server to use.
Run in a private network or behind a secure proxy if possible.
Review the logs regularly to monitor command execution.
Consider using AWS Organizations SCPs as an additional layer of protection.
For more detailed information, refer to the GitHub repository.