AWS API

AWS API

Comprehensive AWS API support with command validation and access to all services.

10K+

2 Tools

Packaged by
Requires Secrets
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

Use cases

Execute AWS CLI commands with validation and proper error handling. This is the PRIMARY tool to use when you are confident about the exact AWS CLI command needed to fulfill a user's request. Always prefer this tool over 'suggest_aws_commands' when you have a specific command in mind. Key points: - The command MUST start with "aws" and follow AWS CLI syntax - Commands are executed in us-east-1 region by default - For cross-region or account-wide operations, explicitly include --region parameter - All commands are validated before execution to prevent errors - Supports pagination control via max_results parameter - Commands can only reference files within the working directory (/tmp/aws-api-mcp/workdir); use forward slashes (/) regardless of the system (e.g. if working directory is 'c:/tmp/workdir', use 'c:/tmp/workdir/subdir/file.txt' or 'subdir/file.txt'); relative paths resolve from the working directory. - You can use `--region *` to run a command on all regions enabled in the account. - Do not generate explicit batch calls for iterating over all regions, use `--region *` instead. Single Command Mode: - You can run a single AWS CLI command using this tool. - Example: call_aws(cli_command="aws s3api list-buckets --region us-east-1") Batch Running: - The tool can also run multiple independent commands at the same time. - Call this tool with multiple CLI commands whenever possible. - Batch calling is especially useful where you need to run a command multiple times with different parameter values - Example: call_aws( cli_command=[ "aws s3api get-bucket-website --bucket bucket1", "aws s3api get-bucket-website --bucket bucket2" ] ) - You can call at most 20 CLI commands in batch mode. Best practices for command generation: - Always use the most specific service and operation names - Always use the working directory when writing files, unless user explicitly mentioned another directory - Include --region when operating across regions - Only use filters (--filters, --query, --prefix, --pattern, etc) when necessary or user explicitly asked for it - Always use the tool in batch mode whenever it's possible. Command restrictions: - DO NOT use bash/zsh pipes (|) or any shell operators - DO NOT use bash/zsh tools like grep, awk, sed, etc. - DO NOT use shell redirection operators (>, >>, <) - DO NOT use command substitution ($()) - DO NOT use shell variables or environment variables Common pitfalls to avoid: 1. Missing required parameters - always include all required parameters 2. Incorrect parameter values - ensure values match expected format 3. Missing --region when operating across regions Returns: CLI execution results with API response data or error message

Suggest AWS CLI commands based on a natural language query. This is a FALLBACK tool to use when you are uncertain about the exact AWS CLI command needed to fulfill a user's request. IMPORTANT: Only use this tool when: 1. You are unsure about the exact AWS service or operation to use 2. The user's request is ambiguous or lacks specific details 3. You need to explore multiple possible approaches to solve a task 4. You want to provide options to the user for different ways to accomplish their goal DO NOT use this tool when: 1. You are confident about the exact AWS CLI command needed - use 'call_aws' instead 2. The user's request is clear and specific about the AWS service and operation 3. You already know the exact parameters and syntax needed 4. The task requires immediate execution of a known command Best practices for query formulation: 1. Include the user's primary goal or intent 2. Specify any relevant AWS services if mentioned 3. Include important parameters or conditions mentioned 4. Add context about the environment or constraints 5. Mention any specific requirements or preferences CRITICAL: Query Granularity - Each query should be granular enough to be accomplished by a single CLI command - If the user's request requires multiple commands to complete, break it down into individual tasks - Call this tool separately for each specific task to get the most relevant suggestions - Example of breaking down a complex request: User request: "Set up a new EC2 instance with a security group and attach it to an EBS volume" Break down into: 1. "Create a new security group with inbound rules for SSH and HTTP" 2. "Create a new EBS volume with 100GB size" 3. "Launch an EC2 instance with t2.micro instance type" 4. "Attach the EBS volume to the EC2 instance" Query examples: 1. "List all running EC2 instances in us-east-1 region" 2. "Get the size of my S3 bucket named 'my-backup-bucket'" 3. "List all IAM users who have AdministratorAccess policy" 4. "List all Lambda functions in my account" 5. "Create a new S3 bucket with versioning enabled and server-side encryption" 6. "Update the memory allocation of my Lambda function 'data-processor' to 1024MB" 7. "Add a new security group rule to allow inbound traffic on port 443" 8. "Tag all EC2 instances in the 'production' environment with 'Environment=prod'" 9. "Configure CloudWatch alarms for high CPU utilization on my RDS instance" Returns: A list of up to 10 most likely AWS CLI commands that could accomplish the task, including: - The CLI command - Confidence score for the suggestion - Required parameters - Description of what the command does

About

AWS API MCP Server

Comprehensive AWS API support with command validation and access to all services.

What is an MCP Server?

MCP Info

Image Building Info

AttributeDetails
Dockerfilehttps://github.com/awslabs/mcp/blob/636aca8e109b5559006044f035bb89c16e9e5410/src/aws-api-mcp-server/Dockerfile
Commit636aca8e109b5559006044f035bb89c16e9e5410
Docker Image built byDocker Inc.
Docker Scout Health ScoreDocker Scout Health Score
Verify SignatureCOSIGN_REPOSITORY=mcp/signatures cosign verify mcp/aws-api-mcp-server --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
LicenceApache License 2.0

Available Tools (2)

Tools provided by this ServerShort Description
call_awsExecute AWS CLI commands
suggest_aws_commandsSuggest AWS CLI commands

Tools Details

Tool: call_aws

