s3-mcp
s3-mcp
一个通用的 S3 协议 MCP 服务器(stdio),可运行于任何 S3 兼容端点之上 — RustFS、MinIO、Cloudflare R2、Backblaze B2、AWS S3 —— 不仅限于 AWS。
单一 Python 包,启动时创建一个 boto3 客户端,配置仅通过环境变量完成。基于官方 mcp SDK(高级服务器 API)和 boto3 构建。
配置(环境变量)
变量 | 必需 | 默认值 | 描述 |
| 否 | 无 | S3 兼容端点;省略以指向真实 AWS |
| 否 |
| 用于签名和创建存储桶的区域 |
| 是 | — | 访问密钥 |
| 是 | — | 秘密访问密钥 |
| 否 |
| 路径样式寻址(https://host/bucket/key)—— 大多数非 AWS 存储需要 |
| 否 |
|
|
布尔值接受 true/false/1/0/yes/no(不区分大小写)。缺少凭据或布尔值无效时,启动会中止并给出清晰错误。
Related MCP server: MinIO MCP Server
工具
工具 | 只读提示 |
| 是 |
| 是 |
| 是 |
| 是 |
| 是 |
| 否 |
| 否 |
| 否 |
| 否 |
| 否 |
| 否 |
工具错误以简短的 RuntimeError 消息抛出,并由 MCP 作为错误结果返回。根据 SigV4 规范,预签名 URL 的上限为 7 天(604800 秒)。
示例配置
使用自签名证书的 RustFS
{
"mcpServers": {
"s3-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "S3_ENDPOINT_URL=https://rustfs.local:9000",
"-e", "S3_TLS_INSECURE=true",
"-e", "AWS_REGION=us-east-1",
"-e", "AWS_ACCESS_KEY_ID",
"-e", "AWS_SECRET_ACCESS_KEY",
"ghcr.io/jakeperalta7/s3-mcp:latest"
]
}
}
}不带值的 -e VAR 会从 shell 中透传变量,因此凭据绝不会出现在配置文件中。
MinIO
{
"mcpServers": {
"s3-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "S3_ENDPOINT_URL=http://localhost:9000",
"-e", "AWS_REGION=us-east-1",
"-e", "AWS_ACCESS_KEY_ID",
"-e", "AWS_SECRET_ACCESS_KEY",
"ghcr.io/jakeperalta7/s3-mcp:latest"
]
}
}
}AWS S3
省略 S3_ENDPOINT_URL;采用标准的 AWS 凭据/区域解析方式:
{
"mcpServers": {
"s3-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "AWS_REGION",
"-e", "AWS_ACCESS_KEY_ID",
"-e", "AWS_SECRET_ACCESS_KEY",
"ghcr.io/jakeperalta7/s3-mcp:latest"
]
}
}
}不使用 Docker(uv)
uvx --from git+https://github.com/JakePeralta7/s3-mcp s3-mcp{
"mcpServers": {
"s3-mcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/JakePeralta7/s3-mcp", "s3-mcp"],
"env": {
"S3_ENDPOINT_URL": "http://localhost:9000",
"AWS_ACCESS_KEY_ID": "...",
"AWS_SECRET_ACCESS_KEY": "..."
}
}
}
}开发
uv sync --group dev # install deps into .venv
uv run pytest -q # unit tests (boto3 mocked, no network)
docker build -t s3-mcp:dev .入口点:python -m s3_mcp(仅 stdio 传输)。
发布
每次推送到 main 分支都会运行测试,然后发布 ghcr.io/<owner>/<repo>:<version> 和 :latest,其中 <version> 从 pyproject.toml 中的 version 读取。要发布,请提升版本号并合并到 main。不使用 Git 标签。
许可证
Available Tools
11 toolscopy_objectC
Copy an object within or across buckets on the same endpoint.
Inputs: dst_key (required), src_key (required), dst_bucket (required), src_bucket (required). Returns: object
create_bucketC
Create a bucket in the configured region.
Inputs: bucket (required). Returns: object
delete_bucketA
Delete a bucket (must be empty).
Inputs: bucket (required). Returns: object
delete_objectC
Delete an object from a bucket.
Inputs: key (required), bucket (required). Returns: object
get_objectARead-only
Read an object. UTF-8 content returns as text; anything else as base64.
Inputs: key (required), bucket (required). Returns: object
list_bucketsARead-only
List all buckets accessible with the configured credentials.
Inputs: no named parameters. Returns: result
list_objectsARead-only
List objects in a bucket (single page, up to max_keys).
Returns objects with key/size/last_modified plus a truncated flag when more results exist.
Inputs: bucket (required), prefix, max_keys. Returns: object
presign_getBRead-only
Generate a pre-signed GET URL valid for expires_s seconds (max 604800).
Inputs: key (required), bucket (required), expires_s. Returns: result
presign_putC
Generate a pre-signed PUT URL valid for expires_s seconds (max 604800).
Inputs: key (required), bucket (required), expires_s. Returns: result
put_objectC
Write an object. Set base64=true when body is base64-encoded binary.
Inputs: key (required), body (required), bucket (required), base64. Returns: object
stat_objectARead-only
Get object metadata (size, etag, content type, last modified).
Inputs: key (required), bucket (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Every tool maps to a distinct S3 operation: bucket listing/creation/deletion, object listing/read/metadata/write/delete/copy, and presigned URL generation for GET vs PUT. There is no functional overlap that would cause an agent to select the wrong tool.
All tool names follow the same snake_case verb_noun pattern (list_buckets, get_object, presign_put, create_bucket, etc.). The naming is predictable and consistent across the entire surface.
With 11 tools, the set is well-scoped for an S3-focused server. Each tool covers a core operation without extraneous additions or redundant convenience wrappers.
The server covers bucket lifecycle and object CRUD, including copying and presigned URLs, so common workflows are fully supported. Minor gaps exist around pagination for large object listings and advanced operations like multipart uploads, but these are not severe for typical usage.
Maintenance
Related MCP Connectors
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.
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.
Create a free sandbox object storage bucket; upload, download, list, inspect, and delete objects.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables interaction with AWS S3 through MCP, supporting bucket and object management, lifecycle configurations, tagging, policies, CORS settings, presigned URLs, and file uploads/downloads.3MIT
- FlicenseAqualityDmaintenanceProvides tools for interacting with MinIO and S3-compatible object storage through MCP clients like Claude. It enables comprehensive bucket and object management, including listing, creating, uploading, and generating presigned URLs.132-
- AlicenseAqualityDmaintenanceEnables MCP clients to connect to AWS S3 buckets, list, upload, and read objects in various formats, supporting public and private buckets with multiple transport modes.4MIT
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools for AWS S3 and S3-compatible storage, enabling file upload, download, listing, deletion, and temporary remote file staging via natural language.BSD 3-Clause