AWS S3 MCP Server
Provides tools for interacting with Amazon S3 buckets and objects, including listing, scanning, reading, uploading, downloading, copying, moving, multi-bucket writes, backups, snapshots, versioning configuration, access point support, and account-wide bucket discovery.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AWS S3 MCP Serverscan my-bucket for JSON files modified this week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AWS S3 MCP Server (Model Context Protocol)
A production-grade, plug-and-play Model Context Protocol (MCP) server built with Python, the official MCP Python SDK, and AWS SDK (boto3).
It empowers AI assistants (such as Claude Code, Claude Desktop, Cursor, and Antigravity) to explore, scan, inspect, upload, replicate, move, snapshot, and back up data across any Amazon S3 bucket with enterprise-grade reliability.
Key Highlights
First-Run Guided Onboarding: AI assistants proactively guide users on first launch (
check_onboarding_status,configure_s3_connection) to connect their AWS credentials and buckets without manual file editing. Also includes interactivepython setup.pyCLI wizard.Plug-and-Play Bucket Support: Works out of the box with standard S3 buckets (
my-bucket), bucket ARNs (arn:aws:s3:::my-bucket), S3 Access Point ARNs, or Access Point Aliases.Dynamic Multi-Bucket Support: Seamlessly switch buckets on the fly by passing
bucket="other-bucket"in any tool call, or configure a default target in.env.Multi-Bucket Simultaneous Ingestion: Write or broadcast data to multiple S3 buckets simultaneously (
write_to_multiple_buckets) for multi-region replication and backup distribution.Cross-Bucket Data Transfer (Move & Copy): Transfer data between buckets server-side on AWS without consuming local client bandwidth (
copy_s3_object,move_s3_object).Snapshots & Point-in-Time Backups:
create_s3_backup: Creates point-in-time timestamped snapshots of entire buckets or folder prefixes into a backup bucket.create_object_snapshot: Creates timestamped object-level snapshots instantly.configure_bucket_versioning: Configures native AWS S3 versioning protection.
Account-Wide Bucket Scanner & Feasibility Audit:
scan_all_bucketsdiscovers all account buckets, checking accessibility, AWS regions, versioning status, and multi-bucket operation feasibility.Universal Object Scanner: Scan and filter any object type (JSON, CSV, Parquet, PDF, images, logs, text, binaries) by extension, size range, date range, or regex pattern via
scan_s3_objects.Content Inspection & Preview: Directly read and preview text, code, logs, CSV tables, and JSON data with built-in line/byte pagination (
read_s3_file), preventing prompt bloat and token exhaustion.Hierarchical Directory Navigation: Delimiter-based folder exploration (
list_s3_folders) for deep directory tree traversal.Safe File Downloads: Stream any object to local disk with atomic temp files and overwrite protection (
download_s3_file).Zero Credential Leakage: Secrets and tokens are never printed or logged. Stderr-only logging keeps the stdio JSON-RPC stream clean.
Related MCP server: AWS S3 MCP Server
Architecture Overview
+-----------------------------------------------------------------------------------+
| AI Assistant / MCP Client (Claude Code, Claude Desktop, Cursor, Antigravity) |
+-----------------------------------------------------------------------------------+
|
(JSON-RPC via stdio)
v
+-----------------------------------------------------------------------------------+
| AWS S3 MCP Server (server.py) |
| - Multi-Bucket & Access Point Resolver (dynamic override or .env default) |
| - Multi-Bucket Broadcast Ingestion (parallel/multi-target put) |
| - Server-Side Cross-Bucket Copy & Move (zero local bandwidth) |
| - Automated Point-in-Time Snapshots & Backup Engine |
| - Universal Object Scanner (extensions, size, regex, timestamps) |
| - Safe Content Reader (line/byte pagination, CSV & JSON parsing) |
| - Memory-safe streaming downloader with atomic replace |
| - Stderr-only logging (preserves pristine JSON-RPC transport) |
+-----------------------------------------------------------------------------------+
|
(AWS SigV4 HTTPS / TLS)
v
+-----------------------------------------------------------------------------------+
| Amazon S3 |
| - Primary Buckets (e.g. s3://prod-data-lake) |
| - Backup / Disaster Recovery Buckets (e.g. s3://dr-backup-vault) |
| - S3 Access Points (arn:aws:s3:<region>:<account>:accesspoint/<name> / alias) |
| - Objects: Data (CSV/JSON/Parquet), Docs (PDF), Code, Media, Logs, Binaries |
+-----------------------------------------------------------------------------------+Complete MCP Tools Reference
1. First-Run Onboarding & Account Connection
Tool Name | Parameters | Description |
| None | First-run check: Inspects |
|
| Automated setup tool: Allows Claude to configure or update |
2. Ingestion & Multi-Bucket Operations
Tool Name | Parameters | Description |
|
| Writes string, JSON, CSV, code, or logs directly to an S3 object. |
|
| Uploads a local file from disk to S3. Auto-detects filename and MIME type. |
|
| Broadcasts data to multiple S3 buckets simultaneously. Accepts a list or comma-separated string of bucket names. |
2. Cross-Bucket Transfer, Snapshots & Backups
Tool Name | Parameters | Description |
|
| Copies an object between buckets using AWS server-side copy (zero local bandwidth). |
|
| Moves an object between buckets (server-side copy + atomic source deletion). |
|
| Point-in-time snapshot backup: Copies bucket/prefix objects into a timestamped snapshot structure in the backup bucket. |
|
| Creates an instant timestamped copy snapshot of a specific S3 object. |
|
| Enables or suspends AWS native bucket object versioning. |
3. Account-Wide & Bucket Discovery
Tool Name | Parameters | Description |
| None | Lists all S3 buckets in the AWS account with creation dates and default target. |
|
| Account-level feasibility audit: Scans all buckets, checking read accessibility, AWS regions, versioning status, and object count estimates. |
|
| Validates AWS credentials, inspects STS caller identity, and runs a read canary. |
4. Inspection, Scanning & Downloads
Tool Name | Parameters | Description |
|
| Lists object keys with size, human-readable size, last modified, category, and storage class. |
|
| Hierarchical folder navigation using delimiter ( |
|
| Substring search across object keys and filenames. |
|
| Multi-criteria scanner: Filter any bucket by extensions (e.g. |
|
| Read & preview file content: Text/code/logs with line pagination; JSON preview; CSV tabular preview; binary detection. |
|
| Retrieves HTTP headers and S3 metadata ( |
|
| Computes inventory metrics: total object count, total bytes, storage class breakdown, and extension distribution. |
|
| Streams object to local disk with atomic temporary files, progress safety, and overwrite guard. |
|
| Convenience alias for |
Quickstart & Setup Guide
1. Clone Repository & Setup Environment
On Windows (PowerShell):
# Clone the repository
git clone https://github.com/jnvsainikhil/s3-mcp.git
cd s3-mcp
# Create Python virtual environment
python -m venv .venv
# Activate virtual environment
.\.venv\Scripts\Activate.ps1
# Upgrade pip and install dependencies
pip install --upgrade pip
pip install -r requirements.txtOn Linux / macOS:
# Clone the repository
git clone https://github.com/jnvsainikhil/s3-mcp.git
cd s3-mcp
# Create Python virtual environment
python3 -m venv .venv
# Activate virtual environment
source .venv/bin/activate
# Upgrade pip and install dependencies
pip install --upgrade pip
pip install -r requirements.txt2. Configure AWS Credentials
Copy the template configuration file:
cp .env.example .envOpen .env and configure your credentials:
AWS_REGION=us-east-1
# Optional default bucket (multi-bucket mode works even without this!)
S3_BUCKET=my-primary-bucket
# If using AWS CLI profiles or SSO (Recommended):
# AWS_PROFILE=default
# If using direct keys:
# AWS_ACCESS_KEY_ID=AKIAEXAMPLEKEY
# AWS_SECRET_ACCESS_KEY=exampleSecretKey1233. Verify Setup with Diagnostics
Run the diagnostic tool to test your environment:
# Windows
.\.venv\Scripts\python.exe diagnose_s3.py
# Linux / macOS
python diagnose_s3.py4. Run Unit Tests
Execute the automated test suite (21 offline unit tests with mocks):
# Windows
.\.venv\Scripts\python.exe -m pytest -v
# Linux / macOS
pytest -vClient Integration Guides
Claude Code
Claude Code supports project-scoped MCP configurations via .mcp.json:
# Register project-scoped MCP server:
claude mcp add --scope project s3-mcp -- python server.pyOr copy .mcp.json.example to .mcp.json:
{
"mcpServers": {
"s3-mcp": {
"type": "stdio",
"command": "python",
"args": [
"server.py"
],
"env": {}
}
}
}Verify with:
claude mcp list
claude mcp get s3-mcpClaude Desktop
Add the server to your claude_desktop_config.json:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"s3-mcp": {
"command": "python",
"args": [
"/path/to/s3-mcp/server.py"
],
"env": {
"AWS_REGION": "us-east-1",
"S3_BUCKET": "my-s3-bucket",
"AWS_PROFILE": "default"
}
}
}
}Cursor / Antigravity IDE
Add to your MCP server configuration:
{
"name": "s3-mcp",
"command": "python",
"args": ["server.py"]
}Practical Usage Examples
1. Ingest Data into Multiple Buckets at Once
# Broadcast config or telemetry to primary and secondary buckets:
write_to_multiple_buckets(
key="config/global-settings.json",
content='{"version": "2.4", "replication": true}',
buckets=["prod-us-east-1", "backup-us-west-2", "dr-eu-central-1"]
)2. Move or Migrate Data Between Buckets
# Move processed dataset from incoming to warehouse:
move_s3_object(
source_bucket="raw-data-landing",
source_key="2026/05/transactions.parquet",
destination_bucket="analytics-warehouse",
destination_key="gold/transactions.parquet"
)3. Create a Point-in-Time Snapshot Backup
# Snapshot entire folder prefix into a backup bucket:
create_s3_backup(
source_bucket="analytics-warehouse",
backup_bucket="long-term-archives",
prefix="gold/",
timestamp_snapshot=True
)4. Audit All Account Buckets for Feasibility
# Scan all buckets, check permissions, regions, and versioning:
scan_all_buckets(include_details=True)5. Multi-Criteria Scanning for Datasets
# Scan for Parquet and CSV files larger than 1MB:
scan_s3_objects(
bucket="analytics-warehouse",
prefix="datasets/",
extensions=[".parquet", ".csv"],
min_size_bytes=1048576
)AWS IAM Security Policies
Production-ready least-privilege IAM and bucket policies are included in the aws/ directory:
aws/iam-bucket-policy.json: Least-privilege IAM policy covering reading, uploading, cross-bucket copying/moving, and versioning/backups.aws/iam-policy.json: Least-privilege IAM policy for S3 Access Point usage.aws/access-point-policy.json: Access Point policy restricting access to specific principals.aws/bucket-policy.json: Bucket policy delegating access exclusively through the S3 Access Point.
Security & Privacy Guarantee
Zero Secret Exposure: AWS credentials, access keys, and session tokens are strictly excluded from logging and output payloads.
No Inbound Open Ports: Communicates exclusively over standard I/O (
stdio).Memory Safety: Streaming downloads and uploads are chunked and temporary files are used for atomic consistency.
Troubleshooting
Issue | Cause | Solution |
| IAM lacks | Attach |
| IAM lacks | Check IAM permissions on both source and destination buckets. |
| Bucket does not exist or region mismatch | Ensure |
| Boto3 cannot discover credentials | Run |
Claude shows | Project server requires approval | In Claude Code, run |
License
This project is licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Browse, upload, download, and share files in your S3-compatible buckets with delegated roles.
Browse, upload, download, copy, move and share files in your own S3-compatible buckets.
Manage, check, investigate and automate server, database and storage backups from your AI assistant.
Search and SQL on object storage: full-text, vector and hybrid search plus SQL over your data.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables interaction with S3-compatible storage services like AWS S3 and Cloudflare R2, supporting bucket management, object listing, reading, uploading, and deletion operations.58 npmISC
- AlicenseNot gradedqualityDmaintenanceEnables interaction with AWS S3 storage through bucket operations (create, delete, list), object management (upload, download, delete, list), and bucket policy configuration using AWS credentials.4 npm2MIT
- AlicenseAqualityDmaintenanceEnables browsing S3 buckets and objects, and generating secure presigned URLs for downloads and uploads, through natural language commands in MCP clients like Claude Desktop.33 npm4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query S3 data lakes using natural language, with support for CSV, JSON, Parquet and tools for data discovery, analysis, and metadata exploration.1MIT