MCP server for Amazon S3 bucket operations
## AWS S3 MCP Server: Object Storage Management The **AWS S3 MCP Server** integrates Amazon S3 into Google Antigravity, enabling object storage operations including file uploads, downloads, bucket management, and presigned URL generation directly from your development environment. ### Why AWS S3 MCP? - **Unlimited Storage**: Store and retrieve any amount of data with 99.999999999% durability - **Cost-Effective**: Pay only for what you use with multiple storage tiers - **Global Access**: Serve content globally with CloudFront integration - **Security Built-In**: Encryption at rest and in transit with fine-grained access control - **Versioning**: Track object versions for recovery and audit trails ### Key Features #### 1. Object Operations ```python # Upload a file await mcp.upload_file( bucket="my-bucket", key="uploads/document.pdf", file_path="./document.pdf", content_type="application/pdf" ) # Download a file await mcp.download_file( bucket="my-bucket", key="uploads/document.pdf", destination="./downloads/document.pdf" ) # Upload with metadata await mcp.put_object( bucket="my-bucket", key="data/config.json", body=json.dumps(config), metadata={"version": "1.0", "environment": "prod"} ) ``` #### 2. Bucket Management ```python # List buckets buckets = await mcp.list_buckets() for bucket in buckets: print(f"Bucket: {bucket['name']} created {bucket['creation_date']}") # Create bucket with configuration await mcp.create_bucket( bucket="my-new-bucket", region="us-west-2", versioning=True ) # List objects with prefix objects = await mcp.list_objects( bucket="my-bucket", prefix="uploads/", max_keys=100 ) ``` #### 3. Presigned URLs ```python # Generate upload URL upload_url = await mcp.generate_presigned_url( bucket="my-bucket", key="uploads/user-file.jpg", operation="put_object", expires_in=3600, content_type="image/jpeg" ) # Generate download URL download_url = await mcp.generate_presigned_url( bucket="my-bucket", key="documents/report.pdf", operation="get_object", expires_in=86400 ) ``` #### 4. Multipart Uploads ```python # Upload large file with multipart await mcp.multipart_upload( bucket="my-bucket", key="backups/database.sql.gz", file_path="./backup.sql.gz", part_size=100 * 1024 * 1024 # 100MB parts ) ``` ### Configuration ```json { "mcpServers": { "s3": { "command": "npx", "args": ["-y", "@anthropic/mcp-s3"], "env": { "AWS_ACCESS_KEY_ID": "your-access-key", "AWS_SECRET_ACCESS_KEY": "your-secret-key", "AWS_REGION": "us-east-1", "S3_DEFAULT_BUCKET": "my-default-bucket" } } } } ``` ### Use Cases **Static Asset Hosting**: Store and serve images, CSS, JavaScript, and other static assets for web applications. **Backup Storage**: Automate backups of databases, configurations, and application data with versioning. **Data Lake**: Store raw and processed data for analytics pipelines with lifecycle policies. **Media Management**: Upload, process, and distribute media files with presigned URLs for secure access. The AWS S3 MCP enables comprehensive object storage management within your development environment.
{
"mcpServers": {
"s3": {
"mcpServers": {
"s3": {
"env": {
"AWS_REGION": "us-east-1",
"AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY",
"AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_KEY"
},
"args": [
"-y",
"@openworkspace/aws-s3-mcp"
],
"command": "npx"
}
}
}
}
}