Back to Home
agileguy icon

mcp-gke-log-server

Verified Safe

by agileguy

Overview

A Model Context Protocol (MCP) server that enables AI assistants to query and retrieve Google Kubernetes Engine logs from Cloud Logging.

Installation

Run Command
python -m gke_logs_mcp.server

Environment Variables

  • GCP_PROJECT_ID
  • DEFAULT_MAX_ENTRIES
  • DEFAULT_HOURS_BACK
  • LOG_LEVEL
  • TIMEOUT_SECONDS
  • CACHE_TTL_SECONDS

Security Notes

The server implements robust input validation for resource names and filter strings to prevent injection attacks. It uses minimal IAM permissions ('roles/logging.viewer', 'roles/container.clusterViewer'). Production deployments leverage Kubernetes Workload Identity, run as a non-root user with a read-only root filesystem, drop all capabilities, and include Network Policies to restrict traffic. No direct 'eval' or 'exec' with user-controlled input is present. The regex used for pod names and search text is passed to the Cloud Logging API, relying on GCP's security for filter evaluation.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassHigh
Avg Tokens18000
Stars0
Forks0
Last Update2025-11-30

Tags

GKEKubernetesLogsGCPAIMCP