Get the FREE Ultimate OpenClaw Setup Guide →

k8s -and-adk-agent

This MCP server provides comprehensive Kubernetes cluster management, GKE monitoring through Google's AI Development Kit (ADK).

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio w3sqr-k8s-mcp-and-adk-agent python -m mcp.server.fastmcp \
  --env GKE_ZONE="GKE cluster zone/region" \
  --env GCP_PROJECT_ID="Your Google Cloud project ID" \
  --env MCP_SERVICE_URL="MCP server endpoint" \
  --env GKE_CLUSTER_NAME="Target GKE cluster name"

How to use

This MCP server combines Kubernetes management for GKE with ADK-powered AI insights. It exposes a set of core tools through the MCP interface to interact with a Kubernetes cluster, including retrieving cluster information, listing pods, obtaining pod logs, describing resources, checking service status, and controlling deployments. Additionally, there are AI-assisted troubleshooting capabilities and automated remediation workflows to help identify and resolve issues in the cluster. The server is designed to work with the ADK agent for conversational AI-driven decision making, enabling you to query cluster state and request targeted operations via the MCP tooling endpoints.

To use the tools, first ensure the MCP server is running and accessible at your MCP_SERVICE_URL. Discover available tools by hitting GET /tools on the MCP server, then invoke a tool by sending a POST to /tool/<name> with a JSON payload like { "args": [ ... ], "kwargs": { ... } }. The response will indicate success and return the requested data or an error message. Core tools include get_cluster_info, list_pods, get_pod_logs, describe_pod, get_service_status, get_deployment_status, delete_resource, suggest_troubleshooting, automate remediation, get_gke_cluster_metrics, scale deployment, exec pod command, and network_connectivity_test. Use these to perform common cluster management tasks and to diagnose issues with AI-assisted guidance when needed.

How to install

Prerequisites:

  • Python 3.11+ installed on the host
  • Access to the target GKE cluster (kubectl configured)
  • Internet access to fetch MCP server dependencies
  1. Prepare a Python environment (virtualenv recommended): python3 -m venv venv source venv/bin/activate

  2. Install MCP server package that provides mcp.server.fastmcp (adjust if your package source differs): pip install mcp.server.fastmcp

    If you have a requirements file or a specific source, install accordingly

  3. Set required environment variables (examples): export GCP_PROJECT_ID=your-project-id export GKE_CLUSTER_NAME=your-cluster-name export GKE_ZONE=your-cluster-zone export MCP_SERVICE_URL=http://your-mcp-server:port

  4. Run the MCP server: python -m mcp.server.fastmcp

  5. Validate by querying the MCP overview and tools endpoint: GET /tools and POST /tool/<name> as described in the readme.

Optional: containerized deployment (Docker/Kubernetes) can be used if you prefer running the MCP server inside a cluster or container registry.

Additional notes

Tips and common considerations:

  • Ensure kubectl context is configured to the target GKE cluster when performing describe, logs, or execution commands.
  • Store Vertex AI credentials securely; the ADK agent integrates with Google Cloud secret management for AI model configuration rather than embedding keys in environment variables.
  • If you encounter connectivity issues, verify MCP_SERVICE_URL accessibility from within your network and that any required RBAC permissions are in place for the MCP server to interact with the Kubernetes API.
  • The tool set includes both read-only discovery endpoints and mutating actions (e.g., delete_resource, scale deployment); use caution and confirm actions before mutating cluster state.
  • For AI-powered troubleshooting, ensure the ADK/LlmAgent integration is properly configured and that the Vertex AI/Gemini-based model is accessible via your Google Cloud project’s permissions.

Related MCP Servers

Sponsor this space

Reach thousands of developers