Skip to main content
Glama

GCP MCP

Ein Model Context Protocol (MCP)-Server, der KI-Assistenten wie Claude die Interaktion mit Ihrer Google Cloud Platform-Umgebung ermöglicht. Dies ermöglicht Abfragen in natürlicher Sprache und die Verwaltung Ihrer GCP-Ressourcen während Konversationen.

GCP MCP-Demo

Merkmale

  • 🔍 GCP-Ressourcen mithilfe natürlicher Sprache abfragen und ändern

  • ☁️ Unterstützung für mehrere GCP-Projekte

  • 🌐 Unterstützung mehrerer Regionen

  • 🔐 Sichere Handhabung der Anmeldeinformationen (es werden keine Anmeldeinformationen an externe Dienste weitergegeben)

  • 🏃‍♂️ Lokale Ausführung mit Ihren GCP-Anmeldeinformationen

  • 🔄 Automatische Wiederholungsversuche für verbesserte Zuverlässigkeit

Related MCP server: Kubectl MCP Tool

Voraussetzungen

  • Node.js

  • Claude Desktop/Cursor/Windsurf

  • GCP-Anmeldeinformationen lokal konfiguriert (Standardanmeldeinformationen der Anwendung)

Installation

  1. Klonen Sie das Repository:

git clone https://github.com/eniayomi/gcp-mcp
cd gcp-mcp
  1. Installieren Sie Abhängigkeiten:

npm install

Konfiguration

Claude Desktop

  1. Öffnen Sie die Claude-Desktop-App und gehen Sie zu Einstellungen -> Entwickler -> Konfiguration bearbeiten

  2. Fügen Sie den folgenden Eintrag zu Ihrer claude_desktop_config.json hinzu:

über npm:

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

Wenn Sie die Installation aus der Quelle durchgeführt haben:

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

Ersetzen Sie /path/to/gcp-mcp durch den tatsächlichen Pfad zu Ihrem Projektverzeichnis, wenn Sie die Quellinstallation verwenden.

Cursor

  1. Öffnen Sie Cursor und gehen Sie zu Einstellungen (⌘,)

  2. Navigieren Sie zu AI -> Model Context Protocol

  3. Fügen Sie eine neue MCP-Konfiguration hinzu:

{
  "gcp": {
    "command": "npx -y gcp-mcp"
  }
}

Windsurf

  1. Öffnen Sie ~/.windsurf/config.json (erstellen Sie es, falls es nicht existiert)

  2. Fügen Sie die MCP-Konfiguration hinzu:

{
  "mcpServers": {
    "gcp": {
      "command": "npx -y gcp-mcp"
    }
  }
}

GCP-Einrichtung

  1. Richten Sie die GCP-Anmeldeinformationen ein:

    • Richten Sie die Standardanmeldeinformationen für Anwendungen mit gcloud auth application-default login ein.

  2. Aktualisieren Sie Ihren KI-Assistenten (Claude Desktop/Cursor/Windsurf)

Verwendung

Wählen Sie zunächst ein Projekt aus oder stellen Sie Fragen wie:

  • „Alle GCP-Projekte auflisten, auf die ich Zugriff habe“

  • „Zeigen Sie mir alle Cloud SQL-Instanzen im Projekt X“

  • „Wie ist mein aktueller Rechnungsstatus?“

  • „Zeigen Sie mir die Protokolle meiner Cloud Run-Dienste“

  • „Liste alle GKE-Cluster in us-central1 auf“

  • „Zeigen Sie mir alle Cloud Storage-Buckets in Projekt X“

  • „Welche Cloud-Funktionen werden in us-central1 bereitgestellt?“

  • „Alle Cloud Run-Dienste auflisten“

  • „Zeigen Sie mir BigQuery-Datensätze und -Tabellen“

