home / mcp / aws resources mcp server

AWS Resources MCP Server

A Python-based MCP server that lets Claude run boto3 code to query and manage AWS resources. Execute powerful AWS operations directly through Claude with proper sandboxing and containerization. No need for complex setups - just pass your AWS credentials and start interacting with all AWS services.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "baryhuang-mcp-server-aws-resources-python": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "AWS_ACCESS_KEY_ID=your_access_key_id_here",
        "-e",
        "AWS_SECRET_ACCESS_KEY=your_secret_access_key_here",
        "-e",
        "AWS_DEFAULT_REGION=us-east-1",
        "buryhuang/mcp-server-aws-resources:latest"
      ],
      "env": {
        "AWS_ACCESS_KEY_ID": "your_access_key_id_here",
        "AWS_SESSION_TOKEN": "<AWS_SESSION_TOKEN>",
        "AWS_DEFAULT_REGION": "us-east-1",
        "AWS_SECRET_ACCESS_KEY": "your_secret_access_key_here"
      }
    }
  }
}

This MCP server provides running generated Python code to query and manage AWS resources via boto3. It is designed to be run inside a Docker container, offering a sandboxed, Python-based environment that you can control with your AWS credentials and chosen permissions. This makes it practical to perform ad-hoc queries, automation tasks, and quick inspections of AWS resources from an MCP client.

How to use

You interact with the server through an MCP client that sends Python code snippets. The server runs the code in a restricted environment and returns the results as JSON. Your AWS permissions determine what operations you can perform, so ensure your credentials grant only the access you intend.

Typical workflows include starting the server with your AWS credentials, then writing small Python snippets that create a boto3 client, run queries, and return a result variable that gets serialized to JSON.

How to install

Prerequisites: you need Docker installed on your machine. You can also use a package manager or a local runtime if you prefer, but the most common path is running the server in a Docker container.

Install and run using Docker with your AWS credentials. Use the following command as a starting point:

docker run \
  -i \
  --rm \
  -e AWS_ACCESS_KEY_ID=your_access_key_id_here \
  -e AWS_SECRET_ACCESS_KEY=your_secret_access_key_here \
  -e AWS_DEFAULT_REGION=your_AWS_DEFAULT_REGION \
  buryhuang/mcp-server-aws-resources:latest

If you prefer using a stored AWS profile, mount your credentials file and specify the profile name in the environment, for example with Docker Compose or a docker run invocation that includes the AWS_PROFILE variable and a local credentials directory.

Additional notes

The server supports a dedicated tool for executing AWS queries through Python code snippets. You can provide a code snippet that imports boto3 and other allowed libraries, and you must set a result variable containing the output. The server handles the execution safely and serializes AWS objects and datetimes into JSON.

Available tools

aws_resources_query_or_modify

Tool for executing Python code snippets using boto3 to query or modify AWS resources. The code must set a variable named result with the output.