AWS S3 MCP server

Provides secure, pre-signed URL-based access to AWS S3 bucket operations with configurable expiration times for simplified cloud storage interactions.
Back to servers
Setup instructions
Provider
OpenWorkspace-o1
Release date
Mar 09, 2025
Language
TypeScript
Stats
2 stars

The AWS S3 MCP Server offers a Model Context Protocol server for AWS S3 operations, allowing secure access to S3 buckets through pre-signed URLs. This server simplifies interaction with S3 storage while maintaining proper access controls.

Installation

You can run the AWS S3 MCP Server using either Docker or NPX.

Prerequisites

Before installation, ensure you have:

  • An AWS account with an S3 bucket
  • AWS credentials (access key and secret key)
  • Docker installed (for Docker method) or Node.js/NPM (for NPX method)

Environment Variables

The server requires these environment variables:

  • BUCKET_NAME: Name of your S3 bucket (required)
  • REGION: AWS region (default: "ap-southeast-1")
  • AWS_ACCESS_KEY_ID: Your AWS access key
  • AWS_SECRET_ACCESS_KEY: Your AWS secret key

Setup with Claude Desktop

To use this MCP server with Claude Desktop, add one of the following configurations to your claude_desktop_config.json:

Docker Method

{
  "mcpServers": {
    "aws-ow-s3-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BUCKET_NAME",
        "-e",
        "REGION",
        "-e",
        "AWS_ACCESS_KEY_ID",
        "-e",
        "AWS_SECRET_ACCESS_KEY",
        "mcp/aws-ow-s3-mcp"
      ],
      "env": {
        "BUCKET_NAME": "<YOUR_BUCKET_NAME>",
        "REGION": "<AWS_REGION>",
        "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_KEY>"
      }
    }
  }
}

NPX Method

{
  "mcpServers": {
    "aws-ow-s3-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-aws-ow-s3-mcp"
      ],
      "env": {
        "BUCKET_NAME": "<YOUR_BUCKET_NAME>",
        "REGION": "<AWS_REGION>",
        "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_KEY>"
      }
    }
  }
}

Using the MCP Server

The AWS S3 MCP Server provides the following tools for S3 operations:

List Objects

Lists objects in your S3 bucket.

Input parameters:

  • prefix (string, optional): Filter objects by prefix

Example usage:

// List all objects
const result = await model.invokeTools({"list_objects": {}});

// List objects with a specific prefix
const filteredResult = await model.invokeTools({
  "list_objects": {"prefix": "documents/"}
});

Get Object

Generates a pre-signed URL for accessing an S3 object.

Input parameters:

  • key (string, required): Object key to retrieve
  • expiry (number, optional): URL expiration time in seconds (default: 3600)

Example usage:

const result = await model.invokeTools({
  "get_object": {
    "key": "documents/report.pdf",
    "expiry": 7200  // 2 hours
  }
});
// result.object_url contains the pre-signed URL

Put Object

Generates a pre-signed URL for uploading an object to S3.

Input parameters:

  • key (string, required): Object key for the upload
  • expiry (number, optional): URL expiration time in seconds (default: 3600)

Example usage:

const result = await model.invokeTools({
  "put_object": {
    "key": "uploads/new-file.txt",
    "expiry": 1800  // 30 minutes
  }
});
// result.upload_url contains the pre-signed URL for uploading

Delete Object

Deletes an object from the S3 bucket.

Input parameters:

  • key (string, required): Object key to delete

Example usage:

const result = await model.invokeTools({
  "delete_object": {
    "key": "temporary/old-file.txt"
  }
});
// result.success indicates if deletion was successful

Docker Build

If you need to build the Docker image yourself:

docker build -t mcp/aws-ow-s3-mcp-server .

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "aws-ow-s3-mcp" '{"command":"npx","args":["-y","@modelcontextprotocol/server-aws-ow-s3-mcp"],"env":{"BUCKET_NAME":"<YOUR_BUCKET_NAME>","REGION":"<AWS_REGION>","AWS_ACCESS_KEY_ID":"<YOUR_ACCESS_KEY>","AWS_SECRET_ACCESS_KEY":"<YOUR_SECRET_KEY>"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There 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.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "aws-ow-s3-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-aws-ow-s3-mcp"
            ],
            "env": {
                "BUCKET_NAME": "<YOUR_BUCKET_NAME>",
                "REGION": "<AWS_REGION>",
                "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY>",
                "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_KEY>"
            }
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "aws-ow-s3-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-aws-ow-s3-mcp"
            ],
            "env": {
                "BUCKET_NAME": "<YOUR_BUCKET_NAME>",
                "REGION": "<AWS_REGION>",
                "AWS_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY>",
                "AWS_SECRET_ACCESS_KEY": "<YOUR_SECRET_KEY>"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later