Sponsored by Deepsite.site

DynamicEnv MCP Server

Created By
yonathan-shtekel8 months ago
Kubernetes MCP server for managing DynamicEnv custom resources with real-time updates and AI-driven integration.
Content

DynamicEnv MCP Server

License Python

A high-performance Kubernetes MCP server for managing DynamicEnv custom resources with real-time updates and AI-driven integration.


✨ Overview

DynamicEnv MCP Server provides an AI-friendly API interface over DynamicEnv Kubernetes Custom Resources, enabling real-time tracking, intelligent debugging, and simplified cleanup for dynamic environments used in development, testing, and ephemeral workloads.

Built with async-first architecture and designed to integrate seamlessly with Model Context Protocol (MCP), it empowers developers and AI agents alike to manage K8s-based environments safely and efficiently.


🔍 What is DynamicEnv?

DynamicEnv is a Kubernetes Custom Resource (CRD) that encapsulates an entire dynamic environment setup. These environments typically include:

  • Multiple interdependent services
  • Service-specific configurations (secrets, configs, env vars)
  • Routing rules (Ingress, Service Mesh)
  • Resource constraints (CPU, memory quotas)

This server enhances observability and control over these resources.


🚀 Why MCP?

The Model Context Protocol (MCP) enables AI tools to:

  • Subscribe to real-time updates
  • Manage long-running async operations with progress tracking
  • Work safely via validation and structured context
  • Improve DevOps workflows using intelligent command suggestions

📄 Key Features

  • List & filter DynamicEnv instances by namespace, state, or deployment status
  • Live status monitoring with async updates and progress reporting
  • Safe deletion of environments with dependency checks
  • ⚖️ Secure K8s auth using in-cluster or kubeconfig credentials
  • 🔍 Pod insights, deployment health, and optional logs
  • AI-ready interface via MCP

🗓 Quick Start

# Clone the repository
git clone https://github.com/yonathan-shtekel/mcp-server-dynamic-env.git
cd mcp-server-dynamic-env

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Install dependencies
uv pip install -e .

📖 Usage

Local Development

# Install MCP tools
pip install "mcp[cli]"

# Start the server with development tools
mcp dev server.py

# Or install and run in Claude Desktop
mcp install server.py

# Or simply run
mcp run server.py

Core CLI Tools

ToolDescription
ListView all DynamicEnvs with namespace/state filtering
StatusInspect deployments, pods, and logs
DeleteSafely delete a DynamicEnv instance from a namespace

📁 Project Structure

src/
  kubernetes_client.py     # Kubernetes API wrapper
  dynamicenv_service.py    # Business logic
  utils.py                 # Helpers
  models/
    dynamicenv.py          # Typed data models
tests/                     # Unit & integration tests
server.py                  # MCP-compatible API server
pyproject.toml             # Project config and dependencies

🔧 Testing

# Run test suite
pytest tests/ -v

# With coverage report
pytest tests/ -v --cov=src

💪 Contributing

We welcome all contributions! Here's how to get started:

  1. Fork the repo
  2. Create a new branch
    git checkout -b feature/my-awesome-feature
    
  3. Commit and push your code
    git commit -m "Add awesome feature"
    git push origin feature/my-awesome-feature
    
  4. Submit a Pull Request

Please include tests and documentation updates if applicable.


💼 License

This project is licensed under the MIT License — see the LICENSE file for details.


👤 Author

Yonathan Shtekel
GitHub: @yonathan-shtekel


✨ Show Support

Give this project a ⭐️ if it helped you or your team!


Built with ❤️ and powered by Model Context Protocol (MCP)

Development

Linting and Formatting

This project uses ruff for linting and formatting. To run the linters:

# Check for linting issues
ruff check src tests

# Auto-fix linting issues
ruff check --fix src tests

# Format code
ruff format src tests

The linting configuration is defined in pyproject.toml and includes:

  • Code style (PEP 8)
  • Import sorting
  • Type annotation checks
  • Best practices
  • Code complexity

Additional Static Analysis

The project also includes other static analysis tools:

# Type checking
mypy src tests

# Security checks
bandit -r src
safety check

# Documentation coverage
interrogate src

All these checks are run automatically in CI/CD pipelines.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Amap Maps高德地图官方 MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™