GCP MCP Log Diagnostics
GCP MCP Log Diagnostics
Этот проект предоставляет инструменты для диагностики журналов Google Cloud Platform (GCP) с использованием протокола Model Context Protocol (MCP) и Google Gemini AI.
Обзор
diagnose.py: Скрипт, который использует Gemini AI для анализа журналов GCP, полученных с помощью инструментов MCP. Он диагностирует проблемы, определяет первопричины и предлагает исправления.log_mcp_server.py: MCP-сервер, который предоставляет инструменты для получения журналов из GCP Cloud Logging.
Related MCP server: GCP Billing and Monitoring MCP Server
Предварительные требования
Python 3.8+
Проект Google Cloud с соответствующими разрешениями для Cloud Logging
API-ключ Gemini
Настройка
Клонируйте или скачайте файлы проекта.
Установите зависимости:
pip install -r requirements.txtНастройте переменные окружения в файле
.env:GEMINI_API_KEY=your_gemini_api_key_hereУбедитесь, что ваши учетные данные Google Cloud настроены (например, через
gcloud auth application-default login).Запустите диагностику:
python diagnose.py
Использование
Скрипт diagnose.py настроен на получение журналов ERROR и CRITICAL за последние 2 часа из Cloud Run и предоставление диагностики. Вы можете изменить запрос в скрипте или расширить его для других типов ресурсов.
Зависимости
python-dotenv: Для загрузки переменных окруженияgoogle-generativeai: Для взаимодействия с Gemini AIfastmcp: Для функциональности клиента и сервера MCPgoogle-cloud-logging: Для доступа к GCP Cloud Logging
Лицензия
[Добавьте информацию о лицензии, если применимо]
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