Execute AWS CLI commands with validation and proper error handling. This is the PRIMARY tool to use when you are confident about the exact AWS CLI command needed to fulfill a user's request. Always prefer this tool over 'suggest_aws_commands' when you have a specific command in mind. Key points: - The command MUST start with "aws" and follow AWS CLI syntax - Commands are executed in us-east-1 region by default - For cross-region or account-wide operations, explicitly include --region parameter - All commands are validated before execution to prevent errors - Supports pagination control via max_results parameter - Commands can only reference files within the working directory (/tmp/aws-api-mcp/workdir); use forward slashes (/) regardless of the system (e.g. if working directory is 'c:/tmp/workdir', use 'c:/tmp/workdir/subdir/file.txt' or 'subdir/file.txt'); relative paths resolve from the working directory. - You can use --region * to run a command on all regions enabled in the account. - Do not generate explicit batch calls for iterating over all regions, use --region * instead.

Single Command Mode:
- You can run a single AWS CLI command using this tool.
- Example:
    call_aws(cli_command="aws s3api list-buckets --region us-east-1")

Batch Running:
- The tool can also run multiple independent commands at the same time.
- Call this tool with multiple CLI commands whenever possible.
- Batch calling is especially useful where you need to run a command multiple times with different parameter values
- Example:
    call_aws(
        cli_command=[
            "aws s3api get-bucket-website --bucket bucket1",
            "aws s3api get-bucket-website --bucket bucket2"
        ]
    )
- You can call at most 20 CLI commands in batch mode.

Best practices for command generation:
- Always use the most specific service and operation names
- Always use the working directory when writing files, unless user explicitly mentioned another directory
- Include --region when operating across regions
- Only use filters (--filters, --query, --prefix, --pattern, etc) when necessary or user explicitly asked for it
- Always use the tool in batch mode whenever it's possible.

Command restrictions:
- DO NOT use bash/zsh pipes (|) or any shell operators
- DO NOT use bash/zsh tools like grep, awk, sed, etc.
- DO NOT use shell redirection operators (>, >>, <)
- DO NOT use command substitution ($())
- DO NOT use shell variables or environment variables

Common pitfalls to avoid:
1. Missing required parameters - always include all required parameters
2. Incorrect parameter values - ensure values match expected format
3. Missing --region when operating across regions

Returns:
    CLI execution results with API response data or error message
ParametersTypeDescription
cli_commandstringA single command or a list of complete AWS CLI commands to execute
max_resultsstringoptionalOptional limit for number of results (useful for pagination)

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: suggest_aws_commands

Suggest AWS CLI commands based on a natural language query. This is a FALLBACK tool to use when you are uncertain about the exact AWS CLI command needed to fulfill a user's request.

IMPORTANT: Only use this tool when:
1. You are unsure about the exact AWS service or operation to use
2. The user's request is ambiguous or lacks specific details
3. You need to explore multiple possible approaches to solve a task
4. You want to provide options to the user for different ways to accomplish their goal

DO NOT use this tool when:
1. You are confident about the exact AWS CLI command needed - use 'call_aws' instead
2. The user's request is clear and specific about the AWS service and operation
3. You already know the exact parameters and syntax needed
4. The task requires immediate execution of a known command

Best practices for query formulation:
1. Include the user's primary goal or intent
2. Specify any relevant AWS services if mentioned
3. Include important parameters or conditions mentioned
4. Add context about the environment or constraints
5. Mention any specific requirements or preferences

CRITICAL: Query Granularity
- Each query should be granular enough to be accomplished by a single CLI command
- If the user's request requires multiple commands to complete, break it down into individual tasks
- Call this tool separately for each specific task to get the most relevant suggestions
- Example of breaking down a complex request:
  User request: "Set up a new EC2 instance with a security group and attach it to an EBS volume"
  Break down into:
  1. "Create a new security group with inbound rules for SSH and HTTP"
  2. "Create a new EBS volume with 100GB size"
  3. "Launch an EC2 instance with t2.micro instance type"
  4. "Attach the EBS volume to the EC2 instance"

Query examples:
1. "List all running EC2 instances in us-east-1 region"
2. "Get the size of my S3 bucket named 'my-backup-bucket'"
3. "List all IAM users who have AdministratorAccess policy"
4. "List all Lambda functions in my account"
5. "Create a new S3 bucket with versioning enabled and server-side encryption"
6. "Update the memory allocation of my Lambda function 'data-processor' to 1024MB"
7. "Add a new security group rule to allow inbound traffic on port 443"
8. "Tag all EC2 instances in the 'production' environment with 'Environment=prod'"
9. "Configure CloudWatch alarms for high CPU utilization on my RDS instance"

Returns:
    A list of up to 10 most likely AWS CLI commands that could accomplish the task, including:
    - The CLI command
    - Confidence score for the suggestion
    - Required parameters
    - Description of what the command does
ParametersTypeDescription
querystringA natural language description of what you want to do in AWS. Should be detailed enough to capture the user's intent and any relevant context.

This tool is read-only. It does not modify its environment.


Use this MCP Server

{
  "mcpServers": {
    "aws-api": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "AWS_REGION",
        "-e",
        "AWS_API_MCP_PROFILE_NAME",
        "-e",
        "AWS_ACCESS_KEY_ID",
        "-e",
        "AWS_SECRET_ACCESS_KEY",
        "-e",
        "AWS_SESSION_TOKEN",
        "mcp/aws-api-mcp-server"
      ],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_API_MCP_PROFILE_NAME": "default",
        "AWS_ACCESS_KEY_ID": "AKIAIOSFODNN7EXAMPLE",
        "AWS_SECRET_ACCESS_KEY": "your-aws-secret-access-key",
        "AWS_SESSION_TOKEN": "your-aws-session-token"
      }
    }
  }
}

Why is it safer to run MCP Servers with Docker?

Related servers