Verfügbare Tools

  1. run-gcp-code : Führen Sie GCP-API-Aufrufe mit TypeScript-Code aus

  2. list-projects : Listet alle zugänglichen GCP-Projekte auf

  3. select-project : Wählen Sie ein GCP-Projekt für nachfolgende Vorgänge aus

  4. get-billing-info : Rechnungsinformationen für das aktuelle Projekt abrufen

  5. get-cost-forecast : Kostenprognose für das aktuelle Projekt abrufen

  6. get-billing-budget : Ruft die Abrechnungsbudgets für das aktuelle Projekt ab

  7. list-gke-clusters : Listet alle GKE-Cluster im aktuellen Projekt auf

  8. list-sql-instances : Listet alle Cloud SQL-Instanzen im aktuellen Projekt auf

  9. get-logs : Ruft Cloud Logging-Einträge für das aktuelle Projekt ab

Beispielinteraktionen

  1. Liste der verfügbaren Projekte:

List all GCP projects I have access to
  1. Wählen Sie ein Projekt aus:

Use project my-project-id
  1. Rechnungsstatus prüfen:

What's my current billing status?
  1. Protokolle anzeigen:

Show me the last 10 log entries from my project

Unterstützte Dienste

  • Google Compute Engine

  • Cloud-Speicher

  • Cloud-Funktionen

  • Cloud Run

  • BigQuery

  • Cloud SQL

  • Google Kubernetes Engine (GKE)

  • Cloud-Protokollierung

  • Cloud-Abrechnung

  • Ressourcenmanager

  • Mehr folgt in Kürze ...

Fehlerbehebung

So zeigen Sie Protokolle an:

tail -n 50 -f ~/Library/Logs/Claude/mcp-server-gcp.log

Häufige Probleme:

  1. Authentifizierungsfehler: Stellen Sie sicher, dass Sie gcloud auth application-default login ausgeführt haben.

  2. Berechtigungsfehler: Überprüfen Sie die IAM-Rollen für Ihr Konto

  3. API-Fehler: Überprüfen Sie, ob die erforderlichen APIs in Ihrem Projekt aktiviert sind

Beitragen

Beiträge sind willkommen! Senden Sie gerne einen Pull Request.

Lizenz

MIT

Available Tools

9 tools
get-billing-budgetC

Get billing budgets for the current project

Inputs: projectId.

get-billing-infoC

Get billing information for the current project

Inputs: projectId.

get-cost-forecastB

Get cost forecast for the current project

Inputs: months, projectId.

get-logsB

Get Cloud Logging entries for the current project

Inputs: filter, pageSize.

list-gke-clustersB

List all GKE clusters in the current project

Inputs: location.

list-projectsA

List all GCP projects accessible with current credentials

Inputs: no named parameters.

list-sql-instancesB

List all Cloud SQL instances in the current project

Inputs: no named parameters.

run-gcp-codeD

Run GCP code

Inputs: code (required), reasoning (required), region, projectId.

select-projectB

Selects GCP project to use for subsequent interactions

Inputs: projectId (required), region.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 9 tools

    Disambiguation4/5

    Tools are mostly distinct: billing-related tools (budget, info, forecast) are clearly separate, and list/select tools for different resources are unambiguous. The only potential confusion is 'run-gcp-code' which is vague but still distinct from other tools.

    Naming Consistency5/5

    All tool names follow a consistent verb-noun pattern with hyphens (e.g., get-billing-budget, list-gke-clusters, select-project). The naming convention is uniform and predictable.

    Tool Count5/5

    The server has 9 tools, which is an appropriate size for a focused GCP management server. It covers several key areas without being overwhelming.

    Completeness2/5

    The tool surface is limited to reading and listing operations for select GCP services (billing, logs, GKE, SQL, projects). Missing CRUD operations for resources, compute, storage, IAM, and other common GCP tasks. The vague 'run-gcp-code' tool does not compensate for these gaps.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      A Model Context Protocol server that connects to Google Cloud services, allowing users to query logs, interact with Spanner databases, and analyze Cloud Monitoring metrics through natural language interaction.
      40
      80
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      A Model Context Protocol server that enables AI assistants to interact with Kubernetes clusters through natural language, supporting core Kubernetes operations, monitoring, security, and diagnostics.
      280 npm
      976
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      A Model Context Protocol server allowing Claude AI to interact with AWS resources through natural language, enabling users to query and manage AWS services without using the traditional AWS Console or CLI.
      3
      6
      ISC