google-cloud
🤖 A Model Context Protocol (MCP) server for Google Cloud (GCP)
claude mcp add --transport stdio krzko-google-cloud-mcp node dist/index.js \ --env GOOGLE_APPLICATION_CREDENTIALS="<path-to-service-account-key-json>"
How to use
This Google Cloud MCP Server provides a collection of tools and prompts to interact with a range of Google Cloud services (Billing, Error Reporting, IAM, Logging, Monitoring, Profiler, Spanner, and Trace) through natural language. Each service exposes a set of dedicated tools (for example, gcp-billing-list-accounts, gcp-logging-query-logs, gcp-spanner-list-tables, gcp-trace-list-traces) that you can invoke via natural prompts in your MCP client. Use the provided mcpServers configuration to connect the server to your client, then query or guide the server with natural language prompts like “Show me billing accounts” or “List Spanner databases in instance prod-db.” The server will translate your prompts into targeted Google Cloud API calls and return structured results and insights.
How to install
Prerequisites:
- Node.js (recommended LTS) and a compatible package manager (e.g., npm or pnpm)
- Access to a Google Cloud project with appropriate IAM permissions and a service account key (if using a key file)
Installation steps:
-
Clone the repository git clone https://github.com/krzko/google-cloud-mcp.git cd google-cloud-mcp
-
Install dependencies npm install
or with pnpm if used by the project
pnpm install
-
Build the project (if applicable) npm run build
or
pnpm build
-
Run the server locally npm run start
or
pnpm start
-
Prepare authentication
- Option A: Create and download a service account key file and set this path: export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account.json"
- Option B: Set the following environment variables directly: export GOOGLE_CLIENT_EMAIL="your-service-account-email@project.iam.gserviceaccount.com" export GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
-
Configure your MCP client’s mcpServers section to point to the server (see example below).
Additional notes
Tips and common considerations:
- Authentication: Use a service account key file or directly provide GOOGLE_CLIENT_EMAIL and GOOGLE_PRIVATE_KEY. The server will also use GOOGLE_CLOUD_PROJECT if set, or determine the project from credentials.
- Environment management: Keep sensitive credentials secure. Use environment variable injection or a mounted credentials file in production deployments.
- Debugging: If you encounter timeouts or authentication issues, enable verbose logging in your MCP client configuration and verify credentials are accessible by the server process.
- Versioning: Ensure your Google Cloud SDK and libraries are compatible with the MCP server version you’re running.
- Network access: Ensure your server can reach Google Cloud endpoints from its running environment (firewall rules, proxies, and VPC settings may affect connectivity).
Related MCP Servers
mcp-router
A Unified MCP Server Management App (MCP Manager).
MCPJungle
Self-hosted MCP Gateway for AI agents
mcp-google-sheets
This MCP server integrates with your Google Drive and Google Sheets, to enable creating and modifying spreadsheets.
cloud-run
MCP server to deploy apps to Cloud Run
google_ads_mcp
The Google Ads MCP Server is an implementation of the Model Context Protocol (MCP) that enables Large Language Models (LLMs), such as Gemini, to interact directly with the Google Ads API.
google -remote
Collection of Google-native tools (e.g., Gmail, Calendar) for the MCP