Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/XxYouDeaDPunKxX/cloudflare-r2-remote-mcp-worker/llms.txt

Use this file to discover all available pages before exploring further.

The Cloudflare R2 Remote MCP Worker organizes its tools into three distinct surfaces, each backed by a different credential type. The Worker R2 binding surface is always active and covers every object CRUD and binary transfer operation against the bucket bound to the Worker. Two additional surfaces — read-only Cloudflare API admin tools and S3-compatible presigned URL tools — are disabled by default and must be opted in through environment variables.

Tool surfaces

SurfaceToolsRequired credentials
Worker R2 bindingObject CRUD and base64 transfer toolsR2_BUCKET Workers binding
Cloudflare APIRead-only account and admin tools (optional)CLOUDFLARE_API_TOKEN
S3-compatible APIPresigned URL tools (optional)R2_ACCESS_KEY_ID + R2_SECRET_ACCESS_KEY

Default-enabled tools

The following 12 tools register automatically on every deployment. No extra configuration is required beyond the R2_BUCKET binding.

Object tools

ToolTypeEffect
r2_object_listreadLists objects and delimited prefixes under the configured root prefix
r2_object_headreadReturns object metadata without returning the body
r2_object_getreadReturns UTF-8 text for text-like objects, bounded by MAX_INLINE_TEXT_BYTES
r2_object_putwriteWrites UTF-8 text to one object; supports conditional overwrite via expectedEtag
r2_object_put_if_absentwriteCreates a text object only when the key does not already exist
r2_object_deletedestructiveDeletes one object; requires confirm: true
r2_object_delete_manydestructiveDeletes multiple objects; requires confirm: true, supports dryRun
r2_object_copywriteCopies one object by read plus write; not atomic
r2_object_movedestructiveCopies then deletes source; not atomic; requires confirm: true, supports dryRun
r2_object_renamedestructiveMoves an object to a new basename; not atomic; requires confirm: true, supports dryRun

Transfer tools

ToolTypeEffect
r2_upload_base64writeUploads a base64-encoded payload to one R2 object
r2_download_base64readReturns object bytes as base64 plus metadata, bounded by MAX_TRANSFER_BYTES

Enabling optional tools

Cloudflare API admin tools

Set ENABLE_ACCOUNT_TOOLS=true in your Worker environment to register the 10 read-only admin tools. These tools call the Cloudflare REST API and require CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID to be present.
ENABLE_ACCOUNT_TOOLS=true
CLOUDFLARE_ACCOUNT_ID=<your-account-id>
CLOUDFLARE_API_TOKEN=<token-with-r2-read-permissions>
No account-level create, update, or delete operations are included in this surface.

S3-compatible presign tools

Set ENABLE_PRESIGN_TOOLS=true to register r2_presign_get and r2_presign_put. These tools generate time-limited signed URLs against R2’s S3-compatible endpoint and require S3-compatible credentials.
ENABLE_PRESIGN_TOOLS=true
R2_ACCESS_KEY_ID=<your-r2-access-key-id>
R2_SECRET_ACCESS_KEY=<your-r2-secret-access-key>
The endpoint defaults to https://<CLOUDFLARE_ACCOUNT_ID>.r2.cloudflarestorage.com. Override it with R2_S3_ENDPOINT if needed. The region defaults to auto and can be overridden with R2_S3_REGION.

Object key scoping with R2_ROOT_PREFIX

When R2_ROOT_PREFIX is set, all object tools scope keys under that prefix transparently. A tool call using key notes/example.txt maps to the actual R2 key <R2_ROOT_PREFIX>/notes/example.txt in the bucket. Responses always return keys in their relative (un-prefixed) form, so callers never need to be aware of the prefix.
R2_ROOT_PREFIX=project-a/data
With this configuration, r2_object_list with prefix: "notes/" will list only objects under project-a/data/notes/ in the underlying bucket.

Tool annotations

Every tool declares MCP annotations that describe its side-effect profile to MCP clients.
AnnotationMeaning
readOnlyHint: trueThe tool never modifies R2 state
destructiveHint: trueThe tool may permanently delete data
idempotentHint: trueCalling the tool multiple times with the same inputs produces the same result
Clients and orchestrators may use these hints to present additional confirmation prompts or to restrict which tools are permitted in automated pipelines.

Explore by surface

Object Tools

All 10 CRUD tools for listing, reading, writing, copying, moving, and deleting objects.

Transfer Tools

Base64 upload and download tools for binary objects bounded by MAX_TRANSFER_BYTES.

Presign Tools

Generate time-limited GET and PUT signed URLs via the S3-compatible API.

Admin Tools

Read-only Cloudflare API tools for bucket metadata, CORS, lifecycle, domains, and metrics.

Build docs developers (and LLMs) love