EKS Model Context Protocol (MCP) Server

by mahmoudsalah84

333 downloads
Not rated
GitHub

Description

# EKS Model Context Protocol (MCP) Server A lightweight, efficient server that implements the Model Context Protocol for EKS operations. This server provides a standardized interface for GenAI agents to interact with EKS clusters. ## Features - Fast response times with proper…

About

# EKS Model Context Protocol (MCP) Server A lightweight, efficient server that implements the Model Context Protocol for EKS operations. This server provides a standardized interface for GenAI agents to interact with EKS clusters. ## Features - Fast response times with proper timeout handling - Comprehensive EKS…

Details

Author
mahmoudsalah84
Downloads
333
Categories
Other

- Fast response times with proper timeout handling
- Comprehensive EKS and Kubernetes operations support
- Multiple authentication methods for EKS clusters
- Robust error handling and detailed logging
- Docker containerization for easy deployment
- ECS deployment support with client using Amazon Bedrock

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name EKS Model Context Protocol (MCP) Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Run locally with Python (pip install -r requirements.txt, then python main.py) or with Docker (docker build -t eks-mcp-server . && docker run -d -p 8000:8000 --name mcp-server eks-mcp-server). Docker Compose (docker-compose up -d) and ECS deployment scripts are also provided. Tests are available via test_*.py scripts.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "eks model context protocol (mcp) server": {
            "eks-mcp-server-new": {
                "command": "python",
                "args": [
                    "main.py"
                ]
            }
        }
    }
}

McpServers

{
    "eks-mcp-server-new": {
        "command": "python",
        "args": [
            "main.py"
        ]
    }
}

EKS Model Context Protocol (MCP) Server

A lightweight, efficient server that implements the Model Context Protocol for EKS operations. This server provides a standardized interface for GenAI agents to interact with EKS clusters.

Features

- Fast response times with proper timeout handling
- Comprehensive EKS operations support
- Kubernetes resource management (pods, services, deployments, etc.)
- Multiple authentication methods for EKS clusters
- Robust error handling and logging
- Docker containerization for easy deployment
- ECS deployment support

Project Structure

- main.py: Main server implementation with FastAPI
- eks_operations.py: EKS API operations implementation
- k8s_operations.py: Kubernetes API operations implementation
- k8s_operations_sdk_v4.py: SDK-based Kubernetes operations implementation
- k8s_operations_kubectl.py: Kubectl-based Kubernetes operations with proper authentication
- k8s_auth_config.py: Authentication configuration for Kubernetes
- direct_k8s_client.py: Direct Kubernetes API client implementation
- test_*.py: Various test scripts for different implementations
- Dockerfile and Dockerfile.amd64: Docker configuration files
- docker-compose.yml: Docker Compose configuration
- requirements.txt: Python dependencies
- client/: Client implementation directory (Client README)
- ecs-deployment/: ECS deployment scripts and configuration (ECS Deployment README)

API Endpoints

- GET /health - Health check endpoint
- GET /mcp/v1/operations - List available operations
- POST /mcp/v1/query - Execute MCP operations

Supported Operations

EKS Cluster Operations

- list_clusters - List EKS clusters in a region - describe_cluster - Get detailed information about a cluster - list_nodegroups - List nodegroups for a cluster - describe_nodegroup - Get detailed information about a nodegroup

Kubernetes Operations

- list_namespaces - List Kubernetes namespaces - list_pods - List pods in a namespace - describe_pod - Get detailed information about a pod - get_deployments - List deployments in a namespace - describe_deployment - Get detailed information about a deployment - get_services - List services in a namespace - describe_service - Get detailed information about a service - get_pod_logs - Get logs from a pod

Authentication Methods

The server supports multiple authentication methods for EKS clusters:

1. AWS SDK Authentication: Uses the AWS SDK to authenticate with EKS and get cluster information
2. Kubectl with Generated Kubeconfig: Creates a temporary kubeconfig file and uses kubectl
3. Direct Kubernetes API Calls: Makes direct API calls to the Kubernetes API server

The current implementation uses the Kubectl method with proper authentication, which provides the most reliable results.

Getting Started

Prerequisites

- Docker
- AWS credentials (for production use)
- Python 3.8+ (for local development)

Running Locally

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.