R2 Upload MCP Server

R2 Upload MCP Server

r2-upload-mcp-server•byleonho

A Model Context Protocol server that uploads local files to a Cloudflare R2 bucket and returns public URLs.

License: Not specified•Runtime: Awaiting documentation review•Category: cloud devops

WHAT IT DOES

  • •Uploads a local file to the configured R2 bucket via the upload_file tool, with an optional object key and content type.
  • •Automatically detects MIME types for common file extensions and falls back to application/octet-stream for other types.
  • •Returns public URLs for uploaded files, using a custom domain if configured.

BEST FOR

  • •Uploading images, documents, media, and other local files to Cloudflare R2 from an MCP-compatible assistant.
  • •Publishing files to R2 with meaningful object keys such as uploads/my-image.jpg.

ABOUT R2-UPLOAD-MCP-SERVER

R2 Upload MCP Server is cataloged as an MCP server attributed to leonho. A Model Context Protocol server that uploads local files to a Cloudflare R2 bucket and returns public URLs. It is categorized under cloud devops. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for R2 Upload MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What configuration does the server need before it can upload files?

It requires the R2 account ID, access key ID, secret access key, and bucket name as environment variables.

How does the server communicate?

It runs as a stdio MCP server communicating over stdin/stdout.

Upstream README

View this exact version on GitHub

README.md · 06292ef616b4 · Fetched 2026-11-13 11:00:54 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

R2 Upload MCP Server

A Model Context Protocol (MCP) server for uploading files to Cloudflare R2 storage.

Features

  • Upload files to R2 bucket with automatic MIME type detection
  • Support for custom object keys and content types
  • Returns public URLs for uploaded files
  • Environment variable configuration

Installation

cd apps/r2-upload
pnpm install
pnpm build

Configuration

The server automatically configures itself from environment variables. Set the following required environment variables:

Required Environment Variables

  • R2_ACCOUNT_ID: Your Cloudflare account ID
  • R2_ACCESS_KEY_ID: R2 API access key ID
  • R2_SECRET_ACCESS_KEY: R2 API secret access key
  • R2_BUCKET_NAME: Name of your R2 bucket

Optional Environment Variables

  • R2_ENDPOINT: Custom endpoint URL (defaults to https://{accountId}.r2.cloudflarestorage.com)
  • R2_CUSTOM_DOMAIN: Custom domain for public file URLs (defaults to R2 dev domain)

Getting R2 Credentials

  1. Log in to Cloudflare Dashboard
  2. Go to R2 Object Storage
  3. Create an R2 bucket if you haven't already
  4. Go to "Manage R2 API tokens"
  5. Create a new API token with read/write permissions for your bucket
  6. Note down the Access Key ID and Secret Access Key

Tools

upload_file

Upload a file to the configured R2 bucket.

Parameters:

  • filePath (required): Local file path to upload
  • key (optional): Object key/name in the bucket (defaults to filename)
  • contentType (optional): MIME type of the file (auto-detected if not provided)

Usage Example

Once environment variables are configured, you can upload files directly:

{
  "filePath": "/path/to/your/file.jpg",
  "key": "uploads/my-image.jpg"
}

Supported File Types

The server automatically detects MIME types for common file extensions:

  • Images: .jpg, .jpeg, .png, .gif, .webp
  • Documents: .pdf, .txt, .json, .html, .css
  • Scripts: .js
  • Videos: .mp4, .mov, .avi
  • Audio: .mp3, .wav

For other file types, it defaults to application/octet-stream or you can specify a custom contentType.

MCP Configuration

Add this to your mcp.json configuration file:

{
  "mcpServers": {
    "r2-upload": {
      "command": "node",
      "args": ["./apps/r2-upload/dist/index.js"],
      "env": {
        "R2_ACCOUNT_ID": "your-cloudflare-account-id",
        "R2_ACCESS_KEY_ID": "your-r2-access-key-id", 
        "R2_SECRET_ACCESS_KEY": "your-r2-secret-access-key",
        "R2_BUCKET_NAME": "your-bucket-name",
        "R2_ENDPOINT": "https://your-account-id.r2.cloudflarestorage.com",
        "R2_CUSTOM_DOMAIN": "files.yourdomain.com"
      }
    }
  }
}

Environment Variables

Configure the server by setting these environment variables in your MCP configuration. If all required environment variables are set, the server will be ready to upload files immediately.

Custom Domain Setup

If you have a custom domain configured for your R2 bucket (e.g., files.yourdomain.com), set the R2_CUSTOM_DOMAIN environment variable. The server will return public URLs using your custom domain instead of the default R2 development domain.

Running the Server

# Build first
pnpm build

# Run standalone
pnpm start

The server runs as a stdio MCP server and communicates via stdin/stdout.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for R2 Upload MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/r2-upload-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related cloud devops MCP Servers

Alternative and complementary servers in the same category

View all in cloud devops →
Huawei MCP Server
mcp-server-huaweiclouddeveloper•huaweiclouddeveloper

A Model Context Protocol server built on Huawei Cloud services that enables AI assistants to operate Huawei Cloud resources within conversational workflows, supporting ECS, OBS, GaussDB, and other cloud products.

Repository stats unavailable
Cloud & DevOps
Coolify MCP Server
coolify-mcp-server•wrediam

An MCP server that exposes the Coolify v4.3.1 REST API so AI clients can manage applications, databases, services, servers, deployments, and more.

Repository stats unavailable
Cloud & DevOps

A deprecated Model Context Protocol server for interacting with Kong Konnect APIs, enabling AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.

Repository stats unavailable
Cloud & DevOps