RR

rancher/rancher-ai-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

27 stars 24 forks 品質 70 トレンド 20Apache-2.0

MCP サーバーでは、ランカーAIエージェントがローカルクラスターとダウンストリームクラスターを横断してKubernetesとランカーリソースを安全に取得または更新することができます.

概要

MCP サーバーでは、ランカーAIエージェントがローカルクラスターとダウンストリームクラスターを横断してKubernetesとランカーリソースを安全に取得または更新することができます。 エージェントが認証を常に提供するヘッダーのランチャートークンが期待されます。 このモデルコンテキストプロトコル(MCP)サーバーは、ランカーAIエージェントとKubernetesクラスター間のセキュアなブリッジを提供し、標準化されたツールインターフェイスでAI搭載クラスター管理を可能にします。 サーバは、ランカー環境内のKubernetes展開として実行し、リソースの点検、修正、クラスター操作のためのツールを公開します。 - - CLI コマンドとサーバーの初期化 - 動的リスナーサポートによる HTTP/TLS サーバーのセットアップ - root.go - ルートのコマンド設定 - - Kubernetesクライアントの抽象化 - クラスター ID の解像度を持つ動的クライアントラッパー - クラスター管理のためのランチャー API の統合 - ローカルおよび下流クラスター操作のサポート - - - ツール登録と組織 - ツールセット.

概要(AI 翻訳)

ランカー用のMCPサーバー

MCP サーバーでは、ランカーAIエージェントがローカルクラスターとダウンストリームクラスターを横断してKubernetesとランカーリソースを安全に取得または更新することができます。 エージェントが認証を常に提供するヘッダーのランチャートークンが期待されます。

概要

このモデルコンテキストプロトコル(MCP)サーバーは、ランカーAIエージェントとKubernetesクラスター間のセキュアなブリッジを提供し、標準化されたツールインターフェイスでAI搭載クラスター管理を可能にします。 サーバは、ランカー環境内のKubernetes展開として実行し、リソースの点検、修正、クラスター操作のためのツールを公開します。

アーキテクチャ

パッケージの構造

-[cmd/ - CLIコマンドとサーバーの初期化

  • [serve.go - 動的リスナーサポートによるHTTP/TLSサーバー設定、およびstdioトランスポート

  • [root.go - ルートコマンド設定

  • [pkg/client/ - Kubernetesクライアント抽象

  • クラスター ID の決断の動的クライアント ラッパー

  • クラスター管理のためのランチャーAPI統合

  • ローカルおよび下流のクラスター操作のためのサポート

-[pkg/toolsets/ - ツールの登録と組織

  • [toolsets.go - ツールコレクションの中央レジストリ

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Server for Rancher

The MCP server allows the Rancher AI agent to securely retrieve or update Kubernetes and Rancher resources across local and downstream clusters. It expects the Rancher token in a header, which the agent will always provide for authentication.

Overview

This Model Context Protocol (MCP) server provides a secure bridge between the Rancher AI agent and Kubernetes clusters, enabling AI-powered cluster management through a standardized tool interface. The server runs as a Kubernetes deployment within the Rancher environment and exposes tools for resource inspection, modification, and cluster operations.

Architecture

Package Structure

  • cmd/ - CLI commands and server initialization

    • serve.go - HTTP/TLS server setup with dynamic listener support, and stdio transport
    • root.go - Root command configuration
  • pkg/client/ - Kubernetes client abstraction

    • Dynamic client wrapper with cluster ID resolution
    • Rancher API integration for cluster management
    • Support for both local and downstream cluster operations
  • pkg/toolsets/ - Tool registration and organization

    • toolsets.go - Central registry for tool collections
    • core/ - Core Kubernetes operation tools
  • pkg/response/ - Response formatting utilities

    • Structured text and content generation for MCP responses
  • pkg/converter/ - Data transformation utilities

    • Group/Version/Resource (GVR) conversion helpers

Multi-Agent Architecture

The server is designed with a modular toolset architecture to support a multi-agent system. Each toolset contains a collection of related tools that serve a specific agent or domain within the Rancher AI ecosystem.

Current Toolsets:

  • core - Fundamental Kubernetes operations (resource management, pod inspection, metrics)

This architecture allows different AI agents to access only the tools they need, improving security, maintainability, and scalability.

TLS & Security

The server supports two modes:

  1. TLS Mode (Production): Uses Rancher’s dynamic listener with auto-generated certificates

    • Certificates stored as Kubernetes secrets
    • Automatic cert rotation and renewal
    • Client certificate authentication support
    • TLS 1.2+ with secure cipher suites
  2. Insecure Mode (Development): Plain HTTP for local testing

    • Enabled via --insecure flag or INSECURE_SKIP_TLS=true

Available Tools

Each tool is exposed through the MCP protocol and can be invoked by the Rancher AI agent. The full, up-to-date list of tools grouped by toolset is maintained in TOOLS.md, which is generated from the tool definitions.

To regenerate it after adding or changing tools, run:

go generate ./...
# or
GitHub で README 全文を見る

インストール

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

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "rancher": { "command": "mcp", "args": ["serve", "--stdio", "--rancher-url", "https://rancher.example.com", "--rancher-token", "token-xxx"] } } }