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.
You can run the AWS S3 MCP Server using either Docker or NPX.
Before installation, ensure you have:
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 keyAWS_SECRET_ACCESS_KEY
: Your AWS secret keyTo use this MCP server with Claude Desktop, add one of the following configurations to your claude_desktop_config.json
:
{
"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>"
}
}
}
}
{
"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>"
}
}
}
}
The AWS S3 MCP Server provides the following tools for S3 operations:
Lists objects in your S3 bucket.
Input parameters:
prefix
(string, optional): Filter objects by prefixExample 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/"}
});
Generates a pre-signed URL for accessing an S3 object.
Input parameters:
key
(string, required): Object key to retrieveexpiry
(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
Generates a pre-signed URL for uploading an object to S3.
Input parameters:
key
(string, required): Object key for the uploadexpiry
(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
Deletes an object from the S3 bucket.
Input parameters:
key
(string, required): Object key to deleteExample usage:
const result = await model.invokeTools({
"delete_object": {
"key": "temporary/old-file.txt"
}
});
// result.success indicates if deletion was successful
If you need to build the Docker image yourself:
docker build -t mcp/aws-ow-s3-mcp-server .
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.
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.
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>"
}
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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