s3-mcp
Provides tools for interacting with Cloudflare R2 S3-compatible storage, enabling bucket listing, object listing, metadata inspection, capped object reads, and optional object upload/delete via configuration.
Provides tools for interacting with MinIO S3-compatible storage, enabling bucket listing, object listing, metadata inspection, capped object reads, and optional object upload/delete via configuration.
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-mcp list the objects in the prod-logs bucket"
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-mcp
Minimal Model Context Protocol server for S3-compatible storage — AWS S3, RustFS, MinIO, Cloudflare R2, and similar.
Path-style addressing by default (required for many self-hosted endpoints whose TLS cert does not cover
bucket.endpointsubdomains)Opt-in self-signed / custom-CA TLS trust, scoped to the S3 client only
Read-only by default; writes require an explicit flag
Optional bucket allow-list
Env vars + CLI flag overrides; secrets stay env-only
Tools
Tool | Access | Description |
| read | List buckets |
| read | List objects ( |
| read | Size, ETag, content-type, user metadata |
| read | Read body via a capped |
| write | Upload text or base64 content |
| write | Delete object (idempotent: missing key → success) |
Write tools refuse with a clear error unless S3_ALLOW_WRITE=true (or --allow-write).
Related MCP server: S3 MCP Server
Install / run
npx (recommended)
{
"mcpServers": {
"s3": {
"command": "npx",
"args": ["-y", "s3-mcp"],
"env": {
"S3_ENDPOINT": "https://rustfs.example.com",
"S3_ACCESS_KEY_ID": "<key>",
"S3_SECRET_ACCESS_KEY": "<secret>",
"S3_REGION": "us-east-1",
"S3_ALLOW_SELF_SIGNED": "true"
}
}
}
}A bare --stdio arg is accepted and ignored (drop-in compatible with configs written for s3-mcp-server).
npx straight from GitHub
{
"mcpServers": {
"s3": {
"command": "npx",
"args": ["-y", "github:tompetk/s3-mcp"],
"env": {
"S3_ENDPOINT": "https://rustfs.example.com",
"S3_ACCESS_KEY_ID": "<key>",
"S3_SECRET_ACCESS_KEY": "<secret>",
"S3_REGION": "us-east-1",
"S3_ALLOW_SELF_SIGNED": "true"
}
}
}
}Keep -y: without it npx asks for install confirmation on stdin, which is the MCP transport, so the server never starts. The first run takes roughly 40 seconds because npm installs TypeScript and runs the prepare build; later runs use the npx cache. The published npm package ships prebuilt dist/, so ["-y", "s3-mcp"] starts instantly.
From source
git clone https://github.com/tompetk/s3-mcp.git
cd s3-mcp
npm install
npm run build
node dist/index.js --helpPoint your MCP client at node + the absolute path to dist/index.js.
Configuration examples
RustFS / MinIO (self-hosted, often self-signed)
{
"mcpServers": {
"s3": {
"command": "npx",
"args": ["-y", "s3-mcp", "--insecure"],
"env": {
"S3_ENDPOINT": "https://rustfs.example.com",
"S3_ACCESS_KEY_ID": "<key>",
"S3_SECRET_ACCESS_KEY": "<secret>",
"S3_REGION": "us-east-1",
"S3_FORCE_PATH_STYLE": "true",
"S3_ALLOW_WRITE": "false"
}
}
}
}Prefer a custom CA when you have one:
S3_CA_BUNDLE=/path/to/ca.pem--insecure / S3_ALLOW_SELF_SIGNED=true disables certificate verification for this client only (never sets NODE_TLS_REJECT_UNAUTHORIZED). Prefer S3_CA_BUNDLE when possible.
Cloudflare R2
{
"mcpServers": {
"s3": {
"command": "npx",
"args": ["-y", "s3-mcp", "--no-path-style"],
"env": {
"S3_ENDPOINT": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
"S3_ACCESS_KEY_ID": "<key>",
"S3_SECRET_ACCESS_KEY": "<secret>",
"S3_REGION": "auto"
}
}
}
}Environment variables & flags
Env | Flag | Default | Notes |
|
| (required) | S3 API URL |
| — | (required) | Env only (argv is visible in |
| — | (required) | Env only |
|
|
| Use |
|
|
| Path-style is the safe default for self-hosted |
|
|
| Skip TLS verify (logs a stderr warning) |
|
| — | PEM file to trust |
|
|
| Enable put/delete |
|
| — | Comma-separated allow-list |
|
|
| Cap for |
— |
| — | Accepted, ignored |
— |
| — |
CLI flags override env vars.
Security
Read-only by default. Pointing this at production buckets without
S3_ALLOW_WRITEcannot mutate data via the MCP tools.Bucket allow-list. Set
S3_ALLOWED_BUCKETS=prod-logs,prod-artifacts(or repeat--bucket) so the agent cannot touch other buckets the credentials can see.TLS. Prefer
S3_CA_BUNDLEover--insecure. Self-signed mode is convenient for lab endpoints; it is not a substitute for trusting the right CA.Secrets. Keep keys in the MCP client's
envblock or a secret store — never commit them..envis gitignored; use.env.exampleas a template for local smoke tests.
Development
npm install
npm run build
npm run typecheck
# Live round-trip (creates a throwaway bucket unless S3_BUCKET is set)
export S3_ENDPOINT=https://rustfs.example.com
export S3_ACCESS_KEY_ID=...
export S3_SECRET_ACCESS_KEY=...
npm run smoke
# Read-only credentials (list + head + ranged get)
S3_SMOKE_READ_ONLY=true S3_BUCKET=test npm run smokePublishing
Tags matching v* trigger GitHub Actions to build and npm publish --provenance --access public. Add an NPM_TOKEN repository secret once.
git tag v1.0.0
git push origin v1.0.0License
MIT
Available Tools
6 toolss3_delete_objectDelete S3 objectADestructive
Delete an object. Requires S3_ALLOW_WRITE=true. Idempotent: missing keys (NoSuchKey/404) are treated as success.
Inputs: key (required), bucket (required).
s3_head_objectHead S3 objectARead-only
Fetch object metadata without downloading the body (size, ETag, content-type, user metadata).
Inputs: key (required), bucket (required).
s3_list_bucketsList S3 bucketsARead-only
List all available S3 buckets visible to the configured credentials.
Inputs: no named parameters.
s3_list_objectsList S3 objectsARead-only
List objects in a bucket. Optional prefix/delimiter for folder-style browsing. Note: S3 ListObjectsV2 does not return user metadata — use s3_head_object for that.
Inputs: bucket (required), prefix, maxKeys, delimiter, +1 more.
s3_put_objectPut S3 objectADestructive
Upload object content. Requires S3_ALLOW_WRITE=true. Pass encoding=base64 to upload binary data from a base64 string.
Inputs: key (required), bucket (required), content (required), encoding, +2 more.
s3_read_objectRead S3 objectARead-only
Read object content. Uses a Range request capped by maxBytes so large objects never stream in full. encoding=auto returns UTF-8 text when decodable, otherwise base64.
Inputs: key (required), bucket (required), encoding, maxBytes.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct S3 operation: listing buckets, listing objects, fetching metadata, reading content, uploading, and deleting. The descriptions explicitly clarify the tricky boundary between s3_head_object (metadata only) and s3_read_object (content), and between s3_list_objects and s3_head_object regarding user metadata.
Every tool follows the same predictable `s3_verb_noun` snake_case pattern (s3_list_buckets, s3_read_object, s3_put_object, etc.). No mixed conventions or vague verbs.
Six tools is well-scoped for a focused S3 object-access server, covering the core read/write lifecycle without bloat. Each tool earns its place with a non-overlapping job.
Core object lifecycle is covered: list buckets, list objects, head, read, put, delete. Minor gaps exist — no bucket create/delete, no copy_object, and no multi-object delete — but agents can work around these for typical object read/write tasks.
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.
An MCP server for the STRG.com s3-compatible object storage network for all management operations. Full documentation access, ask questions, create buckets, configure scoped access keys, CORS rules, lifecycle policies and perform any S3 operation.
Create a free sandbox object storage bucket; upload, download, list, inspect, and delete objects.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to manage MinIO object storage through comprehensive bucket operations, file uploads/downloads, batch processing, permissions management, and URL generation. Supports both automatic and manual connection modes with flexible authentication options.1936 npm2MIT
- AlicenseAqualityDmaintenanceEnables interaction with S3-compatible storage services like AWS S3 and Cloudflare R2, supporting bucket management, object listing, reading, uploading, and deletion operations.527 npmISC
- AlicenseNot gradedqualityDmaintenanceIt Integration for MinIO / S3-compatible object storage, providing AI assistants with direct access to bucket management, object CRUD, presigned URLs, policies, lifecycle rules, and storage analytics.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLM agents to interact with MinIO/S3 object storage, supporting bucket and object operations like listing, reading, writing, and generating presigned URLs.1-