GKE MCP Server and Gemini CLI Extension

by GoogleCloudPlatform

Enable MCP-compatible AI agents to interact with Google Kubernetes Engine. No external data files are explicitly required or configured via environment variables.

Developer toolsstdioCommunity

Repository-wide counts · Cached 2026-03-31

Overview

The GKE MCP Server and Gemini CLI Extension MCP server is a publicly available project. Review the upstream repository for installation instructions, supported tools, compatibility, permissions, and current maintenance status.

Configuration

Configuration, transport, authentication, and runtime requirements vary by project. Open the repository before connecting and use the smallest set of credentials and permissions required.

Open the GKE MCP Server and Gemini CLI Extension repository to read the latest documentation.

KEEP EXPLORING

Compare source, connection, and authentication details before choosing an implementation.

View the complete category

模型上下文协议服务器

modelcontextprotocol

Community

一组用于模型上下文协议(MCP)的参考实现,展示了对大型语言模型(LLM)工具和数据源的安全且受控的访问方式。

Context7 Platform - Up-to-date Code Docs For Any Prompt

upstash

Community

Context7 MCP server providing up-to-date, version-specific documentation and code examples for libraries, enabling coding agents to fetch accurate docs and code snippets. Requires an API key for higher rate limits, passed via CONTEXT7_API_KEY header.

Playwright MCP

Microsoft Corporation

Community

A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. Enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.

AIHawk

feder-cr

Community

AIHawk is an anti detect browser and web browsing agent, open source, with an MCP server for coding agents: undetected, no captchas, no blocks. It requires an OpenRouter API key for the standalone web UI mode, which can be provided via the --openrouter-key flag or the OPENROUTER_API_KEY environment variable or a .env file in the running directory.

FROM THE SOURCE

Repository README

Build-time snapshot · Retrieved 2026-10-05

View original

GKE MCP Server and Gemini CLI Extension

Enable MCP-compatible AI agents to interact with Google Kubernetes Engine.

A demonstration of using the GKE MCP server with the Gemini CLI

Installation

Choose a way to install the MCP Server and then connect your AI to it.

Use as a Gemini CLI Extension

  1. Install Gemini CLI.

  2. Install the extension

gemini extensions install https://github.com/GoogleCloudPlatform/gke-mcp.git

Use in MCP Clients / Other AIs

Quick Install (Linux & macOS only)
curl -sSL https://raw.githubusercontent.com/GoogleCloudPlatform/gke-mcp/main/install.sh | bash
Manual Install

If you haven't already installed Go, follow these instructions.

Once Go is installed, run the following command to install gke-mcp:

go install github.com/GoogleCloudPlatform/gke-mcp@latest

The gke-mcp binary will be installed in the directory specified by the GOBIN environment variable. If GOBIN is not set, it defaults to $GOPATH/bin and, if GOPATH is also not set, it falls back to $HOME/go/bin.

You can find the exact location by running go env GOBIN. If the command returns an empty value, run go env GOPATH to find the installation directory.

For additional help, refer to the troubleshoot section: gke-mcp: command not found.

Add the MCP Server to your AI

For detailed instructions on how to connect the GKE MCP Server to various AI clients, including Cursor, Visual Studio Code, Claude Desktop, and Claude Code, please refer to our dedicated installation guide.

Configuring the Developer Knowledge API

The manifest generation agent (generate_manifest tool) can retrieve official GKE documentation, required annotations, and best practices using the Developer Knowledge API.

To enable this capability:

  1. Enable the API: Enable the Developer Knowledge API in your Google Cloud Project (refer to the Developer Knowledge API documentation for details).
  2. Generate an API Key: Create an API key with permissions to call the Developer Knowledge API.
  3. Configure the Environment Variable: Set the DK_API_KEY environment variable when starting the MCP server:
    • Gemini CLI / Terminal:
      export DK_API_KEY="your-api-key-here"
      
    • Cursor / Claude Desktop / Visual Studio Code: Add the environment variable to your client's MCP configuration. For example, in claude_desktop_config.json:
      {
        "mcpServers": {
          "gke-mcp": {
            "command": "gke-mcp",
            "env": {
              "DK_API_KEY": "your-api-key-here"
            }
          }
        }
      }
      

