Skip to main content
Glama

s3-mcp

一个通用的 S3 协议 MCP 服务器(stdio),可运行于任何 S3 兼容端点之上 — RustFS、MinIO、Cloudflare R2、Backblaze B2、AWS S3 —— 不仅限于 AWS。

单一 Python 包,启动时创建一个 boto3 客户端,配置仅通过环境变量完成。基于官方 mcp SDK(高级服务器 API)和 boto3 构建。

配置(环境变量)

变量

必需

默认值

描述

S3_ENDPOINT_URL

S3 兼容端点;省略以指向真实 AWS

AWS_REGION

us-east-1

用于签名和创建存储桶的区域

AWS_ACCESS_KEY_ID

访问密钥

AWS_SECRET_ACCESS_KEY

秘密访问密钥

S3_PATH_STYLE

true

路径样式寻址(https://host/bucket/key)—— 大多数非 AWS 存储需要

S3_TLS_INSECURE

false

true 时禁用 TLS 证书验证(自签名端点)

布尔值接受 true/false/1/0/yes/no(不区分大小写)。缺少凭据或布尔值无效时,启动会中止并给出清晰错误。

Related MCP server: S3 MCP Server

工具

工具

只读提示

list_buckets()

list_objects(bucket, prefix="", max_keys=1000)

get_object(bucket, key) → 若为 UTF-8 则返回文本,否则返回 {base64, content_type}

stat_object(bucket, key)

presign_get(bucket, key, expires_s=3600)

put_object(bucket, key, body, base64=false)

delete_object(bucket, key)

copy_object(src_bucket, src_key, dst_bucket, dst_key)

create_bucket(bucket)

delete_bucket(bucket)

presign_put(bucket, key, expires_s=3600)

工具错误以简短的 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 标签。

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables interaction with S3-compatible storage services like AWS S3 and Cloudflare R2, supporting bucket management, object listing, reading, uploading, and deletion operations.
    5
    295
    ISC
  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables interaction with AWS S3 through MCP, supporting bucket and object management, lifecycle configurations, tagging, policies, CORS settings, presigned URLs, and file uploads/downloads.
    3
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Provides 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.
    13
    2
  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    4
    MIT

View all related MCP servers

Related MCP Connectors

  • Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.

  • 34 production API tools over one hosted MCP endpoint.

  • Official Sevalla MCP — full PaaS API access through just 2 tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JakePeralta7/s3-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server