R2 Bucket MCP
Allows uploading, downloading, listing, and deleting files on Cloudflare R2 buckets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@R2 Bucket MCP upload vitalo APK v2.1.0"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
r2-bucket-mcp
Servidor MCP stdio para Cursor y otros clientes MCP. Sube archivos locales a Cloudflare R2 (S3-compatible) sin ejecutar scripts shell. Pensado para APKs de proyectos (vitalo, linkbox, nestle, …) y cualquier otro archivo.
Qué hace
Expone cinco tools MCP:
Tool | Uso |
| APKs con key |
| Cualquier archivo con key opcional |
| Descargar por key (URL o guardar local) |
| Listar objetos por prefijo |
| Borrar objeto por key |
La respuesta incluye downloadUrl (URL pública CDN si R2_PUBLIC_BASE_URL está configurada, o presigned URL temporal).
Related MCP server: Backblaze B2 MCP Server
Instalación
cd /Users/samuelgerardocastrolopez/Desktop/r2-bucket-mcp
npm installCredenciales R2
Usa las mismas variables que opencode_whatsapp/.env (sin copiar secretos al repo):
Abre
opencode_whatsapp/.enven tu máquina.Copia los valores de
R2_ACCESS_KEY_ID,R2_SECRET_ACCESS_KEY,R2_BUCKET,R2_ENDPOINT(oR2_ACCOUNT_ID), y opcionalmenteR2_PUBLIC_BASE_URL.Para pruebas locales, crea
.enven este repo desde.env.example(nunca lo commitees).
Variable | Requerida | Descripción |
| sí | Access key R2 |
| sí | Secret key R2 |
| sí | Bucket (default: |
| sí* | Endpoint S3-compatible |
| sí* | Alternativa a endpoint explícito |
| no | Prefijo global opcional |
| no | CDN pública; si falta, presigned URL |
| no | Default: 604800 (7 días) |
| no | Límite validación MCP (default: 500 MB) |
* Al menos uno de R2_ENDPOINT o R2_ACCOUNT_ID.
Prueba manual
Arranque stdio (proceso queda esperando; Ctrl+C para salir):
node index.js
# stderr: [r2-bucket-mcp] ready (stdio)Smoke test con credenciales en .env local (sube un .smoke-test.txt temporal):
npm run smokeRegistrar en Cursor
Settings → MCP o edita ~/.cursor/mcp.json.
Usa la ruta absoluta de node (which node). Ejemplo:
{
"mcpServers": {
"r2-bucket": {
"type": "stdio",
"command": "/Users/samuelgerardocastrolopez/.nvm/versions/node/v22.17.0/bin/node",
"args": [
"/Users/samuelgerardocastrolopez/Desktop/r2-bucket-mcp/index.js"
],
"env": {
"R2_ACCESS_KEY_ID": "PEGAR_ACCESS_KEY",
"R2_SECRET_ACCESS_KEY": "PEGAR_SECRET_KEY",
"R2_BUCKET": "apks",
"R2_ENDPOINT": "https://<account-id>.r2.cloudflarestorage.com",
"R2_PUBLIC_BASE_URL": "https://cdn.tudominio.com"
}
}
}
}Reinicia Cursor o recarga servidores MCP tras cambiar mcp.json.
Uso desde agentes
APKs: preferir
upload_apkconproject,versionyfilePathabsoluto.Otros archivos:
upload_fileconfilePathy opcionalmentekey,prefix,contentType.Listar:
list_filesconprefixopcional (ej.vitalo/).Descargar:
get_fileconkey; opcionalfilePathabsoluto para guardar en disco.Borrar:
delete_fileconkeycompleta (ej.vitalo/2.1.0/app-release.apk).
Ejemplo de key generada por upload_apk:
vitalo/2.1.0/app-release.apkRespuesta JSON (campo principal para compartir el enlace):
{
"ok": true,
"bucket": "apks",
"key": "vitalo/2.1.0/app-release.apk",
"size": 12345678,
"contentType": "application/vnd.android.package-archive",
"downloadUrl": "https://cdn.tudominio.com/vitalo/2.1.0/app-release.apk",
"publicUrl": "https://cdn.tudominio.com/vitalo/2.1.0/app-release.apk",
"presignedUrl": null
}Si no hay R2_PUBLIC_BASE_URL, downloadUrl será una presigned URL y publicUrl será null.
Integración SDK
Con un agente SDK local y settingSources: ['user'], el agente carga el mismo MCP definido en ~/.cursor/mcp.json. También puedes pasar mcpServers inline en la config del agente con las mismas credenciales en env.
Tools
upload_file
Parámetro | Requerido | Descripción |
| sí | Ruta absoluta al archivo local |
| no | Clave en el bucket (default: basename) |
| no | Prefijo override (sin |
| no | MIME explícito |
upload_apk
Parámetro | Requerido | Descripción |
| sí | Ruta absoluta al APK |
| sí | Alias ( |
| sí | Versión ( |
| no | Default: |
get_file
Parámetro | Requerido | Descripción |
| sí | Clave del objeto (ej. |
| no | Ruta absoluta local para guardar; sin ella solo devuelve URLs |
list_files
Parámetro | Requerido | Descripción |
| no | Filtro de prefijo (ej. |
| no | Máximo por página (default: 100, max: 1000) |
| no | Token de paginación de una respuesta anterior |
delete_file
Parámetro | Requerido | Descripción |
| sí | Clave del objeto (ej. |
Available Tools
5 toolsdelete_fileA
Delete an object from R2 by key (e.g. vitalo/2.1.0/app-release.apk). Global R2_KEY_PREFIX is applied automatically if configured.
Inputs: key (required).
get_fileA
Get/download an object from R2 by key. Returns downloadUrl (public CDN or presigned). Optionally saves to a local filePath on the MCP host. Global R2_KEY_PREFIX is applied if configured.
Inputs: key (required), filePath.
list_filesA
List objects in the R2 bucket. Optional prefix filters keys (e.g. vitalo/ or vitalo/2.1.0/). Combines with global R2_KEY_PREFIX if set. Use continuationToken to paginate.
Inputs: prefix, maxKeys, continuationToken.
upload_apkA
Upload an Android APK to R2 using the convention {project}/{version}/{filename}. Prefer this tool for APK releases (vitalo, linkbox, nestle, diageo, contador, …).
Inputs: filePath (required), project (required), version (required), filename.
upload_fileB
Upload a local file to Cloudflare R2. filePath must be an absolute path on the host where this MCP runs. Returns downloadUrl (public CDN URL if R2_PUBLIC_BASE_URL is set, otherwise a presigned URL).
Inputs: filePath (required), key, prefix, contentType.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: delete, get, list, upload specifically for APKs, and general upload. No ambiguity between operations.
All tool names follow a consistent verb_noun pattern in snake_case (delete_file, get_file, list_files, upload_apk, upload_file).
Five tools cover the essential CRUD operations for interacting with an R2 bucket: get, delete, list, upload general, and upload for APKs. This is well-scoped.
The tool set covers the core lifecycle for objects in a bucket: listing, retrieving, deleting, and uploading (with a specialized variant for APKs). No obvious gaps for the stated purpose.
Maintenance
Related MCP Connectors
Browse, upload, download, copy, move and share files in your own S3-compatible buckets.
Browse, upload, download, and share files in your S3-compatible buckets with delegated roles.
Transfer and sync files between 19 cloud storages (Yandex, Google, VK, Telegram, S3)
Persistent file storage for AI agents via MCP and curl. Upload, download, and version files.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables interaction with S3-compatible storage services like AWS S3 and Cloudflare R2, supporting bucket management, object listing, reading, uploading, and deletion operations.515 npmISC
- AlicenseNot gradedqualityDmaintenanceEnables seamless integration with Backblaze B2 cloud storage for managing buckets, uploading/downloading files, handling large multipart uploads, and managing application keys through natural language interactions.17 npm2MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with AWS S3 storage through bucket operations (create, delete, list), object management (upload, download, delete, list), and bucket policy configuration using AWS credentials.17 npm2MIT
- FlicenseAqualityDmaintenanceProvides 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.132-