@google-cloud/gcloud-mcp

中文文档
0.5.3发布于 2026/01/06Apache-2.0ES Module近 30 天下载 26.5万

Model Context Protocol (MCP) Server for interacting with GCP APIs

原始使用文档
文档目录12 节
  1. 🚀 Getting Started
  2. Prerequisites
  3. ✨ Set up your MCP server
  4. Gemini CLI and Gemini Code Assist
  5. Allowlist / Denylist Commands
  6. For other AI clients
  7. 🛠 Local Development
  8. 🧰 Available MCP Tools
  9. 🔑 MCP Permissions
  10. 💫 Other Google Cloud MCP Servers
  11. 👥 Contributing
  12. 📄 Important Notes

Version

gcloud MCP Server ☁️

The gcloud Model Context Protocol (MCP) server enables AI assistants to easily interact with the Google Cloud environment using the gcloud CLI. With the gcloud MCP server you can:

  • Interact with Google Cloud using natural language. Describe the outcome you want instead of memorizing complex command syntax, flags, and arguments.
  • Automate and simplify complex workflows. Chain multiple cloud operations into a single, repeatable command to reduce manual effort and the chance of error.
  • Lower the barrier to entry for cloud management. Empower team members who are less familiar with gcloud to perform powerful actions confidently and safely.

🚀 Getting Started

Prerequisites

✨ Set up your MCP server

Gemini CLI and Gemini Code Assist

To integrate MCP servers with Gemini CLI or Gemini Code Assist, run the setup command below from your home directory for MCP server listed in the table. This will install the MCP server as a Gemini CLI extension. for the current user, making it available for all your projects.

npx @google-cloud/gcloud-mcp init --agent=gemini-cli

After the initialization process, you can verify that the gcloud-mcp server is configured correctly by running the following command:

gemini mcp list

> ✓ gcloud: npx -y @google-cloud/gcloud-mcp (stdio) - Connected

Allowlist / Denylist Commands

The gcloud MCP server also allows for allowlisting/denylisting commands. For more information, see the denylist documentation.

For other AI clients

To use the gcloud-mcp server with other clients, add the following snippet to their respective JSON configuration files for each MCP server:

"gcloud": {
  "command": "npx",
  "args": ["-y", "@google-cloud/gcloud-mcp"]
}

Instructions for popular tools:

  • Claude Desktop: Open Claude > Settings > Developer > Edit Config and edit claude_desktop_config.json.
  • Cline: Click the MCP Servers icon, then Configure MCP Servers to edit cline_mcp_settings.json.
  • Cursor: Edit .cursor/mcp.json for a single project or ~/.cursor/mcp.json for all projects.
  • Gemini CLI (Manual Setup): If not using extensions, edit .gemini/settings.json for a single project or ~/.gemini/settings.json for all projects.

For Visual Studio Code edit the .vscode/mcp.json file in your workspace for a single project or your global user settings file for all projects:

"servers": {
  "gcloud": {
    "command": "npx",
    "args": ["-y", "@google-cloud/gcloud-mcp"]
  }
}

🛠 Local Development

For more information regarding installing the repository locally, please see development.md

🧰 Available MCP Tools

ToolDescription
run_gcloud_commandExecutes a gcloud command. Some commands have been restricted from execution by the agent. See MCP Permissions for more information.

🔑 MCP Permissions

The permissions of the gcloud MCP are directly tied to the permissions of the active gcloud account. To restrict permissions and operate with the principle of least privilege, you can authorize as a service account using impersonation and assign the service account a role with limited permissions.

By default, the gcloud MCP prevents execution of gcloud commands that don't make sense for AI agents. This is done to restrict commands that can run arbitrary inputs and initiate interactive sessions. See here for the list of denied commands.

💫 Other Google Cloud MCP Servers

Google Cloud offers these other servers:

👥 Contributing

We welcome contributions! Whether you're fixing bugs, sharing feedback, or improving documentation, your contributions are welcome. Please read our Contributing Guide to get started.

📄 Important Notes

This repository is currently in preview and may see breaking changes. This repository provides a solution, not an officially supported Google product. It is not covered under Google Cloud Terms of Service. It may break when the MCP specification, other SDKs, or when other solutions and products change. See also our Security Policy.

版本与发布记录

@google-cloud/gcloud-mcp 共发布 9 个版本,首次发布于 2025/09/10;过去 12 个月发布了 4 个版本。

版本发布日期距今
0.5.3latest2026/01/0610 个月前
0.5.22025/12/1710 个月前
0.5.12025/12/1711 个月前
0.5.02025/12/1511 个月前
0.4.02025/10/281.1 年前
0.3.02025/10/091.1 年前

关于 @google-cloud/gcloud-mcp 的常见问题

@google-cloud/gcloud-mcp 是什么?

Model Context Protocol (MCP) Server for interacting with GCP APIs

如何安装 @google-cloud/gcloud-mcp?

在项目目录运行 npm install @google-cloud/gcloud-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 gcloud-mcp,可以用 npx gcloud-mcp 直接运行。

@google-cloud/gcloud-mcp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/google-cloud__gcloud-mcp 是否存在。

@google-cloud/gcloud-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@google-cloud/gcloud-mcp 可以商用吗?

@google-cloud/gcloud-mcp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@google-cloud/gcloud-mcp 的下载量有多少?

根据 npm 官方下载统计,@google-cloud/gcloud-mcp 在 2026/10/17 – 2026/11/15 这 30 天内被下载 265,397 次,日均约 8,847 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@google-cloud/gcloud-mcp 还在维护吗?

最新版本 0.5.3 发布于 2026/01/06(10 个月前);至今共发布 9 个版本,其中过去 12 个月发布了 4 个;首次发布于 2025/09/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。