home / mcp / aws s3 mcp server

AWS S3 MCP Server

Provides MCP endpoints to manage AWS S3 buckets, objects, and policies from a single server.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "gangadharrr-aws-s3-mcp": {
      "command": "npx",
      "args": [
        "aws-s3"
      ],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_ACCESS_KEY_ID": "your-access-key-id",
        "AWS_SECRET_ACCESS_KEY": "your-secret-access-key"
      }
    }
  }
}

This MCP server provides a unified interface to manage AWS S3 resources from a single, programmatic point. You can list and manage buckets, upload and download objects, and get or set bucket policies through clear, explicit endpoints that integrate with your existing MCP workflows.

How to use

You interact with the AWS S3 MCP Server through an MCP client by calling the available operations. Use it to list all buckets, create or delete buckets (bucket must be empty to delete), list objects within a bucket (optionally filtered by prefix), upload and download objects, and inspect or update bucket policies. Each operation is exposed as a dedicated tool you can invoke from your MCP client, with parameters tailored to the action you want to perform.

How to install

Prerequisites: you need Node.js and npm installed on your machine.

1. Create a configuration file for the MCP server with your AWS credentials and default region.

2. Save the configuration snippet below to a file named mcp_config.json.

3. Run your MCP orchestration tool that loads the MCP configuration. If you are starting the stdio server directly in a development environment, you can invoke the provided CLI as shown.

4. Ensure your AWS credentials are available in the environment or through the provided configuration so the MCP server can authenticate with AWS.

5. Use your MCP client to call the tools described in the available endpoints to manage buckets, objects, or policies.

Configuration and usage details

{
  "mcpServers": {
    "aws-s3": {
      "command": "npx",
      "args": ["aws-s3"],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_ACCESS_KEY_ID": "your-access-key-id",
        "AWS_SECRET_ACCESS_KEY": "your-secret-access-key"
      },
      "autoApprove": ["list_buckets", "list_objects", "get_bucket_policy"]
    }
  }
}

Additional notes

The server uses the AWS SDK and relies on credentials provided in environment variables or shared credentials. Remember to provide your AWS credentials securely, and prefer environment variables or IAM roles when running in AWS environments.

Available tools

list_buckets

Lists all S3 buckets in the AWS account.

create_bucket

Creates a new S3 bucket with a given name and optional region.

delete_bucket

Deletes an empty S3 bucket specified by name.

list_objects

Lists objects in a bucket with optional prefix and pagination controls.

upload_object

Uploads a file or content to a bucket at a specified key.

download_object

Downloads an object from a bucket, with optional local output or inline content.

delete_object

Deletes an object from a bucket by key.

get_bucket_policy

Retrieves the policy attached to a bucket.

set_bucket_policy

Sets or updates the policy for a bucket.