Skip to content
Back to search

gke-mcp

MCP serverOfficial: GoogleGitHub

GKE MCP Server and Gemini CLI Extension

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 13 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/GoogleCloudPlatform/gke-mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/GoogleCloudPlatform/gke-mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/googlecloudplatform--gke-mcp/badge.svg)](/listings/googlecloudplatform--gke-mcp)

HTML

<a href="/listings/googlecloudplatform--gke-mcp"><img src="/api/listings/googlecloudplatform--gke-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

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](https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#-installation).

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](https://go.dev/doc/install).

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](TROUBLESHOOTING.md#gke-mcp-command-not-found-on-macos-or-linux).

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](docs/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](https://developers.google.com/knowledge/api#enable_the_api) 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:** ```sh 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`: ```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`).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 196 lines · 1 finding marked
  1. # GKE MCP Server and Gemini CLI Extension
  2. Enable MCP-compatible AI agents to interact with Google Kubernetes Engine.
  3. <img src="https://raw.githubusercontent.com/GoogleCloudPlatform/gke-mcp/main/assets/gke-mcp-gemini-cli-demo.gif" alt="A demonstration of using the GKE MCP server with the Gemini CLI" width="600">
  4. ## Installation
  5. Choose a way to install the MCP Server and then connect your AI to it.
  6. ### Use as a Gemini CLI Extension
  7. 1. Install [Gemini CLI](https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#-installation).
  8. 2. Install the extension
  9. ```sh
  10. gemini extensions install https://github.com/GoogleCloudPlatform/gke-mcp.git
  11. ```
  12. ### Use in MCP Clients / Other AIs
  13. #### Quick Install (Linux & macOS only)
  14. ```sh
  15. curl -sSL https://raw.githubusercontent.com/GoogleCloudPlatform/gke-mcp/main/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 26 on GitHub
  16. ```
  17. #### Manual Install
  18. If you haven't already installed Go, follow [these instructions](https://go.dev/doc/install).
  19. Once Go is installed, run the following command to install gke-mcp:
  20. ```sh
  21. go install github.com/GoogleCloudPlatform/gke-mcp@latest
  22. ```
  23. 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`.
  24. 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.
  25. For additional help, refer to the troubleshoot section: [gke-mcp: command not found](TROUBLESHOOTING.md#gke-mcp-command-not-found-on-macos-or-linux).
  26. ### Add the MCP Server to your AI
  27. 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](docs/installation_guide/).
  28. ### Configuring the Developer Knowledge API
  29. The manifest generation agent (`generate_manifest` tool) can retrieve official GKE documentation, required annotations, and best practices using the Developer Knowledge API.
  30. To enable this capability:
  31. 1. **Enable the API:** Enable the **Developer Knowledge API** in your Google Cloud Project (refer to the [Developer Knowledge API documentation](https://developers.google.com/knowledge/api#enable_the_api) for details).
  32. 2. **Generate an API Key:** Create an API key with permissions to call the Developer Knowledge API.
  33. 3. **Configure the Environment Variable:** Set the `DK_API_KEY` environment variable when starting the MCP server:
  34. - **Gemini CLI / Terminal:**
  35. ```sh
  36. export DK_API_KEY="your-api-key-here"
  37. ```
  38. - **Cursor / Claude Desktop / Visual Studio Code:** Add the environment variable to your client's MCP configuration. For example, in `claude_desktop_config.json`:
  39. ```json
  40. {
  41. "mcpServers": {
  42. "gke-mcp": {
  43. "command": "gke-mcp",
  44. "env": {
  45. "DK_API_KEY": "your-api-key-here"
  46. }
  47. }
  48. }
  49. }
  50. ```
  51. Optional configuration:
  52. - `DK_BASE_URL`: The base URL of the Developer Knowledge API (defaults to `https://knowledge.googleapis.com`).
  53. ## MCP Tools
  54. - `cluster_toolkit_download`: Download the Cluster Toolkit Git repository.
  55. - `list_clusters`: List GKE clusters.
  56. - `get_cluster`: Get detailed information about a single GKE cluster.
  57. - `create_cluster`: Create a new GKE cluster (defaults to Autopilot).
  58. - `get_kubeconfig`: Configure kubeconfig for a GKE cluster.
  59. - `update_cluster`: Update a GKE cluster.
  60. - `get_node_sos_report`: Generate and download an SOS report from a GKE node.
  61. - `delete_cluster`: Delete a GKE cluster (if enabled).
  62. - `list_node_pools`: List node pools in a GKE cluster.
  63. - `get_node_pool`: Get details for a GKE node pool.
  64. - `create_node_pool`: Create a new node pool in a GKE cluster.
  65. - `update_node_pool`: Update a GKE node pool.
  66. - `delete_node_pool`: Delete a GKE node pool (if enabled).
  67. - `gke_deploy`: Deploy a workload to a GKE cluster using a configuration file.
  68. - `query_logs`: Query Google Cloud Platform logs using Logging Query Language (LQL).
  69. - `get_log_schema`: Get the schema for a specific GKE log type.
  70. - `list_monitored_resource_descriptors`: List monitored resource descriptors for GKE.
  71. - `list_recommendations`: List recommendations for GKE clusters.
  72. - `get_k8s_changelog`: Get Kubernetes changelog for upgrades.
  73. - `get_gke_release_notes`: Get GKE release notes.
  74. - `generate_manifest`: Generate a Kubernetes manifest using Vertex AI.
  75. - `get_k8s_resource`: Gets one or more Kubernetes resources from a cluster.
  76. - `list_k8s_events`: Retrieves events from a Kubernetes cluster.
  77. - `get_k8s_version`: Retrieves the Kubernetes server version for a given cluster.
  78. - `apply_k8s_manifest`: Applies a Kubernetes manifest to a cluster using server-side apply.
  79. - `get_k8s_logs`: Gets logs from a Kubernetes container in a pod.
  80. - `delete_k8s_resource`: Delete a Kubernetes resource from a cluster.
  81. ## MCP Prompts
  82. Prompts provide guided workflows and expert knowledge templates.
  83. - `gke:cost`: Answer natural language questions about GKE-related costs.
  84. - `gke:deploy`: Deploys a workload to a GKE cluster using a configuration file.
  85. - `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.
  86. - `gke:upgrades-best-practices-risk-report`: GKE control plane upgrade best practices, applied for the specified cluster. Helps making upgrades uneventful.
  87. ## MCP Context
  88. In addition to the tools above, a lot of value is provided through the bundled context instructions.
  89. - **Cost**: The provided instructions allows the AI to answer many questions related to GKE costs, including queries related to clusters, namespaces, and Kubernetes workloads.
  90. - **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.
  91. ## Supported MCP Transports
  92. By default, `gke-mcp` uses the [stdio](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#stdio) transport. Additionally, the [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport is supported as well.
  93. You can set the transport mode using the following options:
  94. `--server-mode`: transport to use for the server: stdio (default) or http
  95. `--server-host`: server host to use when server-mode is http; defaults to `127.0.0.1`
  96. `--server-port`: server port to use when server-mode is http; defaults to 8080
  97. ```sh
  98. gke-mcp --server-mode http --server-host 127.0.0.1 --server-port 8080
  99. ```
  100. > [!WARNING]
  101. > By default, the HTTP server binds to `127.0.0.1`, which limits access to the local machine.
  102. > 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.
  103. > Please ensure you have a firewall and/or other security measures in place if the server is not intended to be private.
  104. ### Connecting Gemini CLI to the HTTP Server
  105. 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:
  106. ```json
  107. {
  108. "mcpServers": {
  109. "gke": {
  110. "httpUrl": "http://127.0.0.1:8080/mcp"
  111. }
  112. }
  113. }
  114. ```
  115. This configuration tells Gemini CLI how to reach the gke-mcp server running on your local machine at port 8080.
  116. ## Development
  117. To compile the binary and update the `gemini-cli` extension with your local changes, follow these steps:
  118. 1. Remove the global gke-mcp configuration
  119. ```sh
  120. rm -rf ~/.gemini/extensions/gke-mcp
  121. ```
  122. 1. Build the binary from the root of the project:
  123. ```sh
  124. go build -o gke-mcp .
  125. ```
  126. 1. Run the installation command to update the extension manifest:
  127. ```sh
  128. ./gke-mcp install gemini-cli --developer
  129. ```
  130. This will make `gemini-cli` use your locally compiled binary.
  131. ## Disclaimers
  132. - The Google Cloud Platform Terms of Service (available at [https://cloud.google.com/terms/](https://cloud.google.com/terms/)) and the Data Processing and Security Terms (available at [https://cloud.google.com/terms/data-processing-terms](https://cloud.google.com/terms/data-processing-terms)) do not apply to any component of the GKE MCP Server software.
  133. - 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.
  134. - This project interacts with Large Language Models and comes with inherent risks.
  135. - **Use at Your Own Risk:** This software is experimental, non-deterministic, and provided "AS IS" with NO GUARANTEES or warranties.
  136. - **NOT FOR PRODUCTION USE.**
  137. - **Data Sensitivity:** Avoid using untrusted data. NEVER input secrets, API keys, or sensitive information.
  138. - **Verify Outputs:** LLM responses can be unpredictable and may be inaccurate. Always verify results.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.