Get the FREE Ultimate OpenClaw Setup Guide →

gcp

A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your Google Cloud Platform environment. This allows for natural language querying and management of your GCP resources during conversations.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio eniayomi-gcp-mcp npx -y gcp-mcp \
  --env GOOGLE_APPLICATION_CREDENTIALS="Path to Google Cloud credentials JSON file or use Application Default Credentials"

How to use

GCP MCP is an MCP server that lets AI assistants interact with your Google Cloud Platform environment using natural language. It exposes a set of GCP-focused tools (such as listing projects, retrieving billing info, and inspecting resources like GKE clusters or Cloud SQL instances) that you can invoke during conversations with your assistant. This enables conversational querying and management of your GCP resources while keeping credentials securely handled on your machine. You can drive the server through npx or via your preferred Claude/Cursor/Windsurf integration as described in the configuration steps.

To use it, start the MCP server through your chosen workflow (for example, via npx -y gcp-mcp). Once running, you can issue natural language prompts like “List all GCP projects I have access to” or “Show me Cloud SQL instances in project X.” The available tools include run-gcp-code for executing typed TypeScript GCP API calls, list-projects, select-project, get-billing-info, get-cost-forecast, get-billing-budget, list-gke-clusters, list-sql-instances, and get-logs. These tools empower your assistant to switch projects, fetch billing data, enumerate resources, and retrieve logs directly during conversations.

For best results, you’ll typically first select a project, then query resources or perform actions within that project. The server supports multiple projects and regions, and it includes automatic retries to improve reliability during API calls. Make sure you have proper credentials configured locally (Application Default Credentials) so the MCP server can authenticate to GCP on your behalf.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Access to a terminal/command prompt
  • Google Cloud credentials configured locally (Application Default Credentials via gcloud or a service account JSON)

Installation steps:

  1. Clone the repository and navigate into it
git clone https://github.com/eniayomi/gcp-mcp
cd gcp-mcp
  1. Install dependencies
npm install
  1. Ensure credentials are configured locally. For example:
  • Set up Application Default Credentials:
gcloud auth application-default login
  • Or provide a service account JSON and set GOOGLE_APPLICATION_CREDENTIALS accordingly:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/service-account.json
  1. Run the MCP server (via npx as described in the configuration):
npx -y gcp-mcp

If you prefer to run directly from source after cloning, you can also start the server using npm if your workflow expects that form:

npm run start

Additional notes

Tips and considerations:

  • The MCP server relies on your local Google Cloud credentials. Ensure they are valid and have sufficient permissions for the resources you intend to query or manage.
  • If you use Application Default Credentials, you don’t need to set GOOGLE_APPLICATION_CREDENTIALS; the SDK will locate and use ADC automatically.
  • The available tools cover a broad range of GCP services (Compute Engine, Cloud Storage, Cloud Functions, Cloud Run, BigQuery, Cloud SQL, GKE, Cloud Logging, Cloud Billing, and Resource Manager). As features evolve, additional services may be exposed.
  • If you encounter authentication or permission errors, verify IAM roles and that required APIs are enabled for your project.
  • When integrating with Claude Desktop/Cursor/Windsurf, ensure the MCP server is reachable from your environment and that the config.json entries point to the correct command and script path.
  • Logs are typically helpful for troubleshooting; monitor the MCP server logs for errors or retries during operations.

Related MCP Servers

Sponsor this space

Reach thousands of developers