GCP MCP Log Diagnostics
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
Klonen oder laden Sie die Projektdateien herunter.
Abhängigkeiten installieren:
pip install -r requirements.txtUmgebungsvariablen in einer
.env-Datei einrichten:GEMINI_API_KEY=your_gemini_api_key_hereStellen Sie sicher, dass Ihre Google Cloud-Anmeldedaten konfiguriert sind (z. B. über
gcloud auth application-default login).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 Umgebungsvariablengoogle-generativeai: Für die Interaktion mit Gemini AIfastmcp: Für MCP-Client- und Server-Funktionalitätgoogle-cloud-logging: Für den Zugriff auf GCP Cloud Logging
Lizenz
[Lizenzinformationen falls zutreffend hinzufügen]
This server cannot be deployed
Maintenance
Related MCP Connectors
Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.
MCP-native AI SRE: ask what's broken in production, get a reviewed GitHub fix PR.
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseCqualityDmaintenanceEnables 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.401Apache 2.0
- AlicenseNot gradedqualityFmaintenanceEnables 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 npm11MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to autonomously query AWS CloudWatch Logs and perform structured root-cause analysis via natural language prompts, using MCP tools for log group listing and Insights queries.MIT