
Gcs
com.pulsemcp由 pulsemcp.com 发布v0.1.14更新于 Oct 24, 2026
MCP server for Google Cloud Storage with fine-grained tool access control.
概览
面向 Google Cloud Storage 的本地 MCP 服务器,让助手列出、读取、上传、复制和删除存储桶与对象,并可用工具组限制权限。
- 可以做什么
- 列出并查看存储桶和对象,检查存储桶是否存在及可访问,读取对象文本内容,或将对象及整个前缀以原始字节下载到本地磁盘。以内联文本、单个本地文件或整个目录树上传或更新对象,并在同一或不同存储桶间复制对象。创建存储桶,删除对象或空存储桶,具体取决于启用的工具组。通过工具组(readonly、readwrite、delete)或单独启用/禁用列表控制可用工具,并可将所有操作限制在单个存储桶内。
- 适用场景
- 适合助手需要处理 Google Cloud Storage 中文件的场景:浏览和读取已存数据、把本地文件或文件夹移入存储桶、复制对象,或清理对象和存储桶。只读组适合探索与分析,单存储桶模式适合最小权限配置。
- 运行要求
- 通过 npx 在本地运行(需要 Node.js)。需要 GCS_PROJECT_ID 和 Google Cloud 凭据:通过 GCS_SERVICE_ACCOUNT_KEY_FILE 提供服务账号密钥文件、通过 GCS_SERVICE_ACCOUNT_KEY_JSON 提供内联密钥 JSON,或使用 gcloud 的 Application Default Credentials。服务账号需具备所启用工具对应的存储 IAM 权限。需要访问 Google Cloud Storage 的网络。
安装
README
GCS MCP Server
MCP server for Google Cloud Storage operations with fine-grained tool access control. Supports read/write operations on GCS buckets and objects, with configurable tool groups for security and permission management.
Highlights
- Full GCS bucket and object management (list, get, put, copy, delete)
- Fine-grained access control with tool groups (readonly, readwrite, delete)
- Individual tool enable/disable via environment variables
- Multiple authentication methods (service account key file, inline JSON, ADC)
- GCS credential validation with health checks
- Single bucket constraint mode
- TypeScript with strict type checking
- Comprehensive testing (functional, integration, manual)
Capabilities
Tools
Downloading to Local Disk
get_object returns an object's contents inline as UTF-8 text, which is lossy for binary data and impractical for large files or many files at once. For local data-wrangling, use the download tools instead — both stream raw bytes to disk and belong to the readonly toolgroup:
-
download_object— download a single object to a local file path. Defaults to a unique file under the OS temp directory. -
download_prefix— recursively download every object under a prefix to a local directory, preserving the key path structure as subdirectories. Paginates through the full listing, skips directory-placeholder objects (keys ending in/), collects per-object errors without aborting the batch, and returns a manifest:The inline
fileslist is capped (maxInlineEntries, default 100), butobjectCountandtotalBytesalways reflect the full download. WhendestinationDiris omitted it defaults to a unique folder under the OS temp directory.
Uploading from Local Disk
put_object takes the object content inline as a string argument, which routes every byte through the model context and requires base64 for binary data — impractical for large files or bulk uploads. For uploading files or folders without consuming context, use the local-path upload tools instead. Both stream raw bytes directly from disk to GCS server-side, returning only metadata. They belong to the readwrite toolgroup, so read-only deployments never gain them.
-
put_object_from_path— upload a single local file by streaming it from a filesystem path. Content type is auto-detected from the file extension (override withcontentType). Binary files (images, archives) work without base64. Returns{ bucket, key, sourcePath, size, etag, generation }. -
upload_prefix— recursively upload every file under a local directory, preserving the directory structure as key paths beneath a destination prefix. Symbolic links to files are followed and uploaded (links to directories are skipped to avoid cycles), per-file failures are collected without aborting the batch, and it returns a manifest:The inline
fileslist is capped (maxInlineEntries, default 100), butobjectCountandtotalBytesalways reflect the full upload. WhendestPrefixis omitted, files upload to the bucket root.
Resources
Tool Groups
Control which tools are available via the GCS_ENABLED_TOOLGROUPS environment variable:
Examples:
GCS_ENABLED_TOOLGROUPS="readonly"- Only read operationsGCS_ENABLED_TOOLGROUPS="readonly,readwrite"- Read and write, no deletesGCS_ENABLED_TOOLGROUPS="readonly,readwrite,delete"- All operations- Not set - All tools enabled (default)
Individual Tool Control
Fine-grained control over specific tools:
GCS_ENABLED_TOOLS="list_buckets,get_object"- Only enable these toolsGCS_DISABLED_TOOLS="delete_bucket,delete_object"- Disable these tools
Single Bucket Mode
Constrain all operations to a specific bucket using GCS_BUCKET:
When set:
- All object operations are automatically scoped to this bucket
- Bucket-level tools (
list_buckets,create_bucket,delete_bucket,head_bucket) are hidden - The
bucketparameter is automatically injected and hidden from tool inputs - For
copy_object, both source and destination are constrained to the specified bucket
This lets you grant a least-privilege service account that has only object-level access to one bucket, without project-level bucket-listing permission. The startup healthcheck honors this: when GCS_BUCKET is set it validates credentials with an object-scoped probe (storage.objects.list on that bucket) and never calls the project-level bucket list or a bucket-metadata probe. See Required IAM permissions for the exact permissions per mode.
Required IAM permissions
The minimal IAM permissions depend on whether the server is constrained to a single bucket (GCS_BUCKET) and which tool groups you enable. The startup healthcheck validates credentials within these bounds — it does not require any permission beyond what the table below lists for your mode.
Startup healthcheck
Set SKIP_HEALTH_CHECKS=true to bypass startup validation entirely (disables all credential checks — not recommended).
Per-tool permissions
Beyond the healthcheck, each tool needs the corresponding GCS permission at runtime. Grant only what the tool groups you enable require:
For a read-only, single-bucket service account, the roles/storage.objectViewer role on the bucket (or a custom role with storage.objects.list + storage.objects.get) is sufficient — no project-level or bucket-metadata permissions are needed.
Quick Start
Configuration
Environment Variables
Authentication
The server supports three authentication methods (in order of precedence):
- Service Account Key File: Set
GCS_SERVICE_ACCOUNT_KEY_FILEto the path of a JSON key file - Inline Service Account Key: Set
GCS_SERVICE_ACCOUNT_KEY_JSONwith the JSON contents directly - Application Default Credentials (ADC): No additional env vars needed - uses
gcloud auth application-default login
Claude Desktop Configuration
If this is your first time using MCP Servers, make sure you have the Claude Desktop application and follow the official MCP setup instructions.
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop and you should be ready to go!
Read-Only Mode
For safer exploration, enable only read operations:
Using Application Default Credentials
If you have gcloud CLI configured locally:
Then configure without key file:
Development
Install Dependencies
Build
Running in Development Mode
Testing
Manual Testing Setup
Create a .env file in the gcs directory:
Then run:
Project Structure
License
MIT
来源:experimental/gcs/README.md,提交 0ed34de
工具
0版本历史
1- v0.1.14最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分