upload_file
Upload local files to Cloudflare R2 with customizable destination keys and content types. Returns a public or presigned download URL.
Instructions
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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the local file on the MCP host | |
| key | No | Destination key in the bucket (e.g. vitalo/2.1.0/app-release.apk). Default: file basename | |
| prefix | No | Key prefix override (without global R2_KEY_PREFIX) | |
| contentType | No | Explicit MIME type; inferred from extension if omitted |