Logo GKE MCP Server and Gemini CLI Extension

GKE MCP Server and Gemini CLI Extension

Tổ chức
GoogleCloudPlatform

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

Nhà phát hànhGoogleCloudPlatform
Kho mãgke-mcp
Ngôn ngữGo
Bản fork
82
Sao
167
Công cụ có sẵn
0
Phương thức truyền tảistdio, streamable-http
Danh mục
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    GKE MCP Server and Gemini CLI Extension cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    167 sao và 82 bản fork từ kho mã được liên kết.

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

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

Use in MCP Clients / Other AIs

Quick Install (Linux & macOS only)

sh
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:

sh
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:
      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).

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

sh
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:

json
{
  "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

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

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

    sh
    ./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.

Cài đặt

TypingMind
{
  "mcpServers": {
    "gke-mcp": {
      "command": "gke-mcp",
      "args": []
    }
  }
}

Dùng MCP GKE MCP Server and Gemini CLI Extension với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối GKE MCP Server and Gemini CLI Extension, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. Bạn có thể chạy MCP ngay trên thiết bị của mình hoặc kết nối qua URL của máy chủ MCP từ xa.

Cách 1: Dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm GKE MCP Server and Gemini CLI Extension làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của GKE MCP Server and Gemini CLI Extension.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "gke-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của GKE MCP Server and Gemini CLI Extension, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của GKE MCP Server and Gemini CLI Extension.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng GKE MCP Server and Gemini CLI Extension giúp tôi làm việc này không?
GKE MCP Server and Gemini CLI Extension
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng GKE MCP Server and Gemini CLI Extension.

Cách 2: Thêm URL máy chủ MCP

Dùng cách này khi GKE MCP Server and Gemini CLI Extension đã được lưu trữ từ xa hoặc nhóm của bạn muốn có một trình kết nối dùng chung cho nhiều người dùng.

1

Mở mục Trình kết nối MCP

Trong TypingMind, vào Plugin, mở mục Trình kết nối MCP, rồi chọn Thêm URL.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Vào mục Plugin.
  3. Mở mục Trình kết nối MCP.
  4. Nhấp vào Thêm URL.
Biểu mẫu Thêm URL máy chủ MCP tùy chỉnh của TypingMind
2

Dán URL máy chủ

Nhập URL máy chủ MCP do nhà cung cấp cung cấp vào trường URL máy chủ. Thêm tên kết nối, mô tả, biểu tượng, header HTTP tùy chỉnh hoặc cài đặt ứng dụng khách OAuth nếu máy chủ yêu cầu.

  1. Dán URL máy chủ MCP do nhà cung cấp cung cấp vào trường URL máy chủ.
  2. Nhập tên kết nối cho GKE MCP Server and Gemini CLI Extension.
  3. Thêm mô tả và biểu tượng nếu bạn muốn dễ nhận biết kết nối hơn.
  4. Thêm header HTTP tùy chỉnh hoặc thông tin ứng dụng khách OAuth nếu máy chủ yêu cầu xác thực.
3

Tạo kết nối

Nhấp vào Tạo kết nối, sau đó quay lại danh sách Plugin và xác nhận kết nối MCP mới đang hoạt động.

  1. Nhấp vào Tạo kết nối.
  2. Quay lại danh sách trình kết nối MCP.
  3. Xác nhận kết nối GKE MCP Server and Gemini CLI Extension hiển thị trạng thái đang hoạt động.
  4. Làm mới danh sách plugin nếu kết nối chưa xuất hiện ngay.
4

Đổi mô hình mà không cần kết nối lại

Bắt đầu cuộc trò chuyện với mô hình bạn thích, bật các công cụ của GKE MCP Server and Gemini CLI Extension trong mục Plugin và chuyển sang mô hình khác khi cần. Kết nối MCP vẫn sẵn dùng trong không gian làm việc TypingMind.

  1. Bắt đầu cuộc trò chuyện mới trong TypingMind.
  2. Chọn mô hình AI bạn muốn dùng.
  3. Bật các công cụ của GKE MCP Server and Gemini CLI Extension trong mục Plugin.
  4. Yêu cầu mô hình dùng công cụ khi cần.
  5. Chuyển sang mô hình AI khác và dùng lại cùng kết nối MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng GKE MCP Server and Gemini CLI Extension giúp tôi làm việc này không?
GKE MCP Server and Gemini CLI Extension
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng GKE MCP Server and Gemini CLI Extension.

Câu hỏi thường gặp

Máy chủ MCP GKE MCP Server and Gemini CLI Extension dùng để làm gì?

GKE MCP Server and Gemini CLI Extension là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP GKE MCP Server and Gemini CLI Extension với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng GKE MCP Server and Gemini CLI Extension với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP GKE MCP Server and Gemini CLI Extension với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối GKE MCP Server and Gemini CLI Extension, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP GKE MCP Server and Gemini CLI Extension với TypingMind?

Bạn có thể kết nối GKE MCP Server and Gemini CLI Extension trong TypingMind bằng trình kết nối MCP cục bộ hoặc bằng cách thêm URL máy chủ MCP từ xa. Dùng trình kết nối cục bộ khi máy chủ cần truy cập tệp, ứng dụng hoặc tài nguyên riêng trên thiết bị của bạn; dùng URL máy chủ khi máy chủ MCP được lưu trữ từ xa.

MCP GKE MCP Server and Gemini CLI Extension cung cấp những công cụ nào trong TypingMind?

GKE MCP Server and Gemini CLI Extension cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP GKE MCP Server and Gemini CLI Extension không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu GKE MCP Server and Gemini CLI Extension yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