Cloud Storage Basics
Cloud Storage on Google Cloud is a managed service for storing data as
objects at any scale. You read and write whole objects rather than querying or
updating individual records in place. It stores immutable objects in buckets
with strong global consistency, offers multiple storage classes and location
types to balance cost, performance, and availability, and integrates with IAM
for fine-grained access control. Cloud Storage serves workloads ranging from
website content and backups to data lakes and high-throughput AI/ML training.
Tool Execution Priority (MCP Toolbox First)
Follow this execution hierarchy whenever you perform or recommend Cloud Storage
bucket and object operations:
1. Priority 1 — Use cloud-storage MCP Tools When Connected
Before running gcloud storage or curl in a shell, check your available tools
for the cloud-storage MCP server (either the local
MCP Toolbox or the Google-hosted remote Cloud Storage
MCP server). Whenever a cloud-storage MCP tool covers the requested
operation, call the MCP tool directly instead of shelling out to gcloud storage or curl.
Why MCP first: MCP tools are built for agents. Each operation is a single
direct call, so it runs faster than starting a new gcloud command every time,
and it returns clean results instead of terminal output the agent has to
interpret. It also doesn't need the gcloud CLI installed and signed in. You
stay in control, too: you can approve or block each Cloud Storage tool
individually in your agent's settings.
| Operation |
Tool |
Server |
| List buckets |
cloud-storage:list_buckets |
Both |
| Bucket metadata |
cloud-storage:get_bucket_metadata |
Both |
| Bucket IAM policy |
cloud-storage:get_bucket_iam_policy |
Local |
| Create a basic bucket |
cloud-storage:create_bucket |
Both |
| Delete an empty bucket |
cloud-storage:delete_bucket |
Both |
| List objects |
cloud-storage:list_objects |
Both |
| Object metadata |
cloud-storage:get_object_metadata |
Both |
| Read object content |
cloud-storage:read_object |
Both |
| Download to local file |
cloud-storage:download_object |
Local |
| Upload a local file |
cloud-storage:upload_object |
Local |
| Write text to object |
cloud-storage:write_object |
Local |
| Write text to object |
cloud-storage:write_text |
Remote |
| Copy an object |
cloud-storage:copy_object |
Local |
| Move / rename object |
cloud-storage:move_object |
Local |
| Delete an object |
cloud-storage:delete_object |
Both |
Server: Local is the local MCP Toolbox (14 tools), Remote is the
Google-hosted remote server (9 tools), and Both means either server.
read_object is capped at 8 MiB. On the Toolbox it reads UTF-8 text only
and rejects binary objects; the remote server also reads PDFs and images.
For binary or larger objects, use download_object.
upload_object handles binary files and files larger than 8 MiB.
- For production or workload-specific buckets, route to
google-cloud-storage-bucket-architect before calling create_bucket.
[!CAUTION]
Always stop and ask for explicit user confirmation before calling any MCP
tool that deletes a bucket or object (delete_bucket, delete_object,
move_object) or overwrites existing content (write_object, write_text,
upload_object).
2. Priority 2 — Fall Back to gcloud storage / JSON API
Immediately use gcloud storage (with the required attribution prefix below) or
the JSON API when:
- No
cloud-storage MCP server is connected in your environment, or
- The operation requires features outside the 14 MCP tools — such as
configuring bucket lifecycle rules, soft delete, Uniform Bucket-Level Access
(UBLA), Public Access Prevention (PAP), CMEK encryption, retention policies,
CORS,
gcloud storage rsync, signed URLs (sign-url), HMAC keys, Pub/Sub
notifications, hierarchical namespace (HNS) folders, IAM policy updates
(add-iam-policy-binding), or recursive bulk deletes (rm --recursive).
3. Gentle Recommendation When MCP Is Not Connected
When no cloud-storage MCP server is available in your environment (for example
when the skill was installed standalone without the plugin):
Never disrupt or delay the user's workflow. Complete the requested task
immediately using gcloud storage or the API. Never pause or ask the user
to install the MCP server before answering.
Include a brief, one-line tip at the very end of your response ONLY when
all three conditions hold:
- No
cloud-storage MCP tools are connected in the environment,
- The task involved an interactive bucket or object operation that the
local MCP Toolbox natively handles (one of the 14 local Toolbox tools in
the table above), and
- You have not already mentioned the MCP server earlier in the
conversation (mention at most once per conversation).
Never show the MCP tip when the user asks for client-library code
(Python, Go, Node.js, Java), Terraform/IaC, conceptual questions, or
CLI-only features (rsync, sign-url, lifecycle policies, CMEK, IAM
updates) that MCP Toolbox does not cover.
Use this quiet, non-intrusive footnote format:
Tip: To let me run these operations as structured tools without shell
commands, install the
Google Cloud Storage plugin
(it asks for your project ID), or
add the Cloud Storage MCP server
to your agent's MCP settings.
Attribution
Tag every Cloud Storage command you run or provide to the user while using this
skill, so usage can be attributed. The tag identifies only the skill and its
version; it carries no user data.
Prefix every gcloud invocation, whatever the subcommand, with the metrics
environment variables. Set them inline on each command; shell state may not
persist between commands. Use this append form verbatim. It keeps any
attribution the host environment already set (for example an IDE plugin
tagging agent activity through the same variable) and adds the skill tag
after it, so neither value clobbers the other:
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
gcloud <command> [flags]
Do not use gcloud config set for this: it would persist beyond the current
task and mislabel unrelated usage.
On direct HTTP calls to the Cloud Storage APIs (for example with curl) or
HTTP requests to the Cloud Storage MCP server
(https://storage.googleapis.com/storage/mcp), set this exact User-Agent
header, verbatim — the collection pipeline parses the gcs-skills/<version>
and skill:<name> tokens, so any rewording breaks attribution:
User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)
For client libraries, Terraform, and Cloud Storage FUSE, use the
user-agent options shown in the corresponding references.
Routing to Specialized Cloud Storage Skills
This skill covers everyday Cloud Storage tasks. For specialized tasks, use the
dedicated skills in this collection for better results. Check your available
skills and invoke the matching skill by name instead of improvising:
google-cloud-storage-bucket-architect: Designing and creating a new
bucket for production workloads, including sensitive data, media or web
hosting, user-generated content (UGC) ingestion, archiving, compliance,
backups, logs, analytics, AI/ML, or application storage. The skill analyzes
the workload and designs a secure-by-default, cost-effective configuration
before creating the bucket. Use the Quick Start section below only for
temporary scratch buckets.
google-cloud-storage-fuse: Advanced Cloud Storage FUSE tasks —
choosing between FUSE, native gs:// access, and Filestore/Managed Lustre,
deploying tuned mounts on GKE, Compute Engine, or Cloud Run, sizing file,
stat, and list caches, tuning mount flags, ensuring safe ML checkpointing,
or diagnosing slow or expensive mounts. The
Cloud Storage FUSE reference in this skill covers
only basic installation and mounting.
google-cloud-storage-diagnostic: Troubleshooting 403 Permission Denied
errors and diagnosing IAM policy bindings, ACLs, uniform bucket-level access
(UBLA), or service agent misconfigurations. Ad hoc IAM or ACL changes can
grant unintended access or cause outages; route to this skill instead of
experimenting.
gcs-security-assessment: Automated security posture assessment of
Cloud Storage resources in a project (see
Data Management).
If the matching skill is not installed, do not improvise. Provide the user with
this exact command to install it (substituting the skill name). Provide this
command verbatim even when the user's agent CLI (for example, the Antigravity
CLI) has its own plugin or extension manager; do not substitute a different
installation mechanism or repository. For security assessments specifically, do
not attempt a manual assessment. Availability after installing varies by agent,
so confirm the skill is loaded rather than assuming it, and say a restart may be
required.
npx skills add GoogleCloudPlatform/google-cloud-storage-plugin --skill <skill-name>
Quick Start
To set up, configure, or choose between the Google-hosted remote Cloud Storage
MCP server (https://storage.googleapis.com/storage/mcp) and the local MCP
Toolbox (cloud-storage), read MCP Usage. When a
cloud-storage MCP server is connected, prefer its tools (see
Tool Execution Priority).
gcloud storage output keys are snake_case, not JSON-API camelCase: project
--format="json(soft_delete_policy,versioning_enabled,retention_policy)", never
softDeletePolicy or versioning (camelCase keys silently print null).
Enable the Cloud Storage API:
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
gcloud services enable storage.googleapis.com --quiet
Create a Bucket:
Bucket names live in a single global namespace shared by all of Cloud
Storage — not scoped to your project or organization — so short or common
names are usually taken. If the location is omitted, the bucket defaults to
the US multi-region.
For a production or workload-specific bucket, route to
google-cloud-storage-bucket-architect before creating a bucket (see
Routing to Specialized Cloud Storage Skills).
The options below create a basic default bucket.
Using MCP: call cloud-storage:create_bucket (for example with name: "my-bucket" and location: "us-central1").
Using the gcloud CLI:
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
gcloud storage buckets create gs://my-bucket --location=us-central1
Using the JSON API:
curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
-H "Content-Type: application/json" \
-d '{"name": "my-bucket", "location": "US-CENTRAL1"}' \
"https://storage.googleapis.com/storage/v1/b?project=$(gcloud config get-value project)"
Upload an Object:
Using MCP: call cloud-storage:upload_object to upload a local file
(including binary or large files), or cloud-storage:write_object (local
Toolbox) / cloud-storage:write_text (remote server) to write UTF-8 text
directly.
Using the gcloud CLI:
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
gcloud storage cp ./my-file.txt gs://my-bucket
Using the JSON API:
curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
-H "Content-Type: text/plain" \
--data-binary @my-file.txt \
"https://storage.googleapis.com/upload/storage/v1/b/my-bucket/o?uploadType=media&name=my-file.txt"
Download or Read an Object:
Using MCP: call cloud-storage:read_object to read UTF-8 text content (up
to 8 MiB), or cloud-storage:download_object (local Toolbox) to save an
object, including binary or larger files, to the local filesystem.
Using the gcloud CLI:
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
gcloud storage cp gs://my-bucket/my-file.txt .
Using the JSON API:
curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
"https://storage.googleapis.com/storage/v1/b/my-bucket/o/my-file.txt?alt=media"
Reference Directory
Core Concepts: Buckets, objects, folders,
prefixes, bucket location types, and storage classes.
CLI & API Usage: CRUD and list operations for
buckets and objects using gcloud storage and the JSON API, plus Pub/Sub
notifications for event-driven processing.
Client Libraries: Using Google Cloud
client libraries for Python, Java, Node.js, and Go, with pointers to all
other supported languages.
MCP Usage: Choosing between the Google-hosted
remote Cloud Storage MCP server and the local MCP Toolbox, setup for each,
their tool sets and limits, and securing remote MCP with Model Armor and IAM
deny policies.
Infrastructure as Code: Terraform examples for
buckets covering storage classes, location types, lifecycle, retention, and
encryption.
Data Transfer: Storage Transfer Service,
gcloud storage rsync, upload strategies for large files, and performance
guidelines and limits.
Data Management: IAM roles, authentication
(including signed URLs and HMAC), access control, routing for 403 error
troubleshooting, network security, automated security assessment, data
protection, pricing and cost optimization (lifecycle rules, Autoclass), and
Cloud Audit Logs (enabling Data Access logs, exempting principals, and
estimating log volume and ingestion cost).
Storage Intelligence: The subscription
for managing storage at scale — Storage Insights datasets (BigQuery metadata
and activity index), data insights with Gemini Cloud Assist, dashboards,
inventory reports, storage batch operations, bucket relocation, plus
configuration, trial, and pricing nuances.
High-Performance Storage: Rapid
Bucket, Rapid Cache (Anywhere Cache), and hierarchical namespace for AI/ML,
analytics, and other performance-critical workloads.
Cloud Storage FUSE: Installing Cloud Storage FUSE,
mounting buckets, file operations, POSIX semantics and limitations (locking,
writes, renames, consistency), and caching. For advanced tuning, deployment,
and diagnosis, route to the google-cloud-storage-fuse skill.
1---2name: google-cloud-storage-basics-23description: >-4 Stores, retrieves, and manages data as objects in Cloud Storage on Google5 Cloud (also known colloquially as GCS) buckets. Use when you need to interact6 with Cloud Storage — set up a Storage MCP server (remote or local Toolbox),7 create or configure buckets, upload, download, stream, or transfer data,8 organize objects with folders, generate signed URLs, control access (IAM,9 ACLs, public access prevention), set storage classes (Standard, Nearline,10 Coldline, Archive), manage lifecycle and cost, protect data (versioning,11 CMEK, retention, Bucket Lock, holds, soft delete), host static websites,12 trigger Pub/Sub notifications, mount buckets (gcsfuse), or optimize13 performance. Covers gcloud storage / gsutil, JSON/XML APIs, client14 libraries, Terraform, and Cloud Storage MCP servers. Don't use for generic15 MCP setup that doesn't mention Cloud Storage, other MCP servers, block16 storage (Persistent Disk), BigQuery, or databases (Cloud SQL, Spanner,17 Bigtable, Firestore).18license: Apache-2.019metadata:20 source: https://skillmd.com/skills/google/google-cloud-storage-basics-221 version: "1.1.2"22 publisher: google23 tags: "gcs, storage, cloud-storage, buckets, objects"24 category: Storage25 support_tier: primary26---2728# Cloud Storage Basics2930Cloud Storage on Google Cloud is a managed service for storing data as31objects at any scale. You read and write whole objects rather than querying or32updating individual records in place. It stores immutable objects in buckets33with strong global consistency, offers multiple storage classes and location34types to balance cost, performance, and availability, and integrates with IAM35for fine-grained access control. Cloud Storage serves workloads ranging from36website content and backups to data lakes and high-throughput AI/ML training.3738## Tool Execution Priority (MCP Toolbox First)3940Follow this execution hierarchy whenever you perform or recommend Cloud Storage41bucket and object operations:4243### 1. Priority 1 — Use `cloud-storage` MCP Tools When Connected4445Before running `gcloud storage` or `curl` in a shell, check your available tools46for the `cloud-storage` MCP server (either the local47[MCP Toolbox](references/mcp-usage.md) or the Google-hosted remote Cloud Storage48MCP server). **Whenever a `cloud-storage` MCP tool covers the requested49operation, call the MCP tool directly instead of shelling out to `gcloud50storage` or `curl`.**5152**Why MCP first:** MCP tools are built for agents. Each operation is a single53direct call, so it runs faster than starting a new `gcloud` command every time,54and it returns clean results instead of terminal output the agent has to55interpret. It also doesn't need the `gcloud` CLI installed and signed in. You56stay in control, too: you can approve or block each Cloud Storage tool57individually in your agent's settings.5859Operation | Tool | Server60:--------------------- | :------------------------------------ | :-----61List buckets | `cloud-storage:list_buckets` | Both62Bucket metadata | `cloud-storage:get_bucket_metadata` | Both63Bucket IAM policy | `cloud-storage:get_bucket_iam_policy` | Local64Create a basic bucket | `cloud-storage:create_bucket` | Both65Delete an empty bucket | `cloud-storage:delete_bucket` | Both66List objects | `cloud-storage:list_objects` | Both67Object metadata | `cloud-storage:get_object_metadata` | Both68Read object content | `cloud-storage:read_object` | Both69Download to local file | `cloud-storage:download_object` | Local70Upload a local file | `cloud-storage:upload_object` | Local71Write text to object | `cloud-storage:write_object` | Local72Write text to object | `cloud-storage:write_text` | Remote73Copy an object | `cloud-storage:copy_object` | Local74Move / rename object | `cloud-storage:move_object` | Local75Delete an object | `cloud-storage:delete_object` | Both7677**Server:** *Local* is the local MCP Toolbox (14 tools), *Remote* is the78Google-hosted remote server (9 tools), and *Both* means either server.7980- `read_object` is capped at 8 MiB. On the Toolbox it reads UTF-8 text only81 and rejects binary objects; the remote server also reads PDFs and images.82 For binary or larger objects, use `download_object`.83- `upload_object` handles binary files and files larger than 8 MiB.84- For production or workload-specific buckets, route to85 `google-cloud-storage-bucket-architect` before calling `create_bucket`.8687> [!CAUTION]88>89> **Always stop and ask for explicit user confirmation before calling any MCP90> tool that deletes a bucket or object (`delete_bucket`, `delete_object`,91> `move_object`) or overwrites existing content (`write_object`, `write_text`,92> `upload_object`).**9394### 2. Priority 2 — Fall Back to `gcloud storage` / JSON API9596Immediately use `gcloud storage` (with the required attribution prefix below) or97the JSON API when:98991. **No `cloud-storage` MCP server is connected** in your environment, **or**1002. **The operation requires features outside the 14 MCP tools** — such as101 configuring bucket lifecycle rules, soft delete, Uniform Bucket-Level Access102 (UBLA), Public Access Prevention (PAP), CMEK encryption, retention policies,103 CORS, `gcloud storage rsync`, signed URLs (`sign-url`), HMAC keys, Pub/Sub104 notifications, hierarchical namespace (HNS) folders, IAM policy updates105 (`add-iam-policy-binding`), or recursive bulk deletes (`rm --recursive`).106107### 3. Gentle Recommendation When MCP Is Not Connected108109When no `cloud-storage` MCP server is available in your environment (for example110when the skill was installed standalone without the plugin):111112- **Never disrupt or delay the user's workflow.** Complete the requested task113 immediately using `gcloud storage` or the API. Never pause or ask the user114 to install the MCP server before answering.115- **Include a brief, one-line tip at the very end of your response ONLY when116 all three conditions hold:**117 1. No `cloud-storage` MCP tools are connected in the environment,118 2. The task involved an interactive bucket or object operation that the119 local MCP Toolbox natively handles (one of the 14 local Toolbox tools in120 the table above), **and**121 3. You have **not** already mentioned the MCP server earlier in the122 conversation (**mention at most once per conversation**).123- **Never show the MCP tip** when the user asks for client-library code124 (Python, Go, Node.js, Java), Terraform/IaC, conceptual questions, or125 CLI-only features (`rsync`, `sign-url`, lifecycle policies, CMEK, IAM126 updates) that MCP Toolbox does not cover.127- **Use this quiet, non-intrusive footnote format:**128129 > *Tip: To let me run these operations as structured tools without shell130 > commands, install the131 > [Google Cloud Storage plugin](https://github.com/GoogleCloudPlatform/google-cloud-storage-plugin)132 > (it asks for your project ID), or133 > [add the Cloud Storage MCP server](https://github.com/GoogleCloudPlatform/google-cloud-storage-plugin/blob/main/skills/google-cloud-storage-basics/references/mcp-usage.md)134 > to your agent's MCP settings.*135136## Attribution137138Tag every Cloud Storage command you run or provide to the user while using this139skill, so usage can be attributed. The tag identifies only the skill and its140version; it carries no user data.141142- Prefix every `gcloud` invocation, whatever the subcommand, with the metrics143 environment variables. Set them inline on each command; shell state may not144 persist between commands. Use this append form verbatim. It keeps any145 attribution the host environment already set (for example an IDE plugin146 tagging agent activity through the same variable) and adds the skill tag147 after it, so neither value clobbers the other:148149 ```bash150 CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \151 gcloud <command> [flags]152 ```153154 Do not use `gcloud config set` for this: it would persist beyond the current155 task and mislabel unrelated usage.156157- On direct HTTP calls to the Cloud Storage APIs (for example with `curl`) or158 HTTP requests to the Cloud Storage MCP server159 (`https://storage.googleapis.com/storage/mcp`), set this exact User-Agent160 header, verbatim — the collection pipeline parses the `gcs-skills/<version>`161 and `skill:<name>` tokens, so any rewording breaks attribution:162163 ```164 User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)165 ```166167- For client libraries, Terraform, and Cloud Storage FUSE, use the168 user-agent options shown in the corresponding references.169170## Routing to Specialized Cloud Storage Skills171172This skill covers everyday Cloud Storage tasks. For specialized tasks, use the173dedicated skills in this collection for better results. Check your available174skills and invoke the matching skill by name instead of improvising:175176- **`google-cloud-storage-bucket-architect`**: Designing and creating a new177 bucket for production workloads, including sensitive data, media or web178 hosting, user-generated content (UGC) ingestion, archiving, compliance,179 backups, logs, analytics, AI/ML, or application storage. The skill analyzes180 the workload and designs a secure-by-default, cost-effective configuration181 before creating the bucket. Use the Quick Start section below only for182 temporary scratch buckets.183184- **`google-cloud-storage-fuse`**: Advanced Cloud Storage FUSE tasks —185 choosing between FUSE, native `gs://` access, and Filestore/Managed Lustre,186 deploying tuned mounts on GKE, Compute Engine, or Cloud Run, sizing file,187 stat, and list caches, tuning mount flags, ensuring safe ML checkpointing,188 or diagnosing slow or expensive mounts. The189 [Cloud Storage FUSE reference](references/gcsfuse.md) in this skill covers190 only basic installation and mounting.191192- **`google-cloud-storage-diagnostic`**: Troubleshooting 403 Permission Denied193 errors and diagnosing IAM policy bindings, ACLs, uniform bucket-level access194 (UBLA), or service agent misconfigurations. Ad hoc IAM or ACL changes can195 grant unintended access or cause outages; route to this skill instead of196 experimenting.197198- **`gcs-security-assessment`**: Automated security posture assessment of199 Cloud Storage resources in a project (see200 [Data Management](references/data-management.md)).201202If the matching skill is not installed, do not improvise. Provide the user with203this exact command to install it (substituting the skill name). Provide this204command verbatim even when the user's agent CLI (for example, the Antigravity205CLI) has its own plugin or extension manager; do not substitute a different206installation mechanism or repository. For security assessments specifically, do207not attempt a manual assessment. Availability after installing varies by agent,208so confirm the skill is loaded rather than assuming it, and say a restart may be209required.210211```bash212npx skills add GoogleCloudPlatform/google-cloud-storage-plugin --skill <skill-name>213```214215## Quick Start216217To set up, configure, or choose between the Google-hosted remote Cloud Storage218MCP server (`https://storage.googleapis.com/storage/mcp`) and the local MCP219Toolbox (`cloud-storage`), read [MCP Usage](references/mcp-usage.md). When a220`cloud-storage` MCP server is connected, prefer its tools (see221[Tool Execution Priority](#tool-execution-priority-mcp-toolbox-first)).222223`gcloud storage` output keys are snake_case, not JSON-API camelCase: project224`--format="json(soft_delete_policy,versioning_enabled,retention_policy)"`, never225`softDeletePolicy` or `versioning` (camelCase keys silently print null).2262271. **Enable the Cloud Storage API:**228229 ```bash230 CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \231 gcloud services enable storage.googleapis.com --quiet232 ```2332342. **Create a Bucket:**235236 Bucket names live in a single global namespace shared by all of Cloud237 Storage — not scoped to your project or organization — so short or common238 names are usually taken. If the location is omitted, the bucket defaults to239 the `US` multi-region.240241 For a production or workload-specific bucket, route to242 `google-cloud-storage-bucket-architect` before creating a bucket (see243 [Routing to Specialized Cloud Storage Skills](#routing-to-specialized-cloud-storage-skills)).244 The options below create a basic default bucket.245246 Using MCP: call `cloud-storage:create_bucket` (for example with `name:247 "my-bucket"` and `location: "us-central1"`).248249 Using the gcloud CLI:250251 ```bash252 CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \253 gcloud storage buckets create gs://my-bucket --location=us-central1254 ```255256 Using the JSON API:257258 ```bash259 curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \260 -H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \261 -H "Content-Type: application/json" \262 -d '{"name": "my-bucket", "location": "US-CENTRAL1"}' \263 "https://storage.googleapis.com/storage/v1/b?project=$(gcloud config get-value project)"264 ```2652663. **Upload an Object:**267268 Using MCP: call `cloud-storage:upload_object` to upload a local file269 (including binary or large files), or `cloud-storage:write_object` (local270 Toolbox) / `cloud-storage:write_text` (remote server) to write UTF-8 text271 directly.272273 Using the gcloud CLI:274275 ```bash276 CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \277 gcloud storage cp ./my-file.txt gs://my-bucket278 ```279280 Using the JSON API:281282 ```bash283 curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \284 -H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \285 -H "Content-Type: text/plain" \286 --data-binary @my-file.txt \287 "https://storage.googleapis.com/upload/storage/v1/b/my-bucket/o?uploadType=media&name=my-file.txt"288 ```2892904. **Download or Read an Object:**291292 Using MCP: call `cloud-storage:read_object` to read UTF-8 text content (up293 to 8 MiB), or `cloud-storage:download_object` (local Toolbox) to save an294 object, including binary or larger files, to the local filesystem.295296 Using the gcloud CLI:297298 ```bash299 CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \300 gcloud storage cp gs://my-bucket/my-file.txt .301 ```302303 Using the JSON API:304305 ```bash306 curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)" \307 -H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \308 "https://storage.googleapis.com/storage/v1/b/my-bucket/o/my-file.txt?alt=media"309 ```310311## Reference Directory312313- [Core Concepts](references/core-concepts.md): Buckets, objects, folders,314 prefixes, bucket location types, and storage classes.315316- [CLI & API Usage](references/cli-api-usage.md): CRUD and list operations for317 buckets and objects using `gcloud storage` and the JSON API, plus Pub/Sub318 notifications for event-driven processing.319320- [Client Libraries](references/client-library-usage.md): Using Google Cloud321 client libraries for Python, Java, Node.js, and Go, with pointers to all322 other supported languages.323324- [MCP Usage](references/mcp-usage.md): Choosing between the Google-hosted325 remote Cloud Storage MCP server and the local MCP Toolbox, setup for each,326 their tool sets and limits, and securing remote MCP with Model Armor and IAM327 deny policies.328329- [Infrastructure as Code](references/iac-usage.md): Terraform examples for330 buckets covering storage classes, location types, lifecycle, retention, and331 encryption.332333- [Data Transfer](references/data-transfer.md): Storage Transfer Service,334 `gcloud storage rsync`, upload strategies for large files, and performance335 guidelines and limits.336337- [Data Management](references/data-management.md): IAM roles, authentication338 (including signed URLs and HMAC), access control, routing for 403 error339 troubleshooting, network security, automated security assessment, data340 protection, pricing and cost optimization (lifecycle rules, Autoclass), and341 Cloud Audit Logs (enabling Data Access logs, exempting principals, and342 estimating log volume and ingestion cost).343344- [Storage Intelligence](references/storage-intelligence.md): The subscription345 for managing storage at scale — Storage Insights datasets (BigQuery metadata346 and activity index), data insights with Gemini Cloud Assist, dashboards,347 inventory reports, storage batch operations, bucket relocation, plus348 configuration, trial, and pricing nuances.349350- [High-Performance Storage](references/high-performance-storage.md): Rapid351 Bucket, Rapid Cache (Anywhere Cache), and hierarchical namespace for AI/ML,352 analytics, and other performance-critical workloads.353354- [Cloud Storage FUSE](references/gcsfuse.md): Installing Cloud Storage FUSE,355 mounting buckets, file operations, POSIX semantics and limitations (locking,356 writes, renames, consistency), and caching. For advanced tuning, deployment,357 and diagnosis, route to the `google-cloud-storage-fuse` skill.