awslabs.eks-mcp-server 0.1.2__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/Dockerfile +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/PKG-INFO +146 -15
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/README.md +145 -14
- awslabs_eks_mcp_server-0.1.3/awslabs/__init__.py +16 -0
- awslabs_eks_mcp_server-0.1.3/awslabs/eks_mcp_server/__init__.py +17 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/aws_helper.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/cloudwatch_handler.py +75 -77
- awslabs_eks_mcp_server-0.1.3/awslabs/eks_mcp_server/cloudwatch_metrics_guidance_handler.py +141 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/consts.py +9 -6
- awslabs_eks_mcp_server-0.1.3/awslabs/eks_mcp_server/data/eks_cloudwatch_metrics_guidance.json +287 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/eks_kb_handler.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/eks_stack_handler.py +17 -7
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/iam_handler.py +14 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/k8s_apis.py +13 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/k8s_client_cache.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/k8s_handler.py +20 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/logging_helper.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/models.py +24 -10
- awslabs_eks_mcp_server-0.1.3/awslabs/eks_mcp_server/scripts/update_eks_cloudwatch_metrics_guidance.py +280 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/server.py +16 -7
- awslabs_eks_mcp_server-0.1.3/docker-healthcheck.sh +26 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/pyproject.toml +1 -1
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_aws_helper.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_cloudwatch_handler.py +473 -177
- awslabs_eks_mcp_server-0.1.3/tests/test_cloudwatch_metrics_guidance_handler.py +135 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_eks_kb_handler.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_eks_stack_handler.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_iam_handler.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_init.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_k8s_apis.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_k8s_client_cache.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_k8s_handler.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_logging_helper.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_main.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_models.py +9 -6
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/tests/test_server.py +9 -6
- awslabs_eks_mcp_server-0.1.2/awslabs/__init__.py +0 -13
- awslabs_eks_mcp_server-0.1.2/awslabs/eks_mcp_server/__init__.py +0 -14
- awslabs_eks_mcp_server-0.1.2/docker-healthcheck.sh +0 -12
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/.gitignore +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/.pre-commit-config.yaml +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/.python-version +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/CHANGELOG.md +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/LICENSE +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/NOTICE +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/templates/eks-templates/eks-with-vpc.yaml +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/templates/k8s-templates/deployment.yaml +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/templates/k8s-templates/service.yaml +0 -0
- {awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/uv.lock +0 -0
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1 AS uv
|
|
13
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.eks-mcp-server
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for EKS
|
|
5
5
|
Project-URL: homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: docs, https://awslabs.github.io/mcp/servers/eks-mcp-server/
|
|
@@ -90,10 +90,11 @@ For read operations, the following permissions are required:
|
|
|
90
90
|
### Write Operations Policy
|
|
91
91
|
|
|
92
92
|
For write operations, we recommend the following IAM policies to ensure successful deployment of EKS clusters using the CloudFormation template in `/awslabs/eks_mcp_server/templates/eks-templates/eks-with-vpc.yaml`:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
|
|
94
|
+
* [**IAMFullAccess**](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/IAMFullAccess.html): Enables creation and management of IAM roles and policies required for cluster operation
|
|
95
|
+
* [**AmazonVPCFullAccess**](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonVPCFullAccess.html): Allows creation and configuration of VPC resources including subnets, route tables, internet gateways, and NAT gateways
|
|
96
|
+
* [**AWSCloudFormationFullAccess**](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSCloudFormationFullAccess.html): Provides permissions to create, update, and delete CloudFormation stacks that orchestrate the deployment
|
|
97
|
+
* **EKS Full Access (provided below)**: Required for creating and managing EKS clusters, including control plane configuration, node groups, and add-ons
|
|
97
98
|
```
|
|
98
99
|
{
|
|
99
100
|
"Version": "2012-10-17",
|
|
@@ -129,6 +130,30 @@ This quickstart guide walks you through the steps to configure the Amazon EKS MC
|
|
|
129
130
|
2. Click the gear icon (⚙️) in the top right to open the settings panel, click **MCP**, **Add new global MCP server**.
|
|
130
131
|
3. Paste your MCP server definition. For example, this example shows how to configure the EKS MCP Server, including enabling mutating actions by adding the `--allow-write` flag to the server arguments:
|
|
131
132
|
|
|
133
|
+
**For Mac/Linux:**
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
{
|
|
137
|
+
"mcpServers": {
|
|
138
|
+
"awslabs.eks-mcp-server": {
|
|
139
|
+
"autoApprove": [],
|
|
140
|
+
"disabled": false,
|
|
141
|
+
"command": "uvx",
|
|
142
|
+
"args": [
|
|
143
|
+
"awslabs.eks-mcp-server@latest",
|
|
144
|
+
"--allow-write"
|
|
145
|
+
],
|
|
146
|
+
"env": {
|
|
147
|
+
"FASTMCP_LOG_LEVEL": "ERROR"
|
|
148
|
+
},
|
|
149
|
+
"transportType": "stdio"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**For Windows:**
|
|
156
|
+
|
|
132
157
|
```
|
|
133
158
|
{
|
|
134
159
|
"mcpServers": {
|
|
@@ -137,7 +162,9 @@ This quickstart guide walks you through the steps to configure the Amazon EKS MC
|
|
|
137
162
|
"disabled": false,
|
|
138
163
|
"command": "uvx",
|
|
139
164
|
"args": [
|
|
165
|
+
"--from",
|
|
140
166
|
"awslabs.eks-mcp-server@latest",
|
|
167
|
+
"awslabs.eks-mcp-server.exe",
|
|
141
168
|
"--allow-write"
|
|
142
169
|
],
|
|
143
170
|
"env": {
|
|
@@ -158,6 +185,8 @@ This quickstart guide walks you through the steps to configure the Amazon EKS MC
|
|
|
158
185
|
1. Install the [Amazon Q Developer CLI](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html) .
|
|
159
186
|
2. The Q Developer CLI supports MCP servers for tools and prompts out-of-the-box. Edit your Q developer CLI's MCP configuration file named mcp.json following [these instructions](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-configuration.html). For example:
|
|
160
187
|
|
|
188
|
+
**For Mac/Linux:**
|
|
189
|
+
|
|
161
190
|
```
|
|
162
191
|
{
|
|
163
192
|
"mcpServers": {
|
|
@@ -174,6 +203,24 @@ This quickstart guide walks you through the steps to configure the Amazon EKS MC
|
|
|
174
203
|
}
|
|
175
204
|
```
|
|
176
205
|
|
|
206
|
+
**For Windows:**
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
{
|
|
210
|
+
"mcpServers": {
|
|
211
|
+
"awslabs.eks-mcp-server": {
|
|
212
|
+
"command": "uvx",
|
|
213
|
+
"args": ["--from", "awslabs.eks-mcp-server@latest", "awslabs.eks-mcp-server.exe"],
|
|
214
|
+
"env": {
|
|
215
|
+
"FASTMCP_LOG_LEVEL": "ERROR"
|
|
216
|
+
},
|
|
217
|
+
"autoApprove": [],
|
|
218
|
+
"disabled": false
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
177
224
|
3. Verify your setup by running the `/tools` command in the Q Developer CLI to see the available EKS MCP tools.
|
|
178
225
|
|
|
179
226
|
Note that this is a basic quickstart. You can enable additional capabilities, such as [running MCP servers in containers](https://github.com/awslabs/mcp?tab=readme-ov-file#running-mcp-servers-in-containers) or combining more MCP servers like the [AWS Documentation MCP Server](https://awslabs.github.io/mcp/servers/aws-documentation-mcp-server/) into a single MCP server definition. To view an example, see the [Installation and Setup](https://github.com/awslabs/mcp?tab=readme-ov-file#installation-and-setup) guide in AWS MCP Servers on GitHub. To view a real-world implementation with application code in context with an MCP server, see the [Server Developer](https://modelcontextprotocol.io/quickstart/server) guide in Anthropic documentation.
|
|
@@ -184,6 +231,7 @@ Note that this is a basic quickstart. You can enable additional capabilities, su
|
|
|
184
231
|
|
|
185
232
|
The `args` field in the MCP server definition specifies the command-line arguments passed to the server when it starts. These arguments control how the server is executed and configured. For example:
|
|
186
233
|
|
|
234
|
+
**For Mac/Linux:**
|
|
187
235
|
```
|
|
188
236
|
{
|
|
189
237
|
"mcpServers": {
|
|
@@ -203,11 +251,39 @@ The `args` field in the MCP server definition specifies the command-line argumen
|
|
|
203
251
|
}
|
|
204
252
|
```
|
|
205
253
|
|
|
206
|
-
|
|
254
|
+
**For Windows:**
|
|
255
|
+
```
|
|
256
|
+
{
|
|
257
|
+
"mcpServers": {
|
|
258
|
+
"awslabs.eks-mcp-server": {
|
|
259
|
+
"command": "uvx",
|
|
260
|
+
"args": [
|
|
261
|
+
"--from",
|
|
262
|
+
"awslabs.eks-mcp-server@latest",
|
|
263
|
+
"awslabs.eks-mcp-server.exe",
|
|
264
|
+
"--allow-write",
|
|
265
|
+
"--allow-sensitive-data-access"
|
|
266
|
+
],
|
|
267
|
+
"env": {
|
|
268
|
+
"AWS_PROFILE": "your-profile",
|
|
269
|
+
"AWS_REGION": "us-east-1"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
207
275
|
|
|
208
|
-
|
|
276
|
+
#### Command Format
|
|
209
277
|
|
|
210
|
-
|
|
278
|
+
The command format differs between operating systems:
|
|
279
|
+
|
|
280
|
+
**For Mac/Linux:**
|
|
281
|
+
* `awslabs.eks-mcp-server@latest` - Specifies the latest package/version specifier for the MCP client config.
|
|
282
|
+
|
|
283
|
+
**For Windows:**
|
|
284
|
+
* `--from awslabs.eks-mcp-server@latest awslabs.eks-mcp-server.exe` - Windows requires the `--from` flag to specify the package and the `.exe` extension.
|
|
285
|
+
|
|
286
|
+
Both formats enable MCP server startup and tool registration.
|
|
211
287
|
|
|
212
288
|
#### `--allow-write` (optional)
|
|
213
289
|
|
|
@@ -401,24 +477,45 @@ Features:
|
|
|
401
477
|
Parameters:
|
|
402
478
|
|
|
403
479
|
* cluster_name, log_type (application, host, performance, control-plane, custom), resource_type (pod, node, container, cluster),
|
|
404
|
-
resource_name, minutes (optional), start_time (optional), end_time (optional), limit (optional), filter_pattern (optional), fields (optional)
|
|
480
|
+
resource_name (optional), minutes (optional), start_time (optional), end_time (optional), limit (optional), filter_pattern (optional), fields (optional)
|
|
405
481
|
|
|
406
482
|
#### `get_cloudwatch_metrics`
|
|
407
483
|
|
|
408
|
-
Retrieves metrics from CloudWatch for
|
|
484
|
+
Retrieves metrics from CloudWatch for Kubernetes resources.
|
|
409
485
|
|
|
410
486
|
Features:
|
|
411
487
|
|
|
412
|
-
* Fetches metrics based on
|
|
413
|
-
* Allows specification of CloudWatch namespace
|
|
488
|
+
* Fetches metrics based on metric name and dimensions.
|
|
489
|
+
* Allows specification of CloudWatch namespace and time range.
|
|
414
490
|
* Configurable period, statistic (Average, Sum, etc.), and limit for data points.
|
|
415
491
|
* Supports providing custom dimensions for fine-grained metric querying.
|
|
416
492
|
|
|
417
493
|
Parameters:
|
|
418
494
|
|
|
419
|
-
* cluster_name, metric_name,
|
|
420
|
-
|
|
421
|
-
|
|
495
|
+
* cluster_name, metric_name, namespace, dimensions, minutes (optional), start_time (optional), end_time (optional), limit (optional), stat (optional), period (optional)
|
|
496
|
+
|
|
497
|
+
#### `get_eks_metrics_guidance`
|
|
498
|
+
|
|
499
|
+
Provides guidance on available CloudWatch metrics for different resource types in EKS clusters.
|
|
500
|
+
|
|
501
|
+
Features:
|
|
502
|
+
|
|
503
|
+
* Returns a list of available Container Insights metrics for the specified resource type, including metric names, dimensions, and descriptions.
|
|
504
|
+
* Helps determine the correct dimensions to use with the `get_cloudwatch_metrics` tool.
|
|
505
|
+
* Supports the following resource types:
|
|
506
|
+
* `cluster`: Metrics for EKS clusters (e.g., cluster_node_count, cluster_failed_node_count)
|
|
507
|
+
* `node`: Metrics for EKS nodes (e.g., node_cpu_utilization, node_memory_utilization, node_network_total_bytes)
|
|
508
|
+
* `pod`: Metrics for Kubernetes pods (e.g., pod_cpu_utilization, pod_memory_utilization, pod_network_rx_bytes)
|
|
509
|
+
* `namespace`: Metrics for Kubernetes namespaces (e.g., namespace_number_of_running_pods)
|
|
510
|
+
* `service`: Metrics for Kubernetes services (e.g., service_number_of_running_pods)
|
|
511
|
+
|
|
512
|
+
Parameters:
|
|
513
|
+
|
|
514
|
+
* resource_type
|
|
515
|
+
|
|
516
|
+
Implementation:
|
|
517
|
+
|
|
518
|
+
The data in `/awslabs/eks_mcp_server/data/eks_cloudwatch_metrics_guidance.json` is generated by a Python script (`/awslabs/eks_mcp_server/scripts/update_eks_cloudwatch_metrics_guidance.py`) that scrapes the [Container Insights metrics table](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-metrics-EKS.html) from AWS documentation. Running the script requires installing BeautifulSoup (used for parsing HTML content) with uv: `uv pip install bs4`.
|
|
422
519
|
|
|
423
520
|
### IAM Integration
|
|
424
521
|
|
|
@@ -505,6 +602,7 @@ The EKS MCP Server can be used for production environments with proper security
|
|
|
505
602
|
|
|
506
603
|
An array within the MCP server definition that lists tool names to be automatically approved by the EKS MCP Server client, bypassing user confirmation for those specific tools. For example:
|
|
507
604
|
|
|
605
|
+
**For Mac/Linux:**
|
|
508
606
|
```
|
|
509
607
|
{
|
|
510
608
|
"mcpServers": {
|
|
@@ -535,6 +633,39 @@ An array within the MCP server definition that lists tool names to be automatica
|
|
|
535
633
|
}
|
|
536
634
|
```
|
|
537
635
|
|
|
636
|
+
**For Windows:**
|
|
637
|
+
```
|
|
638
|
+
{
|
|
639
|
+
"mcpServers": {
|
|
640
|
+
"awslabs.eks-mcp-server": {
|
|
641
|
+
"command": "uvx",
|
|
642
|
+
"args": [
|
|
643
|
+
"--from",
|
|
644
|
+
"awslabs.eks-mcp-server@latest",
|
|
645
|
+
"awslabs.eks-mcp-server.exe"
|
|
646
|
+
],
|
|
647
|
+
"env": {
|
|
648
|
+
"AWS_PROFILE": "eks-mcp-readonly-profile",
|
|
649
|
+
"AWS_REGION": "us-east-1",
|
|
650
|
+
"FASTMCP_LOG_LEVEL": "INFO"
|
|
651
|
+
},
|
|
652
|
+
"autoApprove": [
|
|
653
|
+
"manage_eks_stacks",
|
|
654
|
+
"manage_k8s_resource",
|
|
655
|
+
"list_k8s_resources",
|
|
656
|
+
"get_pod_logs",
|
|
657
|
+
"get_k8s_events",
|
|
658
|
+
"get_cloudwatch_logs",
|
|
659
|
+
"get_cloudwatch_metrics",
|
|
660
|
+
"get_policies_for_role",
|
|
661
|
+
"search_eks_troubleshoot_guide",
|
|
662
|
+
"list_api_versions"
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
```
|
|
668
|
+
|
|
538
669
|
### IAM Permissions Management
|
|
539
670
|
|
|
540
671
|
When the `--allow-write` flag is enabled, the EKS MCP Server can create missing IAM permissions for EKS resources through the `add_inline_policy` tool. This tool enables the following:
|
|
@@ -56,10 +56,11 @@ For read operations, the following permissions are required:
|
|
|
56
56
|
### Write Operations Policy
|
|
57
57
|
|
|
58
58
|
For write operations, we recommend the following IAM policies to ensure successful deployment of EKS clusters using the CloudFormation template in `/awslabs/eks_mcp_server/templates/eks-templates/eks-with-vpc.yaml`:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
|
|
60
|
+
* [**IAMFullAccess**](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/IAMFullAccess.html): Enables creation and management of IAM roles and policies required for cluster operation
|
|
61
|
+
* [**AmazonVPCFullAccess**](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonVPCFullAccess.html): Allows creation and configuration of VPC resources including subnets, route tables, internet gateways, and NAT gateways
|
|
62
|
+
* [**AWSCloudFormationFullAccess**](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSCloudFormationFullAccess.html): Provides permissions to create, update, and delete CloudFormation stacks that orchestrate the deployment
|
|
63
|
+
* **EKS Full Access (provided below)**: Required for creating and managing EKS clusters, including control plane configuration, node groups, and add-ons
|
|
63
64
|
```
|
|
64
65
|
{
|
|
65
66
|
"Version": "2012-10-17",
|
|
@@ -95,6 +96,30 @@ This quickstart guide walks you through the steps to configure the Amazon EKS MC
|
|
|
95
96
|
2. Click the gear icon (⚙️) in the top right to open the settings panel, click **MCP**, **Add new global MCP server**.
|
|
96
97
|
3. Paste your MCP server definition. For example, this example shows how to configure the EKS MCP Server, including enabling mutating actions by adding the `--allow-write` flag to the server arguments:
|
|
97
98
|
|
|
99
|
+
**For Mac/Linux:**
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"awslabs.eks-mcp-server": {
|
|
105
|
+
"autoApprove": [],
|
|
106
|
+
"disabled": false,
|
|
107
|
+
"command": "uvx",
|
|
108
|
+
"args": [
|
|
109
|
+
"awslabs.eks-mcp-server@latest",
|
|
110
|
+
"--allow-write"
|
|
111
|
+
],
|
|
112
|
+
"env": {
|
|
113
|
+
"FASTMCP_LOG_LEVEL": "ERROR"
|
|
114
|
+
},
|
|
115
|
+
"transportType": "stdio"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**For Windows:**
|
|
122
|
+
|
|
98
123
|
```
|
|
99
124
|
{
|
|
100
125
|
"mcpServers": {
|
|
@@ -103,7 +128,9 @@ This quickstart guide walks you through the steps to configure the Amazon EKS MC
|
|
|
103
128
|
"disabled": false,
|
|
104
129
|
"command": "uvx",
|
|
105
130
|
"args": [
|
|
131
|
+
"--from",
|
|
106
132
|
"awslabs.eks-mcp-server@latest",
|
|
133
|
+
"awslabs.eks-mcp-server.exe",
|
|
107
134
|
"--allow-write"
|
|
108
135
|
],
|
|
109
136
|
"env": {
|
|
@@ -124,6 +151,8 @@ This quickstart guide walks you through the steps to configure the Amazon EKS MC
|
|
|
124
151
|
1. Install the [Amazon Q Developer CLI](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html) .
|
|
125
152
|
2. The Q Developer CLI supports MCP servers for tools and prompts out-of-the-box. Edit your Q developer CLI's MCP configuration file named mcp.json following [these instructions](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-configuration.html). For example:
|
|
126
153
|
|
|
154
|
+
**For Mac/Linux:**
|
|
155
|
+
|
|
127
156
|
```
|
|
128
157
|
{
|
|
129
158
|
"mcpServers": {
|
|
@@ -140,6 +169,24 @@ This quickstart guide walks you through the steps to configure the Amazon EKS MC
|
|
|
140
169
|
}
|
|
141
170
|
```
|
|
142
171
|
|
|
172
|
+
**For Windows:**
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
{
|
|
176
|
+
"mcpServers": {
|
|
177
|
+
"awslabs.eks-mcp-server": {
|
|
178
|
+
"command": "uvx",
|
|
179
|
+
"args": ["--from", "awslabs.eks-mcp-server@latest", "awslabs.eks-mcp-server.exe"],
|
|
180
|
+
"env": {
|
|
181
|
+
"FASTMCP_LOG_LEVEL": "ERROR"
|
|
182
|
+
},
|
|
183
|
+
"autoApprove": [],
|
|
184
|
+
"disabled": false
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
143
190
|
3. Verify your setup by running the `/tools` command in the Q Developer CLI to see the available EKS MCP tools.
|
|
144
191
|
|
|
145
192
|
Note that this is a basic quickstart. You can enable additional capabilities, such as [running MCP servers in containers](https://github.com/awslabs/mcp?tab=readme-ov-file#running-mcp-servers-in-containers) or combining more MCP servers like the [AWS Documentation MCP Server](https://awslabs.github.io/mcp/servers/aws-documentation-mcp-server/) into a single MCP server definition. To view an example, see the [Installation and Setup](https://github.com/awslabs/mcp?tab=readme-ov-file#installation-and-setup) guide in AWS MCP Servers on GitHub. To view a real-world implementation with application code in context with an MCP server, see the [Server Developer](https://modelcontextprotocol.io/quickstart/server) guide in Anthropic documentation.
|
|
@@ -150,6 +197,7 @@ Note that this is a basic quickstart. You can enable additional capabilities, su
|
|
|
150
197
|
|
|
151
198
|
The `args` field in the MCP server definition specifies the command-line arguments passed to the server when it starts. These arguments control how the server is executed and configured. For example:
|
|
152
199
|
|
|
200
|
+
**For Mac/Linux:**
|
|
153
201
|
```
|
|
154
202
|
{
|
|
155
203
|
"mcpServers": {
|
|
@@ -169,11 +217,39 @@ The `args` field in the MCP server definition specifies the command-line argumen
|
|
|
169
217
|
}
|
|
170
218
|
```
|
|
171
219
|
|
|
172
|
-
|
|
220
|
+
**For Windows:**
|
|
221
|
+
```
|
|
222
|
+
{
|
|
223
|
+
"mcpServers": {
|
|
224
|
+
"awslabs.eks-mcp-server": {
|
|
225
|
+
"command": "uvx",
|
|
226
|
+
"args": [
|
|
227
|
+
"--from",
|
|
228
|
+
"awslabs.eks-mcp-server@latest",
|
|
229
|
+
"awslabs.eks-mcp-server.exe",
|
|
230
|
+
"--allow-write",
|
|
231
|
+
"--allow-sensitive-data-access"
|
|
232
|
+
],
|
|
233
|
+
"env": {
|
|
234
|
+
"AWS_PROFILE": "your-profile",
|
|
235
|
+
"AWS_REGION": "us-east-1"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
```
|
|
173
241
|
|
|
174
|
-
|
|
242
|
+
#### Command Format
|
|
175
243
|
|
|
176
|
-
|
|
244
|
+
The command format differs between operating systems:
|
|
245
|
+
|
|
246
|
+
**For Mac/Linux:**
|
|
247
|
+
* `awslabs.eks-mcp-server@latest` - Specifies the latest package/version specifier for the MCP client config.
|
|
248
|
+
|
|
249
|
+
**For Windows:**
|
|
250
|
+
* `--from awslabs.eks-mcp-server@latest awslabs.eks-mcp-server.exe` - Windows requires the `--from` flag to specify the package and the `.exe` extension.
|
|
251
|
+
|
|
252
|
+
Both formats enable MCP server startup and tool registration.
|
|
177
253
|
|
|
178
254
|
#### `--allow-write` (optional)
|
|
179
255
|
|
|
@@ -367,24 +443,45 @@ Features:
|
|
|
367
443
|
Parameters:
|
|
368
444
|
|
|
369
445
|
* cluster_name, log_type (application, host, performance, control-plane, custom), resource_type (pod, node, container, cluster),
|
|
370
|
-
resource_name, minutes (optional), start_time (optional), end_time (optional), limit (optional), filter_pattern (optional), fields (optional)
|
|
446
|
+
resource_name (optional), minutes (optional), start_time (optional), end_time (optional), limit (optional), filter_pattern (optional), fields (optional)
|
|
371
447
|
|
|
372
448
|
#### `get_cloudwatch_metrics`
|
|
373
449
|
|
|
374
|
-
Retrieves metrics from CloudWatch for
|
|
450
|
+
Retrieves metrics from CloudWatch for Kubernetes resources.
|
|
375
451
|
|
|
376
452
|
Features:
|
|
377
453
|
|
|
378
|
-
* Fetches metrics based on
|
|
379
|
-
* Allows specification of CloudWatch namespace
|
|
454
|
+
* Fetches metrics based on metric name and dimensions.
|
|
455
|
+
* Allows specification of CloudWatch namespace and time range.
|
|
380
456
|
* Configurable period, statistic (Average, Sum, etc.), and limit for data points.
|
|
381
457
|
* Supports providing custom dimensions for fine-grained metric querying.
|
|
382
458
|
|
|
383
459
|
Parameters:
|
|
384
460
|
|
|
385
|
-
* cluster_name, metric_name,
|
|
386
|
-
|
|
387
|
-
|
|
461
|
+
* cluster_name, metric_name, namespace, dimensions, minutes (optional), start_time (optional), end_time (optional), limit (optional), stat (optional), period (optional)
|
|
462
|
+
|
|
463
|
+
#### `get_eks_metrics_guidance`
|
|
464
|
+
|
|
465
|
+
Provides guidance on available CloudWatch metrics for different resource types in EKS clusters.
|
|
466
|
+
|
|
467
|
+
Features:
|
|
468
|
+
|
|
469
|
+
* Returns a list of available Container Insights metrics for the specified resource type, including metric names, dimensions, and descriptions.
|
|
470
|
+
* Helps determine the correct dimensions to use with the `get_cloudwatch_metrics` tool.
|
|
471
|
+
* Supports the following resource types:
|
|
472
|
+
* `cluster`: Metrics for EKS clusters (e.g., cluster_node_count, cluster_failed_node_count)
|
|
473
|
+
* `node`: Metrics for EKS nodes (e.g., node_cpu_utilization, node_memory_utilization, node_network_total_bytes)
|
|
474
|
+
* `pod`: Metrics for Kubernetes pods (e.g., pod_cpu_utilization, pod_memory_utilization, pod_network_rx_bytes)
|
|
475
|
+
* `namespace`: Metrics for Kubernetes namespaces (e.g., namespace_number_of_running_pods)
|
|
476
|
+
* `service`: Metrics for Kubernetes services (e.g., service_number_of_running_pods)
|
|
477
|
+
|
|
478
|
+
Parameters:
|
|
479
|
+
|
|
480
|
+
* resource_type
|
|
481
|
+
|
|
482
|
+
Implementation:
|
|
483
|
+
|
|
484
|
+
The data in `/awslabs/eks_mcp_server/data/eks_cloudwatch_metrics_guidance.json` is generated by a Python script (`/awslabs/eks_mcp_server/scripts/update_eks_cloudwatch_metrics_guidance.py`) that scrapes the [Container Insights metrics table](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-metrics-EKS.html) from AWS documentation. Running the script requires installing BeautifulSoup (used for parsing HTML content) with uv: `uv pip install bs4`.
|
|
388
485
|
|
|
389
486
|
### IAM Integration
|
|
390
487
|
|
|
@@ -471,6 +568,7 @@ The EKS MCP Server can be used for production environments with proper security
|
|
|
471
568
|
|
|
472
569
|
An array within the MCP server definition that lists tool names to be automatically approved by the EKS MCP Server client, bypassing user confirmation for those specific tools. For example:
|
|
473
570
|
|
|
571
|
+
**For Mac/Linux:**
|
|
474
572
|
```
|
|
475
573
|
{
|
|
476
574
|
"mcpServers": {
|
|
@@ -501,6 +599,39 @@ An array within the MCP server definition that lists tool names to be automatica
|
|
|
501
599
|
}
|
|
502
600
|
```
|
|
503
601
|
|
|
602
|
+
**For Windows:**
|
|
603
|
+
```
|
|
604
|
+
{
|
|
605
|
+
"mcpServers": {
|
|
606
|
+
"awslabs.eks-mcp-server": {
|
|
607
|
+
"command": "uvx",
|
|
608
|
+
"args": [
|
|
609
|
+
"--from",
|
|
610
|
+
"awslabs.eks-mcp-server@latest",
|
|
611
|
+
"awslabs.eks-mcp-server.exe"
|
|
612
|
+
],
|
|
613
|
+
"env": {
|
|
614
|
+
"AWS_PROFILE": "eks-mcp-readonly-profile",
|
|
615
|
+
"AWS_REGION": "us-east-1",
|
|
616
|
+
"FASTMCP_LOG_LEVEL": "INFO"
|
|
617
|
+
},
|
|
618
|
+
"autoApprove": [
|
|
619
|
+
"manage_eks_stacks",
|
|
620
|
+
"manage_k8s_resource",
|
|
621
|
+
"list_k8s_resources",
|
|
622
|
+
"get_pod_logs",
|
|
623
|
+
"get_k8s_events",
|
|
624
|
+
"get_cloudwatch_logs",
|
|
625
|
+
"get_cloudwatch_metrics",
|
|
626
|
+
"get_policies_for_role",
|
|
627
|
+
"search_eks_troubleshoot_guide",
|
|
628
|
+
"list_api_versions"
|
|
629
|
+
]
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
```
|
|
634
|
+
|
|
504
635
|
### IAM Permissions Management
|
|
505
636
|
|
|
506
637
|
When the `--allow-write` flag is enabled, the EKS MCP Server can create missing IAM permissions for EKS resources through the `add_inline_policy` tool. This tool enables the following:
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
# This file is part of the awslabs namespace.
|
|
16
|
+
# It is intentionally minimal to support PEP 420 namespace packages.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""awslabs.eks-mcp-server"""
|
|
16
|
+
|
|
17
|
+
__version__ = '0.1.0'
|
{awslabs_eks_mcp_server-0.1.2 → awslabs_eks_mcp_server-0.1.3}/awslabs/eks_mcp_server/aws_helper.py
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""AWS helper for the EKS MCP Server."""
|
|
13
16
|
|