# gcloud CLI (MCP Server)

> Interact with Google Cloud through the gcloud CLI in natural language

- Type: MCP server
- Publisher: Google Cloud (official)
- Categories: DevOps & Cloud
- Website: https://github.com/googleapis/gcloud-mcp
- Source: https://github.com/googleapis/gcloud-mcp
- Transport: stdio
- Launch command: npx -y @google-cloud/gcloud-mcp
- Sign-in: oauth
- GitHub stars: 917
- Listed: 2025-09-01

## About

Google's gcloud MCP server lets AI assistants run gcloud commands (with safety restrictions) to interact with Google Cloud. The same repository also provides observability, Cloud Storage and Backup and DR servers. It requires Node.js 20+ and an installed gcloud CLI and is in preview.

## Install

1. **Add the server to Codex**

   Codex CLI:

   ```bash
   codex mcp add gcloud -- npx -y @google-cloud/gcloud-mcp
   ```

   config.toml:

   ```toml
   [mcp_servers.gcloud]
   command = "npx"
   args = ["-y", "@google-cloud/gcloud-mcp"]
   ```

   Agents SDK:

   ```python
   from agents import Agent, Runner
   from agents.mcp import MCPServerStdio
   
   async with MCPServerStdio(
       name="gcloud CLI",
       params={"command": "npx", "args": ["-y", "@google-cloud/gcloud-mcp"]},
   ) as server:
       agent = Agent(name="Assistant", mcp_servers=[server])
       result = await Runner.run(agent, "List the Compute Engine instances in my project")
       print(result.final_output)
   ```

## Tools

- `run_gcloud_command`

## Example prompts

- "List the Compute Engine instances in my project"
- "Deploy this container to Cloud Run in us-central1"
- "Which service accounts have the Owner role?"

## Also available as

- plugin: [BigQuery](https://chatgptplugins.directory/plugins/bigquery.md)

## Related

- [GitHub](https://chatgptplugins.directory/mcp/github.md): Manage repos, issues, pull requests and Actions from your AI agent
- [Sentry](https://chatgptplugins.directory/mcp/sentry.md): Search Sentry errors, issues and traces and debug them with Seer
- [Cloudflare API](https://chatgptplugins.directory/mcp/cloudflare-api.md): Access 2,500+ Cloudflare API endpoints through two Code Mode tools
- [Vercel](https://chatgptplugins.directory/mcp/vercel.md): Manage Vercel projects, deployments, logs and docs from AI tools
- [MCP Toolbox for Databases](https://chatgptplugins.directory/mcp/mcp-toolbox-databases.md): Google's open-source MCP server for 20+ databases
- [AWS Knowledge](https://chatgptplugins.directory/mcp/aws-knowledge.md): Search current AWS docs, API references and regional availability

---
Source: https://chatgptplugins.directory/mcp/gcloud · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
