loading…
Search for a command to run...
loading…
A Model Context Protocol server that provides programmatic access to Amazon EKS clusters, allowing AI assistants to manage and interact with Kubernetes resource
A Model Context Protocol server that provides programmatic access to Amazon EKS clusters, allowing AI assistants to manage and interact with Kubernetes resources. It exposes cluster operations like listing pods as callable tools through a standardized interface.
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.
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.
Before setting up the EKS MCP server, ensure you have the following installed:
Node.js (v18.0.0 or higher)
node --versionnpm (comes with Node.js)
npm --versionkubectl (Kubernetes command-line tool)
kubectl version --clientAWS CLI (for EKS cluster access)
aws --versionAWS Credentials
aws configureap-northeast-2 (or your cluster region)EKS Cluster Access
aws eks update-kubeconfig --region ap-northeast-2 --name Shared-cluster
Verify kubectl Access
kubectl config get-contextskubectl get nodescd c:\Users\ashut\OneDrive\Desktop\Kalyani\Git\eks-mcp-server
npm install
This will install:
@kubernetes/client-node - Kubernetes client library@modelcontextprotocol/sdk - MCP SDK for Node.jsVerify that all dependencies are installed correctly:
npm list
You should see:
[email protected]
├── @kubernetes/client-node@^1.4.0
└── @modelcontextprotocol/sdk@^1.26.0
The server automatically loads your kubeconfig from the default location:
~/.kube/config%USERPROFILE%\.kube\configAdd EKS cluster to kubeconfig:
aws eks update-kubeconfig --region ap-northeast-2 --name Shared-cluster --profile <your-aws-profile>
Verify context:
kubectl config get-contexts
Switch to EKS context (if needed):
kubectl config use-context eks-bastion
The server is configured in server.js with the following defaults:
eks-mcp-server1.0.0To 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"
}
}
}
}
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
node server.js
You should see output indicating the server is running:
[Listening on stdio]
Once started, the server listens for MCP protocol commands from clients and executes them based on the requested tool.
Press Ctrl+C to stop the server.
Objective: Get a list of all pods running in the Shared-cluster
kubectl --context="eks-bastion" get pods --all-namespaces -o wide
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 2/2 Running 0 6h53m 12.0.11.88 ip-12-0-11-88.ap-northeast-2.compute.internal
kube-system coredns-7dc8bfcfff-mgzh5 1/1 Running 0 6h54m 12.0.11.166 ip-12-0-11-88.ap-northeast-2.compute.internal
kube-system coredns-7dc8bfcfff-zw69f 1/1 Running 0 6h54m 12.0.11.207 ip-12-0-11-88.ap-northeast-2.compute.internal
kube-system kube-proxy-hfvxb 1/1 Running 0 6h53m 12.0.13.242 ip-12-0-13-242.ap-northeast-2.compute.internal
kube-system kube-proxy-qqzwq 1/1 Running 0 6h53m 12.0.11.88 ip-12-0-11-88.ap-northeast-2.compute.internal
Objective: View all nodes in the Shared-cluster
kubectl --context="eks-bastion" get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
ip-12-0-11-88.ap-northeast-2.compute.internal Ready <none> 6h51m v1.34.2-eks-ecaa3a6 12.0.11.88 <none> Amazon Linux 2023.10.20260120 6.12.64-87.122.amzn2023.x86_64 containerd://2.1.5
ip-12-0-13-242.ap-northeast-2.compute.internal Ready <none> 6h51m v1.34.2-eks-ecaa3a6 12.0.13.242 <none> Amazon Linux 2023.10.20260120 6.12.64-87.122.amzn2023.x86_64 containerd://2.1.5
Objective: Monitor pods in the default namespace
kubectl --context="eks-bastion" get pods -n default -w
NAME READY STATUS RESTARTS AGE
nginx-7c5d8bf9f7-7hkz5 1/1 Running 0 5m
Objective: Get detailed information about a specific pod
kubectl --context="eks-bastion" describe pod nginx-7c5d8bf9f7-7hkz5 -n default
Objective: Inspect logs from a running pod
kubectl --context="eks-bastion" logs nginx-7c5d8bf9f7-7hkz5 -n default
Cause: The kubeconfig doesn't have a context named "Shared-cluster"
Solution:
kubectl config get-contexts
eks-bastion):kubectl --context="eks-bastion" get nodes
aws eks update-kubeconfig --region ap-northeast-2 --name Shared-cluster
Cause: No network connectivity to the EKS cluster
Solution:
aws sts get-caller-identity
Cause: AWS user/role doesn't have permissions for the cluster
Solution:
kubectl --context="eks-bastion" get configmap -n kube-system aws-auth -o yaml
Cause: Application inside the pod is crashing on startup
Solution:
kubectl --context="eks-bastion" logs <pod-name> -n <namespace>
kubectl --context="eks-bastion" describe pod <pod-name> -n <namespace>
kubectl --context="eks-bastion" get pod <pod-name> -n <namespace> -o yaml | grep image
kubectl --context="eks-bastion" set image deployment/<deployment-name> <container-name>=<correct-image> -n <namespace>
Cause: Container image cannot be pulled from the registry
Solution:
docker pull <image-name>
kubectl --context="eks-bastion" set image deployment/<deployment-name> <container-name>=<correct-image> -n <namespace>
kubectl --context="eks-bastion" get pods -n default
kubectl --context="eks-bastion" get pods --all-namespaces | findstr "CrashLoopBackOff"
kubectl --context="eks-bastion" describe pod nginx-66686b6766-tdzrb -n default
kubectl --context="eks-bastion" logs nginx-66686b6766-tdzrb -n default --tail=50
kubectl --context="eks-bastion" set image deployment/nginx nginx=nginx:latest -n default
kubectl --context="eks-bastion" get pods -n default -w
kubectl --context="eks-bastion" get pods -n default
| Command | Purpose |
|---|---|
kubectl config get-contexts |
List all kubeconfig contexts |
kubectl config use-context <context> |
Switch to a context |
kubectl get nodes |
List all cluster nodes |
kubectl get nodes -o wide |
List nodes with detailed info |
kubectl get pods --all-namespaces |
List all pods across namespaces |
kubectl get pods -n <namespace> |
List pods in specific namespace |
kubectl describe pod <pod-name> -n <namespace> |
Get detailed pod info |
kubectl logs <pod-name> -n <namespace> |
View pod logs |
kubectl logs <pod-name> -n <namespace> --tail=50 |
View last 50 lines of logs |
kubectl get pods -n <namespace> -w |
Watch pods for changes |
kubectl set image deployment/<name> <container>=<image> -n <namespace> |
Update pod image |
Last Updated: February 7, 2026
Version: 1.0.0
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"eks-mcp-server": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.