s3-gateway-mcp
Provides S3-compatible integration with Backblaze B2, enabling bucket and object management, versioning, policies, CORS, lifecycle rules, tagging, encryption, presigned URLs, uploads, and multipart cleanup through the MCP tools.
Provides S3-compatible integration with Cloudflare R2, enabling bucket and object management, versioning, policies, CORS, lifecycle rules, tagging, encryption, presigned URLs, uploads, and multipart cleanup through the MCP tools.
Provides S3-compatible integration with DigitalOcean Spaces, enabling bucket and object management, versioning, policies, CORS, lifecycle rules, tagging, encryption, presigned URLs, uploads, and multipart cleanup through the MCP tools.
Provides S3-compatible integration with MinIO, enabling bucket and object management, versioning, policies, CORS, lifecycle rules, tagging, encryption, presigned URLs, uploads, and multipart cleanup through the MCP tools.
Provides S3-compatible integration with Wasabi, enabling bucket and object management, versioning, policies, CORS, lifecycle rules, tagging, encryption, presigned URLs, uploads, and multipart cleanup through the MCP tools.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.

s3-gateway-mcp
An MCP server for S3-compatible storage. It runs once as a Streamable HTTP service, and every agent on your machine (Claude Code, Codex, Cursor, …) shares it. It also speaks stdio when you want a single local process.
39 tools covering buckets, objects, versions, policies, CORS, lifecycle, tags, encryption, presigned URLs and multipart cleanup.
File → public URL in one call.
upload_filereads a local path and returns a link you can paste into a PR or issue.Credentials stay on the server. Clients only hold a bearer token.
Works with any S3 API: AWS S3, Cloudflare R2, MinIO, RustFS, Backblaze B2, Wasabi, DigitalOcean Spaces.

