GG

googlecloudplatform/gke-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

169 stars 81 forks 质量 78 趋势 37Apache-2.0

启用兼容MCP的AI代理与Google Kubernetes Engine交互。

概览

启用兼容MCP的AI代理与Google Kubernetes Engine交互。 选择一种方式安装MCP服务器,然后将你的AI连接到它。 如果你还没安装 Go,请按照这些说明操作。 安装好 Go 后,执行以下命令安装 gke-mcp: gke-mcp 二进制文件将安装在 GOBIN 环境变量指定的目录中。如果 GOBIN 未设置,默认为 $GOPATH/bin;如果 GOPATH 也未设置,则退回到 $HOME/go/bin。 你可以通过运行 go env GOBIN 找到确切位置。如果命令返回空值,运行 go env GOPATH 找到安装目录。 如需更多帮助,请参阅故障排除部分:gke-mcp: not found command not found。 有关如何将GKE MCP服务器连接到各种AI客户端(包括Cursor、Visual Studio Code、Claude Desktop和Claude Code)的详细说明,请参阅我们的专门安装指南。

概述(AI 翻译)

启用兼容MCP的AI代理与Google Kubernetes Engine交互。

安装

选择一种方式安装MCP服务器,然后将你的AI连接到它。

作为 Gemini CLI 扩展的使用

  1. 安装Gemini CLI。

  2. 安装扩展

在MCP客户端/其他人工智能中的应用

快速安装(仅限Linux和macOS)

手动安装

如果你还没安装 Go,请按照这些说明操作。

安装好 Go 后,执行以下命令安装 gke-mcp:

gke-mcp 二进制文件将安装在 GOBIN 环境变量指定的目录中。如果 GOBIN 未设置,则默认为 $GOPATH/bin;如果 GOPATH 也未设置,则退回到 $HOME/go/bin。

你可以通过运行 go env GOBIN 找到准确位置。如果命令返回空值,运行 go env GOPATH 以查找安装目录。

如需更多帮助,请参阅故障排除部分:gke-mcp: not found command not found。

将MCP服务器添加到你的AI中

有关如何将GKE MCP服务器连接到各种AI客户端(包括Cursor、Visual Studio Code、Claude Desktop和Claude Code)的详细说明,请参阅我们的专门安装指南。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

GKE MCP Server and Gemini CLI Extension

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

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": {
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "gke-mcp": { "command": "gke-mcp", "env": { "DK_API_KEY": "your-api-key-here" } } } }