Home / MCP / GCP MCP Server

GCP MCP Server

Provides natural language querying and management of Google Cloud resources from AI assistants across multiple projects.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "gcp_mcp_npx": {
            "command": "npx",
            "args": [
                "-y",
                "gcp-mcp"
            ]
        }
    }
}

You can run a GCP MCP Server locally to let AI assistants interact with your Google Cloud Platform environment. It lets you query and manage GCP resources through natural language while keeping credentials secure on your machine.

How to use

Start by ensuring you have an active GCP account with credentials configured on your machine. Once the MCP server is running, you can talk to it through your MCP client to perform actions like listing projects, checking billing, viewing logs, and querying resources across services such as Compute Engine, Cloud Storage, Cloud Run, Cloud SQL, GKE, and BigQuery. Common tasks include selecting a project, asking for resource inventories, retrieving billing info, and fetching logs from Cloud Logging. You can frame questions in natural language, for example: list all GCP projects I have access to, show me all Cloud SQL instances in a project, or what Cloud Functions are deployed in a region.

How to install

Prerequisites you need on your machine are Node.js and locally configured GCP credentials. Ensure you have the required tooling available, then install and run the MCP server as described below.

Step 1: Install Node.js if you don’t already have it. You can download and install from the official Node.js website or use your system package manager.

Step 2: Install the MCP server locally. Use one of the following approaches.

Option A: Run via npx (recommended for quick start) β€” this pulls the MCP package and starts the server.

Additional sections

Configuration for MCP clients is shown below. You will expose the MCP server to your client tools in a way that fits your workflow. You can run the server locally with either the npm-based path or the npx shortcut.

{
  "mcpServers": {
    "gcp": {
      "command": "npx",
      "args": ["-y", "gcp-mcp"]
    }
  }
}

If you prefer running from source or want to start using a local build, you can use the following alternative start command. Replace the path with your actual project path.

{
  "mcpServers": {
    "gcp": {
      "command": "npm",
      "args": [
        "--silent",
        "--prefix",
        "/path/to/gcp-mcp",
        "start"
      ]
    }
  }
}

GCP setup requires credentials. Set up application default credentials and then refresh your AI assistant.

If you are using Claude Desktop, Cursor, or Windsurf, follow the specific steps to configure the MCP server in your client with the appropriate command. For example, in Claude Desktop you can add the MCP server as npx -y gcp-mcp or, if you installed from source, use the npm start path with the correct project prefix.

Available tools

run-gcp-code

Execute GCP API calls by generating and running TypeScript code against Google Cloud Platform services.

list-projects

List all accessible GCP projects you have permission to view.

select-project

Choose a specific GCP project to set as the active context for subsequent queries and actions.

get-billing-info

Retrieve billing information for the currently selected project.

get-cost-forecast

Fetch cost forecast data for the current project to help with budgeting.

get-billing-budget

Obtain billing budgets defined for the current project.

list-gke-clusters

List all Google Kubernetes Engine clusters in the current project.

list-sql-instances

List all Cloud SQL instances in the current project.

get-logs

Fetch Cloud Logging entries for the current project.