Authenticate using a service account key or Application Default Credentials (ADC); obtain an OAuth2 access token with scope https://www.googleapis.com/auth/devstorage.read_write
Initiate a resumable upload by sending a POST to https://storage.googleapis.com/upload/storage/v1/b/{bucket}/o?uploadType=resumable with the Content-Type header set to the object's MIME type and an X-Goog-Upload-Command: start header; the response Location header contains the session URI
Upload file data in chunks (recommended 8 MiB aligned chunks) by sending PUT requests to the session URI with Content-Range headers specifying byte range and total size; retry any 5xx or network failure from the last committed byte
Finalize the upload by sending the last chunk with Content-Range indicating the final byte; a 200 or 201 response confirms the object is committed
Generate a signed URL for temporary object access using the GCS Signing API or client libraries: specify expiration (max 7 days for service-account-signed V4 URLs), HTTP method, and optionally required headers; sign the canonical request with the service account private key
For short-lived access patterns, prefer V4 signed URLs (signBlob API or client library) and set the Content-Disposition or response-content-type query params to control browser behavior
Known gotchas
Resumable upload sessions expire after 7 days of inactivity — if you pause longer, you must start a new session and re-upload from byte 0
Signed URLs signed with a user account (via gcloud auth) expire when the OAuth token used to sign them rotates; use a dedicated service account for stable long-lived signed URLs
Uniform bucket-level access (Uniform IAM) disables legacy ACLs; if your bucket has it enabled, per-object ACL calls will return 400 errors — manage access at the IAM level instead
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp