Skip to main content
Glama

@afomera/s3-mcp

A lightweight MCP server that lets AI coding agents upload files to any S3-compatible bucket and get back public URLs. Works with Cloudflare R2, AWS S3, MinIO, DigitalOcean Spaces, Backblaze B2, Wasabi, and any other S3-compatible provider.

Primary use case: uploading screenshots, images, and other assets during PR reviews, then pasting the URLs into GitHub comments and issues.

Quick Start

Cloudflare R2

claude mcp add s3-mcp \
  -s user \
  -e S3_ENDPOINT=https://<account_id>.r2.cloudflarestorage.com \
  -e S3_ACCESS_KEY_ID=your_key \
  -e S3_SECRET_ACCESS_KEY=your_secret \
  -e S3_BUCKET=my-assets \
  -e S3_PUBLIC_URL=https://assets.example.com \
  -- npx -y @afomera/s3-mcp

AWS S3

claude mcp add s3-mcp \
  -s user \
  -e S3_ENDPOINT=https://s3.us-east-1.amazonaws.com \
  -e S3_REGION=us-east-1 \
  -e S3_ACCESS_KEY_ID=AKIA... \
  -e S3_SECRET_ACCESS_KEY=your_secret \
  -e S3_BUCKET=my-assets \
  -e S3_PUBLIC_URL=https://my-assets.s3.amazonaws.com \
  -- npx -y @afomera/s3-mcp

MinIO (local dev)

claude mcp add s3-mcp \
  -s user \
  -e S3_ENDPOINT=http://localhost:9000 \
  -e S3_REGION=us-east-1 \
  -e S3_ACCESS_KEY_ID=minioadmin \
  -e S3_SECRET_ACCESS_KEY=minioadmin \
  -e S3_BUCKET=dev-assets \
  -e S3_PUBLIC_URL=http://localhost:9000/dev-assets \
  -- npx -y @afomera/s3-mcp

DigitalOcean Spaces

claude mcp add s3-mcp \
  -s user \
  -e S3_ENDPOINT=https://nyc3.digitaloceanspaces.com \
  -e S3_REGION=nyc3 \
  -e S3_ACCESS_KEY_ID=your_key \
  -e S3_SECRET_ACCESS_KEY=your_secret \
  -e S3_BUCKET=my-space \
  -e S3_PUBLIC_URL=https://my-space.nyc3.digitaloceanspaces.com \
  -- npx -y @afomera/s3-mcp

Related MCP server: postward-media-mcp

Team Sharing (.mcp.json)

Add to your project's .mcp.json so the whole team gets the MCP server automatically:

{
  "mcpServers": {
    "s3-mcp": {
      "command": "npx",
      "args": ["-y", "@afomera/s3-mcp"],
      "env": {
        "S3_ENDPOINT": "${S3_ENDPOINT}",
        "S3_ACCESS_KEY_ID": "${S3_ACCESS_KEY_ID}",
        "S3_SECRET_ACCESS_KEY": "${S3_SECRET_ACCESS_KEY}",
        "S3_BUCKET": "${S3_BUCKET}",
        "S3_PUBLIC_URL": "${S3_PUBLIC_URL}"
      }
    }
  }
}

Each team member sets the actual values in their environment.

Environment Variables

Variable

Required

Description

S3_ENDPOINT

Yes

Full endpoint URL for your S3-compatible provider

S3_ACCESS_KEY_ID

Yes

Access key

S3_SECRET_ACCESS_KEY

Yes

Secret key

S3_BUCKET

Yes

Bucket name

S3_PUBLIC_URL

Yes

Public base URL for the bucket

S3_REGION

No

Region (defaults to auto)

S3_PATH_PREFIX

No

Auto-prefix for all keys (e.g. uploads/)

Tools

upload_file

Upload a local file to the bucket and return its public URL.

{ "file_path": "/path/to/screenshot.png" }

Returns: { "url": "https://...", "key": "...", "size": 45230, "content_type": "image/png" }

upload_base64

Upload base64-encoded data directly.

{ "data": "iVBORw0KGgo...", "filename": "screenshot.png" }

upload_from_url

Fetch a file from a URL and upload it to the bucket.

{ "url": "https://ci.example.com/artifacts/screenshot.png" }

list_files

List files in the bucket, optionally filtered by prefix.

{ "prefix": "20250207", "max_results": 20 }

delete_file

Delete a file from the bucket.

{ "key": "20250207-a1b2c3-screenshot.png" }

License

MIT

Available Tools

5 tools
delete_fileC

Delete a file from the S3 bucket

Inputs: key (required).

list_filesB

List files in the S3 bucket, optionally filtered by prefix

Inputs: prefix, max_results.

upload_base64A

Upload base64-encoded data to the S3 bucket and return its public URL

Inputs: data (required), filename (required), key, content_type.

upload_fileA

Upload a local file to the S3 bucket and return its public URL

Inputs: file_path (required), key.

upload_from_urlB

Fetch a file from a URL and upload it to the S3 bucket

Inputs: url (required), key, filename.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct source/action: upload from local file, upload from base64, upload from URL, list, and delete. There is little risk of confusing the upload variants because their input sources are explicit in the names.

    Naming Consistency5/5

    All tools use consistent snake_case with a verb_object pattern: upload_file, upload_base64, upload_from_url, list_files, delete_file. The slight variation in upload_* suffixes reflects meaningful input differences rather than inconsistent naming.

    Tool Count5/5

    Five tools is well-scoped for a focused S3 bucket file-management server. Each tool covers a distinct operation without redundant surface area.

    Completeness3/5

    The surface covers uploads, listing, and deletion, but there is no download/read tool to retrieve an existing file or fetch its metadata/URL. That is a notable gap for an S3 file-management server, though agents can still perform core write/list/delete workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables 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.
      6
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to manage media assets on any S3-compatible storage, including uploads, downloads, tagging, and collections, via presigned URLs.
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Enables LLM and AI agent clients to manage S3-compatible object storage such as MinIO, AWS S3, Aliyun OSS, Cloudflare R2, and Tencent COS through the Model Context Protocol. It provides 19 production-grade tools covering bucket lifecycle, object browsing, search, text and byte-range reads, streaming uploads/downloads, presigned URLs, moves, batch deletion, and tag management, protected by read-only, sandbox, prefix-deletion, and content-truncation guards.
      21
      56 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to manage buckets and files, upload binaries through single-use URLs, create and revoke public links, preview images, and search indexed markdown notes.
      AGPL 3.0