Cover image
Try Now
2025-04-14

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

Mirrord MCP Server MVP

Overview

This project is a Minimum Viable Product (MVP) demonstrating a server that uses the Model Communication Protocol (MCP) to allow an AI assistant to test the changes it adds to an existing project against a specified Kubernetes deployment using mirrord.

It leverages the rmcp library for the MCP transport layer (specifically Server-Sent Events - SSE) and the mirrord CLI tool to inject the execution context into the target Kubernetes pod.

Goal

The primary goal is to allow developers (or potentially automated tools) to quickly test small code snippets that interact with services within a Kubernetes cluster, without needing to manually set up mirrord or build/deploy full applications for simple tests.

Features

  • MCP Server: Implements an MCP server using rmcp.
  • Mirrord Integration: Automatically configures and invokes mirrord exec to run a command string with in the context of a target Kubernetes deployment/pod.
  • Asynchronous Processing: Built with Tokio for non-blocking I/O.
  • Command Timeouts: Implements timeouts for potentially long-running external commands (kubectl, build tools, mirrord exec) to prevent hangs.
  • Graceful Shutdown: Handles Ctrl+C for clean termination.

Technology Stack

  • Rust
  • Tokio (Asynchronous Runtime)
  • rmcp (MCP Transport Library)
  • mirrord (CLI Tool)
  • kubectl (Kubernetes CLI)
  • Serde (Serialization/Deserialization)
  • Tracing (Logging)
  • Tempfile (Temporary file/directory management)

Prerequisites

Before running the server, ensure you have the following installed and configured:

  1. Rust Toolchain: Install via rustup (cargo).
  2. mirrord CLI: Install the latest version from the mirrord documentation.
  3. kubectl: Install and configure it to connect to your target Kubernetes cluster. The server needs permission to get pods within the specified namespace.

Setup & Running

  1. Clone the repository:

    git clone <your-repo-url>
    cd mirrord-mcp-server
    
  2. Build the server:

    cargo build --release
    
  3. Run the server:

    ./target/release/mirrord-mcp-server
    

By default, the server listens on 127.0.0.1:3000 and exposes the SSE endpoint at /sse.

Usage

This server is designed to be used with an MCP client. The client connects to the SSE endpoint (http://127.0.0.1:3000/sse) and sends call_tool requests.

Example Client Interaction (Conceptual):

A client would send a JSON message similar to this (structure depends on the specific tool):

{
  "tool_name": "run",
  "arguments": {
    "cmd_str": "node /abs/path/to/script.js",
    "deployment": "user-service",
    "mirrord_config": "{\"feature\": {\"network\": {\"incoming\": {\"mode\": \"mirror\", \"ports\": [8080]}}}}"
  }
}

相关推荐

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • 1Panel-dev
  • 🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

  • Byaidu
  • PDF Traduction de papier scientifique avec formats conservés - 基于 AI 完整保留排版的 PDF 文档全文双语翻译 , 支持 Google / Deepl / Olllama / Openai 等服务 , 提供 CLI / GUI / MCP / DOCKER / ZOTERO

  • rulego
  • ⛓️RULEGO est un cadre de moteur de règle d'orchestration des composants de nouvelle génération légère, intégrée, intégrée et de nouvelle génération pour GO.

  • sigoden
  • Créez facilement des outils et des agents LLM à l'aide de fonctions Plain Bash / JavaScript / Python.

  • hkr04
  • SDK C ++ MCP (Protocole de contexte modèle léger)

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信 (企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Dify 、 Claude 、 GEMINI 、 XAI 、 PPIO 、 OLLAMA 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 ChatGlm 、 Sillytraven 、 MCP 等 LLM 的机器人 / Agent | Plateforme de bots de messagerie instantanée basés sur LLM, prend en charge Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • dmayboroda
  • Rag de conversation sur site avec des conteneurs configurables

  • paulwing
  • Un référentiel de test créé à l'aide du service MCP

    Reviews

    3.5 (4)
    Avatar
    user_HQSRIVRI
    2025-04-24

    The mirrord-mcp is an exceptional tool by radugrosu. It offers seamless integration with easy-to-navigate features that significantly improve productivity. Highly recommended for anyone looking to streamline their workflow!

    Avatar
    user_neShkzFh
    2025-04-24

    mirrord-mcp is an outstanding tool by radugrosu, providing exceptional utility for MCP applications. Its user-friendly design and seamless integration make it a must-have. The clear welcome information and comprehensive features ensure a smooth experience. Highly recommended!

    Avatar
    user_ViIfTTIz
    2025-04-24

    mirrord-mcp is an outstanding tool by radugrosu that enhances my workflow significantly. The seamless integration and ease of use make it a must-have for any MCP application user. Highly recommend checking it out!

    Avatar
    user_v3NAf93L
    2025-04-24

    mirrord-mcp by radugrosu is a must-have tool for any MCP application user. It's intuitive and integrates seamlessly into my workflow, saving me significant time and effort. Highly recommend it for anyone looking to streamline their development processes. Check it out, you won't be disappointed!