Full-surface S3 administration and object storage for AI assistants — 217 MCP tools in a single Rust binary
📖 Documentation · 🛠️ 217-Tool Reference · 🐛 Bug Reports · 💬 Discussions
English · 简体中文 · Français · Deutsch · 日本語 · 한국어 · Português · Español · العربية
Use the published multi-arch Docker image (rustfs/mcp:latest, supporting linux/amd64 and linux/arm64) — no Rust toolchain or build step required. Paste this into your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"rustfs": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "AWS_ENDPOINT_URL",
"-e", "AWS_ACCESS_KEY_ID",
"-e", "AWS_SECRET_ACCESS_KEY",
"-e", "AWS_REGION",
"rustfs/mcp:latest"
],
"env": {
"AWS_ENDPOINT_URL": "http://host.docker.internal:9000",
"AWS_ACCESS_KEY_ID": "your_access_key",
"AWS_SECRET_ACCESS_KEY": "your_secret_key",
"AWS_REGION": "us-east-1"
}
}
}
}Local endpoint tip: On macOS and Windows,
host.docker.internal:9000reaches a RustFS/MinIO server running on your host. On Linux, pass"--network", "host"inargsand usehttp://localhost:9000. OmitAWS_ENDPOINT_URLto connect directly to AWS S3.
Admin API and presigned POST (v0.9.4+): The HTTP hostnames in these examples work for ordinary S3 requests where supported, but admin API endpoints and presigned POST destinations require HTTPS unless the URL uses a literal loopback IP. For native setups or Linux host networking, use
http://127.0.0.1:9000(orhttp://[::1]:9000if listening on IPv6) when RustFS is reachable there. On Docker Desktop, usehttps://host.docker.internal:9000or another reachable HTTPS endpoint with a trusted certificate for its hostname.
cargo install rustfs-mcpThen add it to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"rustfs": {
"command": "rustfs-mcp",
"env": {
"AWS_ENDPOINT_URL": "http://localhost:9000",
"AWS_ACCESS_KEY_ID": "your_access_key",
"AWS_SECRET_ACCESS_KEY": "your_secret_key",
"AWS_REGION": "us-east-1"
}
}
}
}Then ask your assistant: "list my buckets".
Most S3 MCP servers stop at basic list / get / put / delete wrappers. RustFS MCP Server gives AI agents real production S3 administration and data operations — 217 tools across 28 domains — in a single memory-safe Rust binary tested against RustFS, AWS S3, and MinIO.
| Capability | Typical S3 MCP Servers | RustFS MCP Server |
|---|---|---|
| S3 Operation Surface | 5–10 basic CRUD tools (list, get, put, delete) |
217 tools: Public Access Block & Policy Status, Bucket Ownership Controls, Transfer Acceleration, Glacier Restore & S3 Select, Lifecycle, Replication, Object Lock (WORM & Legal Hold), Multipart Upload & Server-Side upload_part_copy, Versioning, Encryption (SSE-S3/KMS/DSSE), Bucket Policies & Verified ACLs, CORS, Event Notifications, Access Logging, Static Websites, Tagging, Request Payment, Presigned URLs & POST Policies, Conditional Writes & Range Reads, STS assume_role Temporary Credentials, RustFS Admin API Tools (behind --enable-admin), Admin KMS Key Management (behind --enable-admin) |
| AI Safety & Guardrails | Minimal or no client hints | Full MCP tool annotations (readOnlyHint, destructiveHint, idempotentHint), server-side --read-only mode, --allowed-buckets allowlist, and --denied-tools blocklist, temporary STS --session-token support, local validation before mutation, read-back verification for ACLs and replication deletes, and full SDK error cause chains ({:#}) |
| Multi-Backend Parity | Often AWS-only or brittle error parsing | Normalized across RustFS, AWS S3, and MinIO — cleanly handles backend-specific semantics (Object Lock / Public Access Block / Ownership Controls unset states, RustFS site replication survival, non-enforcing ACL detection, empty-PUT clearing) |
| Deployment & Runtime | Python/Node runtime + dependency tree | Single native Rust binary + prebuilt release archives (cargo-binstall) + published multi-arch Docker image (linux/amd64, linux/arm64), optional Linux io_uring, Apache-2.0 licensed |
Pull the official multi-architecture image from Docker Hub (linux/amd64 and linux/arm64):
docker pull rustfs/mcp:latest
# Or pin a specific release tag:
docker pull rustfs/mcp:0.9.4If you want your assistant to upload local files (upload_file, upload_part) or save downloads (get_object in download mode) from inside the container, bind-mount a host directory:
{
"mcpServers": {
"rustfs": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "/path/to/local/files:/data",
"-e", "AWS_ENDPOINT_URL",
"-e", "AWS_ACCESS_KEY_ID",
"-e", "AWS_SECRET_ACCESS_KEY",
"-e", "AWS_REGION",
"rustfs/mcp:latest"
],
"env": {
"AWS_ENDPOINT_URL": "http://host.docker.internal:9000",
"AWS_ACCESS_KEY_ID": "your_access_key",
"AWS_SECRET_ACCESS_KEY": "your_secret_key",
"AWS_REGION": "us-east-1"
}
}
}
}Precompiled archives and SHA256SUMS are published on GitHub Releases for:
- Linux:
x86_64-unknown-linux-musl,aarch64-unknown-linux-musl(static binaries) - macOS:
aarch64-apple-darwin(Apple Silicon),x86_64-apple-darwin(Intel) - Windows:
x86_64-pc-windows-msvc
Extract the archive and place rustfs-mcp (or rustfs-mcp.exe) on your PATH, or install via cargo-binstall:
cargo binstall rustfs-mcpRequires Rust 1.85+ (Rust edition 2024).
# Standard install (works out of the box on Linux, macOS, and Windows):
cargo install rustfs-mcp
# Optional: enable Linux io-uring support:
RUSTFLAGS="--cfg tokio_unstable" cargo install rustfs-mcp --features io-uringgit clone https://github.com/rustfs/mcp.git
cd mcp
# Standard release build (all platforms)
cargo build --release -p rustfs-mcp
# Optional: enable Linux io-uring support
RUSTFLAGS="--cfg tokio_unstable" cargo build --release --features io-uring -p rustfs-mcp
# Binary output:
./target/release/rustfs-mcpThe Dockerfile sits at the repository root:
git clone https://github.com/rustfs/mcp.git
cd mcp
# Build with Linux io-uring enabled (default)
docker build -t rustfs/mcp .
# Or build without io-uring
docker build --build-arg ENABLE_IO_URING=0 -t rustfs/mcp .| Client | Configuration File / Command |
|---|---|
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Claude Desktop (Linux) | ~/.config/Claude/claude_desktop_config.json |
| Cursor | ~/.cursor/mcp.json (global) or .cursor/mcp.json (project) |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| VS Code (Copilot MCP) | .vscode/mcp.json (uses top-level "servers" with "type": "stdio") |
| Claude Code | claude mcp add CLI (example below) |
# Using the installed binary
claude mcp add rustfs \
-e AWS_ENDPOINT_URL=http://localhost:9000 \
-e AWS_ACCESS_KEY_ID=your_access_key \
-e AWS_SECRET_ACCESS_KEY=your_secret_key \
-e AWS_REGION=us-east-1 \
-- rustfs-mcp
# Or using the Docker image (zero-build)
claude mcp add rustfs \
-e AWS_ENDPOINT_URL=http://host.docker.internal:9000 \
-e AWS_ACCESS_KEY_ID=your_access_key \
-e AWS_SECRET_ACCESS_KEY=your_secret_key \
-e AWS_REGION=us-east-1 \
-- docker run --rm -i \
-e AWS_ENDPOINT_URL -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION \
rustfs/mcp:latest{
"servers": {
"rustfs": {
"type": "stdio",
"command": "rustfs-mcp",
"env": {
"AWS_ENDPOINT_URL": "http://localhost:9000",
"AWS_ACCESS_KEY_ID": "your_access_key",
"AWS_SECRET_ACCESS_KEY": "your_secret_key",
"AWS_REGION": "us-east-1"
}
}
}
}{
"mcpServers": {
"rustfs": {
"command": "rustfs-mcp",
"args": [
"--endpoint-url", "http://localhost:9000",
"--access-key-id", "your_access_key",
"--secret-access-key", "your_secret_key",
"--region", "us-east-1",
"--read-only",
"--allowed-buckets", "prod-data,dr-assets",
"--log-level", "info"
]
}
}
}Command-line arguments take precedence over environment variables. Run rustfs-mcp --help to inspect all options.
| CLI Option | Environment Variable | Required | Default | Description |
|---|---|---|---|---|
--access-key-id |
AWS_ACCESS_KEY_ID |
Yes | — | S3 / AWS Access Key ID |
--secret-access-key |
AWS_SECRET_ACCESS_KEY |
Yes | — | S3 / AWS Secret Access Key |
--session-token |
AWS_SESSION_TOKEN |
No | — | Optional AWS STS / IAM temporary session token |
--region |
AWS_REGION |
No | us-east-1 |
Region used for S3 request signing |
--endpoint-url |
AWS_ENDPOINT_URL |
No | AWS S3 default | Custom S3 endpoint URL (RustFS, MinIO, LocalStack, etc.) |
--force-path-style |
— | No | false (auto-enabled for custom endpoints) |
Force path-style S3 addressing |
--read-only |
RUSTFS_MCP_READ_ONLY |
No | false |
Hide and block all mutating tools (including get_object download mode and archive exports); only read/list/S3 Select calls are served |
--allowed-buckets |
RUSTFS_MCP_ALLOWED_BUCKETS |
No | All buckets | Comma-separated bucket allowlist enforced across tool arguments, replication destinations, and list_buckets output. A configured allowlist hides and blocks assume_role, assume_role_with_web_identity, admin_add_service_account, admin_add_user, admin_set_user_secret_key, admin_update_service_account, admin_export_iam, admin_import_iam, admin_site_replication_resync, admin_site_replication_repair, and admin_import_bucket_metadata. Bucket metadata export, gateway key inventory, and cache flush require an explicit allowed bucket. Site replication status and metainfo, server configuration writes, and pool maintenance and rebalance writes are refused. |
--denied-tools |
RUSTFS_MCP_DENIED_TOOLS |
No | — | Comma-separated tool names to hide from the tool list and refuse on call (e.g. admin_add_user,presigned_url), useful for turning individual tools off in read-write mode. Entries are trimmed and deduplicated and keep their case (tool names are snake_case); names that match no registered tool are ignored, and the list applies on top of --read-only (either one that hits hides and refuses a tool). |
--enable-admin |
RUSTFS_MCP_ENABLE_ADMIN |
No | false |
Serve the RustFS admin API tools (admin_*) over the endpoint --endpoint-url names; they need admin-grade credentials and are hidden by default |
--log-level |
RUST_LOG |
No | rustfs_mcp=info |
Tracing filter (logs write to stderr so stdout stays clean for MCP stdio) |
- Explore & audit security: "List my buckets, check Public Access Block, policy public status, versioning, and encryption on
prod-data, and show the 20 latest objects underreports/2026/." - Query data in place (S3 Select): "Use S3 Select to return the first 10 error rows (
level = 'ERROR') fromlogs/2026-12-01.csv.gzinapp-logs." - Lifecycle & archive restore: "Inspect lifecycle rules on
analytics-raw, add a rule expiring objects undertmp/after 7 days, and request a 7-dayStandardrestore forarchive/2024.parquet." - Object Lock (WORM compliance): "Create a lock-enabled bucket named
audit-archive, set a 90-dayGOVERNANCEdefault retention, and inspect the retention and legal hold status of2026/q4.parquet." - Cross-bucket replication: "Read the current replication configuration on
prod-assetsand set up a rule replicating objects taggedtier=criticaltodr-assets." - Large files & sharing: "List in-progress multipart uploads in
media-uploads, abort any stale ones, and generate a 1-hour presigned download URL forreleases/app.tar.gz."
compile_error!: feature io-uring requires cfg tokio_unstable: Only triggered when opting into--features io-uring(or installing legacyv0.9.1). PassRUSTFLAGS="--cfg tokio_unstable"when building with--features io-uring, or omit the feature for a standard build.- Docker cannot reach
http://localhost:9000: Inside a container,localhostpoints to the container itself. Usehttp://host.docker.internal:9000on macOS/Windows, or add"--network", "host"inargson Linux. - File paths with Docker: When calling
upload_file,upload_part, orget_object(mode: "download"), mount your local folder into the container (e.g.-v /Users/you/files:/data) and reference paths under/data/.... - Debug logs: Set
RUST_LOG=debugor--log-level debug. All logs are emitted tostderrand never corrupt the MCPstdioJSON-RPC stream.
Every tool includes MCP tool annotations (readOnlyHint, destructiveHint, idempotentHint) so MCP clients can automatically decide when to prompt for confirmation. See docs/tools.md for complete parameters, warnings, and RustFS / AWS S3 / MinIO behavior notes for all 217 tools.
| Domain | Count | Tools |
|---|---|---|
| Bucket Management & Inspection | 5 | list_buckets, create_bucket, delete_bucket, head_bucket, get_bucket_location |
| Object Operations & Inspection | 15 | list_objects, list_objects_v1, get_object, get_object_torrent, upload_file, upload_content, copy_object, head_object, get_object_attributes, restore_object, select_object_content, presigned_url, presigned_post, delete_object, delete_objects |
| Multipart Uploads & Server-Side Assembly | 7 | initiate_multipart_upload, upload_part, upload_part_copy, list_parts, list_multipart_uploads, complete_multipart_upload, abort_multipart_upload |
| Versioning | 4 | get_bucket_versioning, put_bucket_versioning, list_object_versions, delete_object_versions |
| Object Lock (WORM & Legal Hold) | 6 | get_bucket_lock_configuration, put_bucket_lock_configuration, get_object_retention, put_object_retention, get_object_legal_hold, put_object_legal_hold |
| Bucket Lifecycle | 3 | get_bucket_lifecycle, put_bucket_lifecycle, delete_bucket_lifecycle |
| Cross-Bucket Replication | 3 | get_bucket_replication, put_bucket_replication, delete_bucket_replication |
| Access Control (Policies, Public Access Block & ACLs) | 11 | get_bucket_policy, put_bucket_policy, delete_bucket_policy, get_bucket_policy_status, get_public_access_block, put_public_access_block, delete_public_access_block, get_bucket_acl, put_bucket_acl, get_object_acl, put_object_acl |
| Server-Side Encryption | 3 | get_bucket_encryption, put_bucket_encryption, delete_bucket_encryption |
| Bucket & Object Tagging | 6 | get_bucket_tagging, put_bucket_tagging, delete_bucket_tagging, get_object_tagging, put_object_tagging, delete_object_tagging |
| CORS | 3 | get_bucket_cors, put_bucket_cors, delete_bucket_cors |
| Event Notifications | 3 | get_bucket_notification, put_bucket_notification, delete_bucket_notification |
| Server Access Logging | 3 | get_bucket_logging, put_bucket_logging, delete_bucket_logging |
| Static Website Hosting | 3 | get_bucket_website, put_bucket_website, delete_bucket_website |
| Request Payment | 2 | get_bucket_request_payment, put_bucket_request_payment |
| Transfer Acceleration | 2 | get_bucket_accelerate_configuration, put_bucket_accelerate_configuration |
| Bucket Ownership Controls | 3 | get_bucket_ownership_controls, put_bucket_ownership_controls, delete_bucket_ownership_controls |
| Temporary Credentials (STS) | 2 | assume_role, assume_role_with_web_identity |
| Admin (RustFS, behind --enable-admin) | 6 | admin_server_info, admin_storage_info, admin_cluster_usage, admin_runtime_capabilities, admin_bucket_usage, admin_account_info |
| Admin IAM (RustFS, behind --enable-admin) | 26 | admin_list_users, admin_get_user, admin_add_user, admin_delete_user, admin_set_user_status, admin_set_user_secret_key, admin_set_user_policy, admin_list_groups, admin_get_group, admin_update_group_members, admin_set_group_status, admin_remove_group, admin_list_policies, admin_get_policy, admin_add_policy, admin_delete_policy, admin_add_service_account, admin_update_service_account, admin_list_service_accounts, admin_get_service_account, admin_delete_service_account, admin_temporary_account_info, admin_get_access_key, admin_list_access_keys_bulk, admin_export_iam, admin_import_iam |
| Admin Bucket Management (RustFS, behind --enable-admin) | 8 | admin_get_bucket_quota, admin_set_bucket_quota, admin_delete_bucket_quota, admin_bucket_quota_stats, admin_list_tiers, admin_list_remote_targets, admin_list_notification_targets, admin_list_notification_arns |
| Admin Bucket Operations (RustFS, behind --enable-admin) | 16 | admin_export_bucket_metadata, admin_import_bucket_metadata, admin_recover_orphaned_bucket, admin_bucket_durability, admin_get_bucket_etag, admin_set_bucket_etag, admin_delete_bucket_etag, admin_on_demand_migrate, admin_on_demand_migration_status, admin_on_demand_backfill, admin_integrity_readiness, admin_integrity_inventory, admin_integrity_job_create, admin_integrity_job_status, admin_integrity_job_control, admin_get_hourly_lifecycle |
| Admin Ops — Heal, Rebalance & Pools (RustFS, behind --enable-admin) | 15 | admin_heal, admin_background_heal_status, admin_heal_mrf, admin_heal_mrf_responsibilities, admin_heal_replacement_recovery_status, admin_rebalance_start, admin_rebalance_status, admin_rebalance_stop, admin_pools_list, admin_pools_status, admin_pools_maintenance_status, admin_pools_maintenance_enter, admin_pools_maintenance_exit, admin_pools_config_check, admin_pools_preflight |
| Admin Remote Tiers & Targets (RustFS, behind --enable-admin) | 13 | admin_add_tier, admin_remove_tier, admin_tier_stats, admin_set_remote_target, admin_remove_remote_target, admin_replication_metrics, admin_replication_diff, admin_replication_mrf, admin_set_notification_target, admin_remove_notification_target, admin_list_audit_targets, admin_set_audit_target, admin_remove_audit_target |
| Admin Site Replication (RustFS, behind --enable-admin) | 6 | admin_site_replication_info, admin_site_replication_status, admin_site_replication_metainfo, admin_site_replication_repair_status, admin_site_replication_resync, admin_site_replication_repair |
| Admin Config (RustFS, behind --enable-admin) | 8 | admin_get_config_kv, admin_set_config_kv, admin_delete_config_kv, admin_help_config_kv, admin_list_config_history, admin_clear_config_history, admin_restore_config_history, admin_set_config |
| Admin KMS (RustFS, behind --enable-admin) | 15 | admin_kms_status, admin_kms_describe_key, admin_kms_key_status, admin_list_kms_keys, admin_get_kms_key, admin_kms_create_key, admin_kms_generate_data_key, admin_kms_delete_key, admin_kms_cancel_key_deletion, admin_kms_enable_key, admin_kms_disable_key, admin_kms_rotate_key, admin_kms_tag_key, admin_kms_untag_key, admin_kms_update_key_description |
| Admin Diagnostics, Plugins & Batch Jobs (RustFS, behind --enable-admin) | 20 | admin_get_cluster_snapshot, admin_start_batch_job, admin_list_batch_jobs, admin_get_batch_job_status, admin_get_batch_job_definition, admin_cancel_batch_job, admin_get_module_switches, admin_set_module_switches, admin_get_extensions_catalog, admin_get_plugins_catalog, admin_list_plugin_instances, admin_add_plugin_instance, admin_remove_plugin_instance, admin_get_gateway_key_inventory, admin_inspect_archive, admin_get_health_info, admin_get_object_data_cache, admin_flush_object_data_cache, admin_get_tls_debug, admin_list_tls_certificates |
rustfs-mcp/
├── src/
│ ├── main.rs # Entry point, CLI parsing, and stdio MCP server startup
│ ├── lib.rs # Library exports and public API
│ ├── config.rs # Configuration management, STS token, and guardrail CLI/env options
│ ├── admin_client.rs # RustFS admin API client (HTTPS-capable transport, SigV4-signed)
│ ├── server/ # MCP protocol layer
│ │ ├── mod.rs # Tool registration (rmcp tool_router) and 217 tool handlers
│ │ ├── guard.rs # Runtime --read-only and --allowed-buckets enforcement
│ │ ├── requests.rs # Tool request payload types (JSON schemas)
│ │ ├── read_mode.rs # get_object read-mode handling
│ │ ├── download_mode.rs # get_object download-mode handling
│ │ ├── format_error.rs # Error formatting with full SDK cause chains
│ │ ├── accelerate.rs # Transfer acceleration response notes
│ │ ├── lifecycle.rs # Readable lifecycle-rule summaries
│ │ ├── object_lock.rs # Object Lock read notes
│ │ ├── ownership_controls.rs # Bucket ownership controls response notes
│ │ ├── policy_status.rs # Bucket policy public-status notes
│ │ ├── public_access_block.rs # Public Access Block summaries and notes
│ │ ├── replication.rs # Readable replication-rule summaries
│ │ ├── request_payment.rs # Request payment backend notes
│ │ ├── restore.rs # Glacier/archive restore notes
│ │ ├── select_content.rs # S3 Select response formatting
│ │ └── shell_quote.rs # Shell-quoted example commands
│ └── s3_client/ # S3 layer: one module per S3 operation/domain
│ ├── mod.rs # Client construction (including STS session tokens) and re-exports
│ ├── fake_s3.rs # Tests only: in-process S3 endpoint with scripted answers
│ ├── copy_source.rs # Shared x-amz-copy-source header builder (copy & part copy)
│ ├── sts.rs # STS AssumeRole and AssumeRoleWithWebIdentity temporary credentials
│ ├── accelerate/ # Bucket Transfer Acceleration configuration
│ ├── acl/ # Bucket and object ACLs (with read-back verification)
│ ├── bucket_admin/ # head_bucket, location, policies, policy status, request payment
│ ├── cors/ # Bucket CORS configuration
│ ├── encryption/ # Default server-side encryption
│ ├── lifecycle/ # Typed lifecycle rules and local validation
│ ├── logging/ # Server access logging
│ ├── multipart_uploads/ # Multipart management and upload_part_copy
│ ├── notification/ # Event notification configurations
│ ├── object_lock/ # Object Lock configuration, retention, legal hold
│ ├── ownership_controls/ # Bucket Ownership Controls configuration
│ ├── public_access_block/ # Bucket Public Access Block configuration
│ ├── replication/ # Typed replication rules and local validation
│ ├── tagging/ # Bucket and object tag sets
│ ├── versioning/ # Versioning state and object versions
│ ├── website/ # Static website configuration
│ └── … # Per-operation files (get_object, restore_object, select_object_content, …)
├── docs/
│ ├── tools.md # Complete parameter reference for all 217 tools
│ └── i18n/ # Localized README & usage guides (8 languages)
├── Dockerfile # Multi-stage root Dockerfile (with optional io-uring)
└── Cargo.toml # Crate metadata, features, and cargo-binstall config
Licensed under the Apache License, Version 2.0 — see the LICENSE file for the full text.
Copyright 2024–2026 RustFS, Inc.
RustFS is a trademark of RustFS, Inc. All other trademarks are the property of their respective owners.
