The AWS Model Context Protocol (MCP) Server enables AI assistants to execute AWS CLI commands through a secure interface. This lightweight service bridges AI tools like Claude Desktop with AWS resources, allowing assistants to retrieve AWS documentation and run AWS commands with proper formatting and security controls.
# Pull the official image
docker pull ghcr.io/alexei-led/aws-mcp-server:latest
# Or run with docker-compose
docker compose -f deploy/docker/docker-compose.yml up -d
The Docker image supports both AMD64/x86_64 and ARM64 architectures automatically.
# Clone repository
git clone https://github.com/alexei-led/aws-mcp-server.git
cd aws-mcp-server
# Set up virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
# Run the server
python -m aws_mcp_server
Configure the server using these environment variables:
Variable | Description | Default |
---|---|---|
AWS_MCP_TIMEOUT |
Command execution timeout (seconds) | 300 |
AWS_MCP_MAX_OUTPUT |
Maximum output size (characters) | 100000 |
AWS_MCP_TRANSPORT |
Transport protocol ("stdio" or "sse") | stdio |
AWS_PROFILE |
AWS profile to use | default |
AWS_REGION |
AWS region to use | us-east-1 |
AWS_MCP_SECURITY_MODE |
Security mode ("strict" or "permissive") | strict |
Locate the Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Edit the configuration file:
{
"mcpServers": {
"aws-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/Users/YOUR_USER_NAME/.aws:/home/appuser/.aws:ro",
"ghcr.io/alexei-led/aws-mcp-server:latest"
]
}
}
}
Restart Claude Desktop to apply the changes
Running in a Docker container is strongly recommended as it provides:
strict
(default) or permissive
User: What are the available options for the AWS S3 cp command?
Claude: Let me get that information for you.
The AWS S3 cp command has the following options:
NAME
cp - Copies a local file or S3 object to another location locally or in S3.
SYNOPSIS
cp <LocalPath> <S3Uri> or <S3Uri> <LocalPath> or <S3Uri> <S3Uri> [--acl <value>] [--cache-control <value>] ...
User: List my S3 buckets
Claude: I'll list your S3 buckets for you.
2023-10-15 14:30:45 my-bucket-1
2023-11-20 09:15:32 my-bucket-2
2024-01-05 11:22:18 my-backup-bucket
User: List my S3 buckets that have "backup" in their name and show them in alphabetical order
Claude: Let me find that for you.
2024-01-05 11:22:18 my-backup-bucket
2024-03-01 09:44:12 weekly-backup-bucket
2024-03-15 13:10:57 database-backup-bucket
AWS_MCP_TIMEOUT
environment variableThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.