S3 Uploader MCP Server
This server lets you upload files to an AWS S3 bucket via MCP.
Upload a single file to S3 by providing its absolute
filePath.Optionally specify an S3 object
key; otherwise the filename is used.Automatic MIME type detection based on file extension, defaulting to
application/octet-streamfor unknown types.Requires AWS credentials and bucket configuration via environment variables.
Provides error handling for missing env vars, missing files, invalid paths, AWS/S3 failures, and network issues.
Can be integrated with Claude Desktop as an MCP server for file upload tasks.
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., "@S3 Uploader MCP ServerUpload the file /data/report.pdf to S3"
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.
S3 Uploader MCP Server
A Model Context Protocol (MCP) server that provides file upload functionality to AWS S3 buckets with automatic MIME type detection.
Features
Upload files to S3 buckets
Automatic MIME type detection based on file extensions
Support for common file types (images, documents, audio, video, archives)
Configurable S3 object keys
Comprehensive error handling
Related MCP server: MCP S3 File Uploader
Setup
Prerequisites
Node.js (version 14 or higher)
AWS credentials with S3 access
An S3 bucket
Installation
Clone or download this repository
Install dependencies:
npm install
Configuration
Set the following environment variables:
export AWS_ACCESS_KEY_ID="your-access-key-id"
export AWS_SECRET_ACCESS_KEY="your-secret-access-key"
export AWS_REGION="your-aws-region"
export BUCKET_NAME="your-s3-bucket-name"Usage
As an MCP Server
Start the server:
node index.jsThe server exposes one tool:
upload_files
Upload a file to the configured S3 bucket.
Annotations:
Title: "Upload File to S3"
Read-only: false (modifies environment by uploading files)
Destructive: false (additive operation, doesn't remove existing data)
Idempotent: false (uploading same file again may overwrite or create new version)
Open-world: true (interacts with external AWS S3 service)
Parameters:
filePath(required): Absolute path to the file to uploadkey(optional): S3 object key. If not provided, uses the filename
Example:
{
"name": "upload_files",
"arguments": {
"filePath": "/path/to/your/file.jpg",
"key": "uploads/my-image.jpg"
}
}Supported MIME Types
The server automatically detects MIME types for the following file extensions:
Images: jpg, jpeg, png, gif, webp, bmp, ico, svg, tiff
Documents: pdf, doc, docx, xls, xlsx, ppt, pptx, rtf
Text: txt, csv, html, css, js, json, xml, md
Audio: mp3, wav, ogg, m4a, flac
Video: mp4, avi, mov, wmv, flv, webm, mkv
Archives: zip, rar, tar, gz, 7z
Other: bin, exe, dmg (treated as binary)
Unknown file types default to application/octet-stream.
Integration with Claude Desktop
To use this MCP server with Claude Desktop, add it to your claude_desktop_config.json:
{
"mcpServers": {
"s3-uploader": {
"command": "node",
"args": ["/path/to/s3-mcp-server/index.js"],
"env": {
"AWS_ACCESS_KEY_ID": "your-access-key-id",
"AWS_SECRET_ACCESS_KEY": "your-secret-access-key",
"AWS_REGION": "your-aws-region",
"BUCKET_NAME": "your-s3-bucket-name"
}
}
}
}Error Handling
The server provides detailed error messages for common issues:
Missing environment variables
File not found
Invalid file paths
AWS/S3 errors
Network connectivity issues
Security Considerations
Store AWS credentials securely (use environment variables, not hardcoded values)
Ensure the S3 bucket has appropriate permissions
Consider using IAM roles instead of access keys in production
Validate file types and sizes before upload if needed
Development
To test the server locally:
# Test tools listing
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node index.js
# Test file upload (replace with actual file path)
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "upload_files", "arguments": {"filePath": "/path/to/test/file.txt"}}}' | node index.jsAvailable Tools
1 toolupload_fileA
Upload a file to S3 bucket. The file will be uploaded with automatic MIME type detection based on file extension. Requires AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, and BUCKET_NAME environment variables to be set.
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Optional S3 object key. If not provided, will use the filename | |
| filePath | Yes | Absolute path to the file to upload |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description discloses automatic MIME type detection and environment variable requirements. However, it does not cover other important behavioral aspects such as whether existing objects are overwritten or what error behavior might be expected.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two clear, front-loaded sentences with no redundant information. Every sentence contributes meaningful content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple upload tool, covering the main action, prerequisites, and a behavioral detail. Could be improved with mention of return values or error handling, but the absence of an output schema makes the current level acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already covers both parameters with descriptions. The description adds no additional parameter semantics beyond what the schema provides, making the baseline score appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it uploads a file to an S3 bucket with a specific verb and resource. No ambiguity about the action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides prerequisite context (required environment variables) but does not discuss when to use this tool versus alternatives or any exclusions. Since there are no sibling tools, the lack of alternatives is understandable but not fully addressed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
upload_file
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion. The upload_file tool clearly defines its purpose and input.
The single tool name 'upload_file' follows a clear verb_noun pattern, consistent with common conventions.
The server provides only one tool, which is borderline thin but appropriate for a narrowly-scoped uploader service.
For an S3 uploader, the upload_file tool covers the essential operation thoroughly, with no obvious missing functionality within the stated scope.
Maintenance
Related MCP Connectors
Browse, upload, download, and share files in your S3-compatible buckets with delegated roles.
Capture photos remotely from mobile devices via S3-backed upload URLs
Encode uploads to web-ready media: video to HLS, audio to AAC, images to WebP. Async jobs.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides secure access to AWS S3 buckets through pre-signed URLs, enabling listing, downloading, uploading, and deleting objects.2-
- AlicenseNot gradedqualityDmaintenanceEnables secure file uploads to Amazon S3 with progress tracking and presigned URL generation. Provides automatic UUID-based file naming and time-limited access URLs for uploaded files.MIT
- AlicenseAqualityDmaintenanceEnables interaction with S3-compatible storage services like AWS S3 and Cloudflare R2, supporting bucket management, object listing, reading, uploading, and deletion operations.5240 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.6 npm2MIT