Skip to main content
Glama

GCP MCP Protokoll-Diagnose

Dieses Projekt stellt Tools zur Diagnose von Google Cloud Platform (GCP)-Protokollen unter Verwendung des Model Context Protocol (MCP) und Google Gemini AI bereit.

Übersicht

  • diagnose.py: Ein Skript, das Gemini AI verwendet, um über MCP-Tools abgerufene GCP-Protokolle zu analysieren. Es diagnostiziert Probleme, identifiziert Grundursachen und schlägt Lösungen vor.

  • log_mcp_server.py: Ein MCP-Server, der Tools zum Abrufen von Protokollen aus GCP Cloud Logging bereitstellt.

Related MCP server: GCP Billing and Monitoring MCP Server

Voraussetzungen

  • Python 3.8+

  • Google Cloud-Projekt mit entsprechenden Berechtigungen für Cloud Logging

  • Gemini API-Schlüssel

Einrichtung

  1. Klonen oder laden Sie die Projektdateien herunter.

  2. Abhängigkeiten installieren:

    pip install -r requirements.txt
  3. Umgebungsvariablen in einer .env-Datei einrichten:

    GEMINI_API_KEY=your_gemini_api_key_here

    Stellen Sie sicher, dass Ihre Google Cloud-Anmeldedaten konfiguriert sind (z. B. über gcloud auth application-default login).

  4. Diagnose ausführen:

    python diagnose.py

Verwendung

Das Skript diagnose.py ist so konfiguriert, dass es die ERROR- und CRITICAL-Protokolle der letzten 2 Stunden aus Cloud Run abruft und eine Diagnose erstellt. Sie können die Abfrage im Skript ändern oder sie für andere Ressourcentypen erweitern.

Abhängigkeiten

  • python-dotenv: Zum Laden von Umgebungsvariablen

  • google-generativeai: Für die Interaktion mit Gemini AI

  • fastmcp: Für MCP-Client- und Server-Funktionalität

  • google-cloud-logging: Für den Zugriff auf GCP Cloud Logging

Lizenz

[Lizenzinformationen falls zutreffend hinzufügen]

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Google Cloud Platform services for log analysis and root cause investigation. Provides tools to query Cloud Logging, detect error patterns, and perform real-time log streaming across multiple GCP projects.
    MIT
  • A
    license
    C
    quality
    D
    maintenance
    Enables interaction with Google Cloud services including billing cost analysis, log querying, and metrics monitoring through natural language commands. Provides comprehensive tools for managing GCP resources, analyzing costs, detecting anomalies, and retrieving operational insights.
    40
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables AI assistants to query, search, and analyze logs across Google Cloud Platform projects. It supports advanced filtering by severity or resource type and provides detailed log entry retrieval and project listing capabilities.
    143 npm
    11
    MIT