EKS MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "KUBECONFIG=${KUBECONFIG}" eks-mcp-server -- node "<FULL_PATH_TO_EKS_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_EKS_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

Required:KUBECONFIG
README.md

Programmatic access to Amazon EKS clusters for AI assistants

EKS MCP Server - Setup Guide

Overview

The EKS MCP Server is a Model Context Protocol (MCP) server that provides programmatic access to Amazon EKS (Elastic Kubernetes Service) clusters. It allows you to interact with Kubernetes resources through the MCP interface, enabling integration with AI assistants and other applications.

What is MCP?

The Model Context Protocol (MCP) is a standardized protocol that allows applications to provide context and tools to large language models. This server implements the MCP protocol to expose Kubernetes operations as callable tools.


Prerequisites

Before setting up the EKS MCP server, ensure you have the following installed:

Required Software

  1. Node.js (v18.0.0 or higher)

  2. npm (comes with Node.js)

    • Verify: npm --version
  3. kubectl (Kubernetes command-line tool)

  4. AWS CLI (for EKS cluster access)

AWS Configuration

  1. AWS Credentials

    • Configure AWS credentials: aws configure
    • Provide Access Key ID and Secret Access Key
    • Set default region: ap-northeast-2 (or your cluster region)
  2. EKS Cluster Access

    • Ensure you have permissions to access the EKS cluster
    • Update kubeconfig:
      aws eks update-kubeconfig --region ap-northeast-2 --name Shared-cluster
      
  3. Verify kubectl Access

    • List available contexts: kubectl config get-contexts
    • Verify cluster connection: kubectl get nodes

Installation

Step 1: Clone or Navigate to Repository

cd c:\Users\ashut\OneDrive\Desktop\Kalyani\Git\eks-mcp-server

Step 2: Install Dependencies

npm install

This will install:

  • @kubernetes/client-node - Kubernetes client library
  • @modelcontextprotocol/sdk - MCP SDK for Node.js

Step 3: Verify Installation

Verify that all dependencies are installed correctly:

npm list

You should see:

eks-mcp-server@1.0.0
├── @kubernetes/client-node@^1.4.0
└── @modelcontextprotocol/sdk@^1.26.0

Configuration

EKS Cluster Configuration

The server automatically loads your kubeconfig from the default location:

  • Linux/macOS: ~/.kube/config
  • Windows: %USERPROFILE%\.kube\config
Configure Kubeconfig for EKS
  1. Add EKS cluster to kubeconfig:

    aws eks update-kubeconfig --region ap-northeast-2 --name Shared-cluster --profile <your-aws-profile>
    
  2. Verify context:

    kubectl config get-contexts
    
  3. Switch to EKS context (if needed):

    kubectl config use-context eks-bastion
    

MCP Server Configuration

The server is configured in server.js with the following defaults:

  • Server Name: eks-mcp-server
  • Version: 1.0.0
  • Transport: Stdio (standard input/output)
  • Capabilities: Tools
Registering with MCP Clients

To use this server with an MCP client (e.g., Claude Desktop), configure it in your MCP client settings:

For Claude Desktop (~/AppData/Roaming/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "eks-mcp-server": {
      "command": "node",
      "args": ["c:\\Users\\ashut\\OneDrive\\Desktop\\Kalyani\\Git\\eks-mcp-server\\server.js"],
      "env": {
        "KUBECONFIG": "C:\\Users\\ashut\\.kube\\config"
      }
    }
  }
}

Available Tools

1. list_pods

Lists all pods across all namespaces in the cluster.

Input: None

Output: JSON array of pod names

Example:

kubectl --context="eks-bastion" get pods --all-namespaces

Running the Server

Start the Server

node server.js

You should see output indicating the server is running:

[Listening on stdio]

Server will Wait for Commands

Once started, the server listens for MCP protocol commands from clients and executes them based on the requested tool.

Stop the Server

Press Ctrl+C to stop the server.


Demo & Usage Examples

Demo 1: List All Pods in the Cluster

Objective: Get a list of all pods running in the Shared-cluster

Manual kubectl Command:
kubectl --context="eks-bastion" get pods --all-namespaces -o wide
Expected Output (Tabular Format):
NAMESPACE     NAME                                      READY   STATUS    RESTARTS   AGE     IP              NODE
default       nginx-7c5d8bf9f7-7hkz5                   1/1     Running   0          2m      12.0.13.64      ip-12-0-13-242.ap-northeast-2.compute.internal
kube-system   aws-node-l5rdc                           2/2     Running   0          6h53m   12.0.13.242     ip-12-0-13-242.ap-northeast-2.compute.internal
kube-system   aws-node-msjfh

Tools (1)

list_podsLists all pods across all namespaces in the cluster.

Environment Variables

KUBECONFIGrequiredPath to the Kubernetes configuration file

Configuration

claude_desktop_config.json
{"mcpServers": {"eks-mcp-server": {"command": "node", "args": ["path/to/server.js"], "env": {"KUBECONFIG": "/path/to/.kube/config"}}}}

Try it

List all the pods currently running in my EKS cluster.
Can you show me a list of all pods across all namespaces?
What pods are deployed in my EKS environment?

Frequently Asked Questions

What are the key features of EKS MCP Server?

Provides programmatic access to Amazon EKS clusters. Exposes Kubernetes operations as callable tools via MCP. Integrates with AI assistants for cluster management. Supports standard kubeconfig authentication.

What can I use EKS MCP Server for?

Monitoring pod status across EKS namespaces using natural language. Automating Kubernetes resource discovery for AI-assisted troubleshooting. Integrating EKS cluster visibility directly into Claude Desktop.

How do I install EKS MCP Server?

Install EKS MCP Server by running: npm install

What MCP clients work with EKS MCP Server?

EKS MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep EKS MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare