gcs — Claude Code MCP server: what it does, how to install
Google Cloud Storage integration for bucket and object tasks. Moves files directly between disk and cloud buckets without cluttering prompt context.
claude mcp add --env GCS_PROJECT_ID=<GCS_PROJECT_ID> --env GCS_SERVICE_ACCOUNT_KEY_FILE=<GCS_SERVICE_ACCOUNT_KEY_FILE> --env GCS_SERVICE_ACCOUNT_KEY_JSON=<GCS_SERVICE_ACCOUNT_KEY_JSON> --env GCS_BUCKET=<GCS_BUCKET> --env GCS_ENABLED_TOOLGROUPS=<GCS_ENABLED_TOOLGROUPS> --transport stdio gcs -- npx -y gcs-google-mcp-serverWhat gcs does
This server connects AI assistants directly to Google Cloud Storage. It handles inspecting buckets, reading text contents, transferring objects, and removing stale data. Tool availability is partitioned into readonly, readwrite, and delete permission sets, controlled via the GCS_ENABLED_TOOLGROUPS environment setting.
While simple inspection tools return inline strings, disk-oriented handlers stream raw bytes straight to local storage. Running download_prefix or put_object_from_path processes nested directory structures and binary files without forcing payloads through the LLM context window.
Setting GCS_BUCKET confines all file operations to a single bucket, while missing Google Cloud service account credentials will stop the server from launching.
What it helps with
- stream binary files to Google Cloud Storage without token overhead
- mirror remote storage prefixes directly to local folders
- restrict agent capabilities to read-only bucket interactions
- transfer objects between Google Cloud buckets
Example prompts for the agent
- List all storage buckets accessible in the current Google Cloud project.
- Upload the local archive
dataset.zipinto the bucketbackupsvia streaming. - Download every object under the prefix
exports/2024/straight to local disk.
How to install gcs
Platform CLI
claude mcp add --env GCS_PROJECT_ID=<GCS_PROJECT_ID> --env GCS_SERVICE_ACCOUNT_KEY_FILE=<GCS_SERVICE_ACCOUNT_KEY_FILE> --env GCS_SERVICE_ACCOUNT_KEY_JSON=<GCS_SERVICE_ACCOUNT_KEY_JSON> --env GCS_BUCKET=<GCS_BUCKET> --env GCS_ENABLED_TOOLGROUPS=<GCS_ENABLED_TOOLGROUPS> --transport stdio gcs -- npx -y gcs-google-mcp-serverReplace <…> with your own values. 3 more environment variables are in the server README
Platform CLI
codex mcp add gcs --env GCS_PROJECT_ID=<GCS_PROJECT_ID> --env GCS_SERVICE_ACCOUNT_KEY_FILE=<GCS_SERVICE_ACCOUNT_KEY_FILE> --env GCS_SERVICE_ACCOUNT_KEY_JSON=<GCS_SERVICE_ACCOUNT_KEY_JSON> --env GCS_BUCKET=<GCS_BUCKET> --env GCS_ENABLED_TOOLGROUPS=<GCS_ENABLED_TOOLGROUPS> -- npx -y gcs-google-mcp-serverReplace <…> with your own values. 3 more environment variables are in the server README
Config file
{
"mcpServers": {
"gcs": {
"command": "npx",
"args": [
"-y",
"gcs-google-mcp-server"
],
"env": {
"GCS_PROJECT_ID": "<GCS_PROJECT_ID>",
"GCS_SERVICE_ACCOUNT_KEY_FILE": "<GCS_SERVICE_ACCOUNT_KEY_FILE>",
"GCS_SERVICE_ACCOUNT_KEY_JSON": "<GCS_SERVICE_ACCOUNT_KEY_JSON>",
"GCS_BUCKET": "<GCS_BUCKET>",
"GCS_ENABLED_TOOLGROUPS": "<GCS_ENABLED_TOOLGROUPS>"
}
}
}
}Replace <…> with your own values. 3 more environment variables are in the server README
Config file
{
"servers": {
"gcs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"gcs-google-mcp-server"
],
"env": {
"GCS_PROJECT_ID": "<GCS_PROJECT_ID>",
"GCS_SERVICE_ACCOUNT_KEY_FILE": "<GCS_SERVICE_ACCOUNT_KEY_FILE>",
"GCS_SERVICE_ACCOUNT_KEY_JSON": "<GCS_SERVICE_ACCOUNT_KEY_JSON>",
"GCS_BUCKET": "<GCS_BUCKET>",
"GCS_ENABLED_TOOLGROUPS": "<GCS_ENABLED_TOOLGROUPS>"
}
}
}
}Replace <…> with your own values. 3 more environment variables are in the server README
Platform CLI
gemini mcp add -e GCS_PROJECT_ID=<GCS_PROJECT_ID> -e GCS_SERVICE_ACCOUNT_KEY_FILE=<GCS_SERVICE_ACCOUNT_KEY_FILE> -e GCS_SERVICE_ACCOUNT_KEY_JSON=<GCS_SERVICE_ACCOUNT_KEY_JSON> -e GCS_BUCKET=<GCS_BUCKET> -e GCS_ENABLED_TOOLGROUPS=<GCS_ENABLED_TOOLGROUPS> gcs npx -y gcs-google-mcp-serverReplace <…> with your own values. 3 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about gcs
How to install gcs in Claude Code?
Run `claude mcp add --env GCS_PROJECT_ID=<GCS_PROJECT_ID> --env GCS_SERVICE_ACCOUNT_KEY_FILE=<GCS_SERVICE_ACCOUNT_KEY_FILE> --env GCS_SERVICE_ACCOUNT_KEY_JSON=<GCS_SERVICE_ACCOUNT_KEY_JSON> --env GCS_BUCKET=<GCS_BUCKET> --env GCS_ENABLED_TOOLGROUPS=<GCS_ENABLED_TOOLGROUPS> --transport stdio gcs -- npx -y gcs-google-mcp-server`.
Why use disk streaming tools instead of inline reading?
Inline tools feed file contents through prompt context, which corrupts binary structures and exhausts token limits. Disk streaming writes raw bytes straight to the filesystem.
How do you block destructive actions?
Supply GCS_ENABLED_TOOLGROUPS="readonly,readwrite" in your environment config. This leaves delete operations disabled for the running session.