Quick start
Docker (recommended)
Build the image, then run it with your settings as environment variables.
git clone https://github.com/jdk1021/s3-gateway-mcp.git
docker build -t s3-gateway-mcp ./s3-gateway-mcp
docker run -d --name s3-gateway-mcp --restart unless-stopped \
--user "$(id -u):$(id -g)" \
-p 127.0.0.1:18801:8000 \
-v /tmp:/tmp:ro \
-e MCP_TOKEN="$(openssl rand -hex 32)" \
-e S3_ENDPOINT=https://s3.example.com \
-e S3_ACCESS_KEY_ID=your_key \
-e S3_SECRET_ACCESS_KEY=your_secret \
-e S3_BUCKET=static \
-e ALLOWED_DIRS=/tmp \
s3-gateway-mcp
curl -s localhost:18801/health
docker exec s3-gateway-mcp printenv MCP_TOKEN # token for your agentsPublic URLs are built from S3_ENDPOINT (https://s3.example.com/static/<key>). Set S3_PUBLIC_URL only when files are served from a different address such as a CDN. Optional variables are listed under Configuration.
/tmp is mounted read-only at the same path, so a path an agent sees on the host is the path upload_file reads. To allow more, add another -v <dir>:<dir>:ro and append it to ALLOWED_DIRS. Read Local file access before you do.
Docker Compose
git clone https://github.com/jdk1021/s3-gateway-mcp.git && cd s3-gateway-mcp
cp env.example .env # fill in S3_* and MCP_TOKEN
docker compose up -d --buildNode
npm ci
MCP_TOKEN=... S3_ENDPOINT=... S3_ACCESS_KEY_ID=... S3_SECRET_ACCESS_KEY=... S3_BUCKET=... \
node src/index.mjs # HTTP on :8000
node src/index.mjs --stdio # or stdioRequires Node.js 20 or later.
Related MCP server: minio-mcp-server
Connect your agents
Claude Code
claude mcp add --transport http -s user s3 http://localhost:18801/mcp \
--header "Authorization: Bearer $MCP_TOKEN"Codex (~/.codex/config.toml)
[mcp_servers.s3]
url = "http://localhost:18801/mcp"
http_headers = { Authorization = "Bearer <MCP_TOKEN>" }Cursor / VS Code / other clients (mcp.json)
{
"mcpServers": {
"s3": {
"type": "http",
"url": "http://localhost:18801/mcp",
"headers": { "Authorization": "Bearer <MCP_TOKEN>" }
}
}
}stdio (no server to run)
claude mcp add -s user s3 \
-e S3_ENDPOINT=https://s3.example.com -e S3_ACCESS_KEY_ID=... -e S3_SECRET_ACCESS_KEY=... \
-e S3_BUCKET=static -e ALLOWED_DIRS=/tmp \
-- node /path/to/s3-gateway-mcp/src/index.mjs --stdio
Configuration
Variable | Default | Description |
| — | Bearer token. Required in HTTP mode. |
|
| Turn off auth for trusted local setups only. |
|
| HTTP listen address. |
| AWS | Endpoint URL of your provider. |
|
| Region. R2 uses |
|
| Path-style addressing (MinIO, RustFS). Set |
| — | Credentials. Required. |
| — | Temporary credentials. |
| — | Default bucket when a tool call omits |
| built from | Only when files are served from another address (CDN, custom domain). Base URL of the default bucket; use |
| empty | Optional prefix for auto-generated upload keys, e.g. |
| all | Comma-separated allowlist. |
|
| Register read tools only. PUT presigning is also refused. |
|
|
|
| cwd | Colon-separated directories |
| — | Enables |
|
| Upload size limit. |
|
| Largest object |
Without a key, uploads are stored as {S3_PATH_PREFIX}YYYYMMDD/<6 hex>-<filename>. Pass key to choose the exact path.
Tools
Every tool takes an optional bucket that falls back to S3_BUCKET. Tools carry MCP readOnlyHint / destructiveHint annotations so clients can ask before destructive calls.
Group | Tools |
Buckets |
|
Policy |
|
Versioning |
|
CORS |
|
Lifecycle |
|
Bucket tags |
|
Encryption |
|
Read objects |
|
Write objects |
|
Delete objects |
|
Object tags |
|
Links |
|
Multipart |
|
Uploads over 5 MB switch to multipart automatically.
Local file access
upload_file can publish any readable file inside ALLOWED_DIRS to your bucket. Read-only mounts stop the server from changing files, not from uploading them. If you allow your whole home directory, files such as ~/.ssh/id_ed25519, ~/.aws/credentials or .env files become one tool call away from a public URL.
Allow the narrowest directories that hold what agents upload, for example
/tmpor a screenshots folder. Avoid$HOME.Always mount them read-only (
:ro) and at the same path inside the container.Symlinks are resolved first, so a link inside an allowed directory cannot point outside it.
If agents only need to pass bytes they already have, drop the mounts entirely and use
upload_base64orupload_from_url.
Security notes
The HTTP port binds to
127.0.0.1incompose.yml. Put a TLS reverse proxy in front before exposing it anywhere else.Give the server credentials scoped to the buckets it needs, and combine with
S3_ALLOWED_BUCKETS,S3_READ_ONLYorS3_ALLOW_DESTRUCTIVE=false.upload_fileresolves symlinks and refuses anything outsideALLOWED_DIRS.upload_from_urlfetches whatever URL it is given, including internal addresses. Leave it out of reach of untrusted prompts.
Design assets
The images in this README are HTML pages in design/, captured with Playwright. Serve the repo root (python3 -m http.server), open /design/hero.html, and append ?lang=ko for the Korean versions.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
The agent-native cloud: database, functions, AI, storage, computers. 51 tools, one API key.
Browse, upload, download, and share files in your S3-compatible buckets with delegated roles.
MCP-first toolbox for agents: KV storage, auth, queue, and utility tools. Free in early access.
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.515 npmISC
- 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-
- AlicenseNot gradedqualityCmaintenanceEnables agents to interact with any S3-compatible storage (AWS S3, LocalStack, MinIO) via MCP, providing tools like list, read, write, delete objects and buckets.MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to explore and manage S3-compatible object storage (AWS S3, RustFS, MinIO, Cloudflare R2) by listing buckets and objects, inspecting metadata, and reading object contents with capped range requests. Write operations such as upload and delete are available but disabled unless explicitly enabled, with optional bucket allow-listing and custom TLS trust.6MIT