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 Worker’s /mcp endpoint is the single connection point for all MCP clients. When AUTH_MODE=github is set, clients use the OAuth routes the Worker exposes to complete a GitHub login before accessing any tools. This page covers setup for ChatGPT, MCP Inspector, and any generic MCP-compatible client.

Endpoint URLs

Use the appropriate endpoint depending on whether you are connecting to a deployed Worker or a local development server:
Remote: https://<worker-url>/mcp
Local:  http://localhost:8787/mcp
With AUTH_MODE=github, the Worker also exposes the following OAuth routes that clients and browsers use during the authorization flow:
/authorize
/token
/register
/callback
The browser login during OAuth must use a GitHub account that is listed in the ALLOWED_GITHUB_LOGINS environment variable.

ChatGPT

1

Open ChatGPT settings

Navigate to Settings in ChatGPT.
2

Go to Connectors or Apps & Connectors

Select the Connectors or Apps & Connectors section from the settings menu.
3

Enable Developer Mode if required

If the connector options are not visible, enable Developer Mode first.
4

Create a custom connector

Select Add connector or Create custom connector, then choose MCP or Remote MCP connector as the connector type.
5

Set the connector URL

Enter the Worker’s MCP endpoint as the URL:
https://<worker-url>/mcp
6

Choose OAuth authentication

Select OAuth as the authentication method for the connector.
7

Save the connector

Click Save or Create to register the connector.
8

Start the connection flow

Initiate the connection and approve the GitHub OAuth login in the browser window that opens.
9

Refresh or list tools/actions

Once connected, refresh the tool or action list to confirm the R2 tools are visible.
Write and modify tools such as r2_object_put, r2_object_delete, and r2_object_move may require explicit confirmation from the user before ChatGPT executes them.

MCP Inspector

MCP Inspector is the fastest way to validate a connection and inspect the tool list interactively. Run the inspector with:
npx @modelcontextprotocol/inspector@latest
Connect to the Worker endpoint in the Inspector UI:
https://<worker-url>/mcp
Expected behavior with AUTH_MODE=github:
  • The OAuth flow opens in a browser tab automatically.
  • You complete the GitHub login.
  • The Inspector receives the access token and connects.
  • The tools/list tab shows all enabled tools.

Generic MCP Client

Any client that supports remote MCP over streamable HTTP can connect to the Worker. Configure the client with:
endpoint = https://<worker-url>/mcp
auth = OAuth
For local development with AUTH_MODE=none, no authentication is required:
endpoint = http://localhost:8787/mcp
auth = none

What tools/list Confirms

A successful tools/list response proves three things:
  • The client reached /mcp and the Worker responded.
  • Authentication completed successfully (when AUTH_MODE=github is enabled).
  • The Worker registered its tools without errors on startup.
tools/list does not prove that every tool can successfully reach the R2 bucket. A Worker can register tools even when the bucket binding is misconfigured. Use the /healthz endpoint to verify bucket accessibility separately.

Build docs developers (and LLMs) love