Optional configuration:

  • DK_BASE_URL: The base URL of the Developer Knowledge API (defaults to https://knowledge.googleapis.com).

MCP Tools

  • cluster_toolkit_download: Download the Cluster Toolkit Git repository.
  • list_clusters: List GKE clusters.
  • get_cluster: Get detailed information about a single GKE cluster.
  • create_cluster: Create a new GKE cluster (defaults to Autopilot).
  • get_kubeconfig: Configure kubeconfig for a GKE cluster.
  • update_cluster: Update a GKE cluster.
  • get_node_sos_report: Generate and download an SOS report from a GKE node.
  • delete_cluster: Delete a GKE cluster (if enabled).
  • list_node_pools: List node pools in a GKE cluster.
  • get_node_pool: Get details for a GKE node pool.
  • create_node_pool: Create a new node pool in a GKE cluster.
  • update_node_pool: Update a GKE node pool.
  • delete_node_pool: Delete a GKE node pool (if enabled).
  • gke_deploy: Deploy a workload to a GKE cluster using a configuration file.
  • query_logs: Query Google Cloud Platform logs using Logging Query Language (LQL).
  • get_log_schema: Get the schema for a specific GKE log type.
  • list_monitored_resource_descriptors: List monitored resource descriptors for GKE.
  • list_recommendations: List recommendations for GKE clusters.
  • get_k8s_changelog: Get Kubernetes changelog for upgrades.
  • get_gke_release_notes: Get GKE release notes.
  • generate_manifest: Generate a Kubernetes manifest using Vertex AI.
  • get_k8s_resource: Gets one or more Kubernetes resources from a cluster.
  • list_k8s_events: Retrieves events from a Kubernetes cluster.
  • get_k8s_version: Retrieves the Kubernetes server version for a given cluster.
  • apply_k8s_manifest: Applies a Kubernetes manifest to a cluster using server-side apply.
  • get_k8s_logs: Gets logs from a Kubernetes container in a pod.
  • delete_k8s_resource: Delete a Kubernetes resource from a cluster.

MCP Prompts

Prompts provide guided workflows and expert knowledge templates.

  • gke:cost: Answer natural language questions about GKE-related costs.
  • gke:deploy: Deploys a workload to a GKE cluster using a configuration file.
  • gke:upgrade-risk-report: GKE control plane upgrade risk report, analyzing the potential risks of upgrading from its current version to the target version. Performs pre-upgrade checks, API deprecations scans, and more.
  • gke:upgrades-best-practices-risk-report: GKE control plane upgrade best practices, applied for the specified cluster. Helps making upgrades uneventful.

MCP Context

In addition to the tools above, a lot of value is provided through the bundled context instructions.

  • Cost: The provided instructions allows the AI to answer many questions related to GKE costs, including queries related to clusters, namespaces, and Kubernetes workloads.

  • GKE Known Issues: The provided instructions allows the AI to fetch the latest GKE Known issues and check whether the cluster is affected by one of these known issues.

Supported MCP Transports

By default, gke-mcp uses the stdio transport. Additionally, the Streamable HTTP transport is supported as well.

You can set the transport mode using the following options:

--server-mode: transport to use for the server: stdio (default) or http

--server-host: server host to use when server-mode is http; defaults to 127.0.0.1

--server-port: server port to use when server-mode is http; defaults to 8080

gke-mcp --server-mode http --server-host 127.0.0.1 --server-port 8080

[!WARNING] By default, the HTTP server binds to 127.0.0.1, which limits access to the local machine. If you explicitly set --server-host 0.0.0.0 or another non-loopback address, the server may become reachable from other machines on your network. Please ensure you have a firewall and/or other security measures in place if the server is not intended to be private.

Connecting Gemini CLI to the HTTP Server

To connect Gemini CLI to the gke-mcp HTTP server, you need to configure the CLI to point to the correct endpoint. You can do this by updating your ~/.gemini/settings.json file. For a basic setup without authentication, the file should look like this:

{
  "mcpServers": {
    "gke": {
      "httpUrl": "http://127.0.0.1:8080/mcp"
    }
  }
}

This configuration tells Gemini CLI how to reach the gke-mcp server running on your local machine at port 8080.

Development

To compile the binary and update the gemini-cli extension with your local changes, follow these steps:

  1. Remove the global gke-mcp configuration

    rm -rf ~/.gemini/extensions/gke-mcp
    
  2. Build the binary from the root of the project:

    go build -o gke-mcp .
    
  3. Run the installation command to update the extension manifest:

    ./gke-mcp install gemini-cli --developer
    

    This will make gemini-cli use your locally compiled binary.

Disclaimers

  • The Google Cloud Platform Terms of Service (available at https://cloud.google.com/terms/) and the Data Processing and Security Terms (available at https://cloud.google.com/terms/data-processing-terms) do not apply to any component of the GKE MCP Server software.
  • This tool is provided for education and experimentation, and is not an officially supported Google product. It is maintained on a best-effort basis, and may change without notice.
  • This project interacts with Large Language Models and comes with inherent risks.
    • Use at Your Own Risk: This software is experimental, non-deterministic, and provided "AS IS" with NO GUARANTEES or warranties.
    • NOT FOR PRODUCTION USE.
    • Data Sensitivity: Avoid using untrusted data. NEVER input secrets, API keys, or sensitive information.
    • Verify Outputs: LLM responses can be unpredictable and may be inaccurate. Always verify results.