greennode.vks-mcp-server 0.1.0__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.
Files changed (33) hide show
  1. greennode_vks_mcp_server-0.1.0/LICENSE +17 -0
  2. greennode_vks_mcp_server-0.1.0/NOTICE +2 -0
  3. greennode_vks_mcp_server-0.1.0/PKG-INFO +597 -0
  4. greennode_vks_mcp_server-0.1.0/README.md +564 -0
  5. greennode_vks_mcp_server-0.1.0/greennode/__init__.py +0 -0
  6. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/__init__.py +1 -0
  7. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/auth.py +56 -0
  8. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/client.py +200 -0
  9. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/cluster_handler.py +480 -0
  10. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/config.py +114 -0
  11. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/context.py +10 -0
  12. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/k8s_apis.py +423 -0
  13. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/k8s_client_cache.py +45 -0
  14. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/k8s_handler.py +537 -0
  15. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/models.py +482 -0
  16. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/nodegroup_handler.py +234 -0
  17. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/server.py +100 -0
  18. greennode_vks_mcp_server-0.1.0/greennode/vks_mcp_server/validators.py +21 -0
  19. greennode_vks_mcp_server-0.1.0/greennode.vks_mcp_server.egg-info/PKG-INFO +597 -0
  20. greennode_vks_mcp_server-0.1.0/greennode.vks_mcp_server.egg-info/SOURCES.txt +31 -0
  21. greennode_vks_mcp_server-0.1.0/greennode.vks_mcp_server.egg-info/dependency_links.txt +1 -0
  22. greennode_vks_mcp_server-0.1.0/greennode.vks_mcp_server.egg-info/entry_points.txt +2 -0
  23. greennode_vks_mcp_server-0.1.0/greennode.vks_mcp_server.egg-info/requires.txt +12 -0
  24. greennode_vks_mcp_server-0.1.0/greennode.vks_mcp_server.egg-info/top_level.txt +1 -0
  25. greennode_vks_mcp_server-0.1.0/pyproject.toml +59 -0
  26. greennode_vks_mcp_server-0.1.0/setup.cfg +4 -0
  27. greennode_vks_mcp_server-0.1.0/tests/test_auth.py +69 -0
  28. greennode_vks_mcp_server-0.1.0/tests/test_client.py +85 -0
  29. greennode_vks_mcp_server-0.1.0/tests/test_cluster_tools.py +203 -0
  30. greennode_vks_mcp_server-0.1.0/tests/test_config.py +74 -0
  31. greennode_vks_mcp_server-0.1.0/tests/test_k8s_client_cache.py +78 -0
  32. greennode_vks_mcp_server-0.1.0/tests/test_models.py +106 -0
  33. greennode_vks_mcp_server-0.1.0/tests/test_nodegroup_tools.py +162 -0
@@ -0,0 +1,17 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2026 Green Node
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
@@ -0,0 +1,2 @@
1
+ greennode.vks-mcp-server
2
+ Copyright Green Node. All Rights Reserved.
@@ -0,0 +1,597 @@
1
+ Metadata-Version: 2.4
2
+ Name: greennode.vks-mcp-server
3
+ Version: 0.1.0
4
+ Summary: A GreenNode MCP server for VKS (VNG Kubernetes Service)
5
+ Author: Green Node
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/vngcloud/greennode-mcp
8
+ Project-URL: Source, https://github.com/vngcloud/greennode-mcp
9
+ Project-URL: Bug Tracker, https://github.com/vngcloud/greennode-mcp/issues
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ License-File: NOTICE
21
+ Requires-Dist: mcp>=1.0.0
22
+ Requires-Dist: httpx<1.0,>=0.27.0
23
+ Requires-Dist: kubernetes<36.0,>=28.0.0
24
+ Requires-Dist: pyyaml<7.0,>=6.0
25
+ Requires-Dist: cachetools<6.0,>=5.3.0
26
+ Requires-Dist: pydantic<3.0,>=2.0.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=8.0; extra == "dev"
29
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
30
+ Requires-Dist: respx>=0.22.0; extra == "dev"
31
+ Requires-Dist: ruff>=0.4.0; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # GreenNode MCP Server
35
+
36
+ MCP (Model Context Protocol) Server for VKS (VNG Kubernetes Service). Provides AI assistants with tools to manage Kubernetes clusters and resources on GreenNode.
37
+
38
+ ## Key Features
39
+
40
+ - **Cluster Management** — Create, update, delete, and monitor VKS clusters
41
+ - **Node Group Management** — Scale, update, and manage node groups
42
+ - **Kubernetes Resources** — List pods/deployments/services, get logs, apply YAML manifests
43
+ - **Auto-Upgrade** — Configure automatic cluster version upgrades
44
+ - **Troubleshooting** — Get cluster events, pod logs, K8s events for debugging
45
+ - **Safety Controls** — Read-only by default, write operations require explicit opt-in
46
+
47
+ ## Table of Contents
48
+
49
+ - [Prerequisites](#prerequisites)
50
+ - [Quickstart](#quickstart)
51
+ - [Configuration](#configuration)
52
+ - [Tools](#tools)
53
+ - [Security](#security)
54
+ - [Getting Help](#getting-help)
55
+ - [More Resources](#more-resources)
56
+
57
+ ## Prerequisites
58
+
59
+ - Python 3.10 or later
60
+ - [uv](https://docs.astral.sh/uv/) package manager (recommended) or pip
61
+ - [GreenNode CLI](https://github.com/vngcloud/greennode-cli) (`grncli`) — **required** for credential setup
62
+ - IAM Service Account from [VNG Cloud Console](https://hcm-3.console.vngcloud.vn/iam/)
63
+
64
+ ## Quickstart
65
+
66
+ ### 1. Install GreenNode CLI and configure credentials
67
+
68
+ The MCP server reads credentials from `~/.greenode/credentials`, which is created by the GreenNode CLI:
69
+
70
+ ```bash
71
+ pip install grncli
72
+ grn configure
73
+ ```
74
+
75
+ > **Note:** The MCP server cannot run without credentials. `grn configure` is the only way to set them up.
76
+
77
+ ### 2. Run the server
78
+
79
+ ```bash
80
+ uvx vks-mcp-server
81
+ ```
82
+
83
+ ### 3. Configure your AI assistant
84
+
85
+ <details>
86
+ <summary><strong>Claude Desktop</strong></summary>
87
+
88
+ Add to `claude_desktop_config.json`:
89
+
90
+ ```json
91
+ {
92
+ "mcpServers": {
93
+ "greennode.vks-mcp-server": {
94
+ "command": "uvx",
95
+ "args": [
96
+ "greennode.vks-mcp-server@latest",
97
+ "--allow-write"
98
+ ],
99
+ "autoApprove": [],
100
+ "disabled": false
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ Config file location:
107
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
108
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
109
+
110
+ </details>
111
+
112
+ <details>
113
+ <summary><strong>Claude Code</strong></summary>
114
+
115
+ Add to `.mcp.json` in your project root:
116
+
117
+ ```json
118
+ {
119
+ "mcpServers": {
120
+ "greennode.vks-mcp-server": {
121
+ "command": "uvx",
122
+ "args": [
123
+ "greennode.vks-mcp-server@latest",
124
+ "--allow-write"
125
+ ],
126
+ "autoApprove": [],
127
+ "disabled": false
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ </details>
134
+
135
+ <details>
136
+ <summary><strong>Cursor</strong></summary>
137
+
138
+ Add to Cursor Settings → MCP Servers:
139
+
140
+ ```json
141
+ {
142
+ "mcpServers": {
143
+ "greennode.vks-mcp-server": {
144
+ "command": "uvx",
145
+ "args": [
146
+ "greennode.vks-mcp-server@latest",
147
+ "--allow-write"
148
+ ],
149
+ "autoApprove": [],
150
+ "disabled": false
151
+ }
152
+ }
153
+ }
154
+ ```
155
+
156
+ </details>
157
+
158
+ ### Configuration options
159
+
160
+ | Field | Type | Description |
161
+ |-------|------|-------------|
162
+ | `command` | string | `"uvx"` to run from PyPI without installing |
163
+ | `args` | array | Package name with `@latest` + server flags |
164
+ | `autoApprove` | array | Tool names to auto-approve without user confirmation. Empty `[]` = ask every time |
165
+ | `disabled` | boolean | Set `true` to disable the server without removing config |
166
+
167
+ #### `autoApprove` example
168
+
169
+ Auto-approve read-only tools so AI doesn't ask confirmation for every list/get:
170
+
171
+ ```json
172
+ {
173
+ "mcpServers": {
174
+ "greennode.vks-mcp-server": {
175
+ "command": "uvx",
176
+ "args": [
177
+ "greennode.vks-mcp-server@latest",
178
+ "--allow-write"
179
+ ],
180
+ "autoApprove": [
181
+ "cluster_list",
182
+ "cluster_get",
183
+ "cluster_get_events",
184
+ "nodegroup_list",
185
+ "nodegroup_get",
186
+ "nodegroup_list_nodes",
187
+ "list_k8s_resources",
188
+ "get_pod_logs",
189
+ "get_k8s_events",
190
+ "list_api_versions"
191
+ ],
192
+ "disabled": false
193
+ }
194
+ }
195
+ }
196
+ ```
197
+
198
+ > **Tip:** Only auto-approve **read-only** tools. Keep write tools (create, update, delete) requiring manual approval for safety.
199
+
200
+ ## Configuration
201
+
202
+ ### Arguments
203
+
204
+ | Argument | Default | Description |
205
+ |----------|---------|-------------|
206
+ | `--allow-write` | `false` | Enable create, update, and delete operations. Without this flag, only read operations are available |
207
+ | `--allow-sensitive-data-access` | `false` | Enable reading Kubernetes Secrets. Without this flag, Secret resources are hidden |
208
+
209
+ > **Security Warning:** Enabling both `--allow-write` and `--allow-sensitive-data-access` gives the AI assistant full access to your cluster resources including secrets. Use with caution.
210
+
211
+ ### Environment Variables
212
+
213
+ | Variable | Description |
214
+ |----------|-------------|
215
+ | `GRN_DEFAULT_REGION` | Default region (default: HCM-3) |
216
+ | `GRN_PROFILE` | Profile name from config file (default: "default") |
217
+
218
+ ### Credential Files
219
+
220
+ Created by `grn configure` (shared with [GreenNode CLI](https://github.com/vngcloud/greennode-cli)). Do not edit manually:
221
+
222
+ ```ini
223
+ # ~/.greenode/credentials
224
+ [default]
225
+ client_id = your-client-id
226
+ client_secret = your-client-secret
227
+ ```
228
+
229
+ ```ini
230
+ # ~/.greenode/config
231
+ [default]
232
+ region = HCM-3
233
+ ```
234
+
235
+ ### Available Regions
236
+
237
+ | Region | VKS Endpoint |
238
+ |--------|-------------|
239
+ | `HCM-3` | `https://vks.api.vngcloud.vn` |
240
+ | `HAN` | `https://vks-han-1.api.vngcloud.vn` |
241
+
242
+ ## Tools
243
+
244
+ The following tools are provided by the VKS MCP server for managing VKS clusters and Kubernetes resources. Each tool performs a specific action that can be invoked by AI assistants.
245
+
246
+ ### Cluster Management
247
+
248
+ #### `cluster_list`
249
+
250
+ Lists all VKS clusters in the configured region. Returns a markdown table with cluster name, ID, status, version, node count, and creation date.
251
+
252
+ Features:
253
+
254
+ * Supports pagination for large cluster lists.
255
+ * Returns formatted markdown table for AI readability.
256
+
257
+ Parameters:
258
+
259
+ * page (optional), pageSize (optional, default: 50), region (optional)
260
+
261
+ #### `cluster_get`
262
+
263
+ Gets full detail of a specific VKS cluster by ID. Returns a markdown key-value table with all cluster properties.
264
+
265
+ Features:
266
+
267
+ * Returns comprehensive cluster details including name, status, version, network config, node count.
268
+ * Input validation on cluster ID to prevent path traversal.
269
+
270
+ Parameters:
271
+
272
+ * cluster_id (required), region (optional)
273
+
274
+ #### `cluster_get_events`
275
+
276
+ Gets events for a VKS cluster. Returns a markdown table of events with type, reason, message, and timestamp.
277
+
278
+ Features:
279
+
280
+ * Supports pagination for event history.
281
+ * Useful for troubleshooting cluster issues.
282
+
283
+ Parameters:
284
+
285
+ * cluster_id (required), page (optional), pageSize (optional, default: 20), region (optional)
286
+
287
+ #### `cluster_delete_dryrun`
288
+
289
+ Preview what will be deleted when deleting a cluster. Shows cluster info and all node groups that will be removed.
290
+
291
+ Features:
292
+
293
+ * Displays cluster details and all associated node groups.
294
+ * Shows warning header and instructions to confirm deletion.
295
+ * Safe to run — does not modify any resources.
296
+
297
+ Parameters:
298
+
299
+ * cluster_id (required), region (optional)
300
+
301
+ #### `cluster_create_validate`
302
+
303
+ Validates a cluster creation body without actually creating a cluster. Returns 'valid' or a list of validation errors.
304
+
305
+ Features:
306
+
307
+ * Validates cluster name format (regex: `^[a-z0-9][a-z0-9\-]{3,18}[a-z0-9]$`).
308
+ * Checks required fields: vpcId, networkType, version, releaseChannel.
309
+ * Validates network-type-specific fields (CIDR for CALICO/CILIUM_OVERLAY).
310
+ * Validates node groups: name format, required fields, diskSize (20-5000), numNodes (0-10).
311
+
312
+ Parameters:
313
+
314
+ * body (required — CreateClusterComboDto JSON)
315
+
316
+ #### `cluster_create`
317
+
318
+ Creates a new VKS cluster. **Requires `--allow-write` flag.** Use `cluster_create_validate` first to check the body.
319
+
320
+ Features:
321
+
322
+ * Creates cluster with embedded node group configuration.
323
+ * Supports poc and autoRenewal options.
324
+
325
+ Parameters:
326
+
327
+ * body (required — CreateClusterComboDto JSON), poc (optional, default: false), autoRenewal (optional, default: true), region (optional)
328
+
329
+ #### `cluster_update`
330
+
331
+ Updates an existing VKS cluster. **Requires `--allow-write` flag.**
332
+
333
+ Features:
334
+
335
+ * Supports partial updates (only send fields to change).
336
+
337
+ Parameters:
338
+
339
+ * cluster_id (required), body (required — update fields), region (optional)
340
+
341
+ #### `cluster_delete`
342
+
343
+ Deletes a VKS cluster. **IRREVERSIBLE. Requires `--allow-write` flag.** Use `cluster_delete_dryrun` first to preview.
344
+
345
+ Features:
346
+
347
+ * Permanently removes cluster and all associated resources.
348
+
349
+ Parameters:
350
+
351
+ * cluster_id (required), region (optional)
352
+
353
+ ### Auto-Upgrade
354
+
355
+ #### `cluster_auto_upgrade_config`
356
+
357
+ Configures auto-upgrade schedule for a VKS cluster. **Requires `--allow-write` flag.**
358
+
359
+ Features:
360
+
361
+ * Sets specific days and time for automatic Kubernetes version upgrades.
362
+
363
+ Parameters:
364
+
365
+ * cluster_id (required), weekdays (required — e.g. ['Mon', 'Wed', 'Fri']), time (required — HH:mm format, e.g. '03:00'), region (optional)
366
+
367
+ #### `cluster_auto_upgrade_delete`
368
+
369
+ Deletes auto-upgrade configuration for a VKS cluster. **Requires `--allow-write` flag.**
370
+
371
+ Features:
372
+
373
+ * Disables automatic cluster upgrades.
374
+
375
+ Parameters:
376
+
377
+ * cluster_id (required), region (optional)
378
+
379
+ ### Node Group Management
380
+
381
+ #### `nodegroup_list`
382
+
383
+ Lists all node groups in a VKS cluster. Returns a markdown table.
384
+
385
+ Features:
386
+
387
+ * Shows node group name, ID, status, node count, flavor, image.
388
+ * Includes cluster name in context.
389
+
390
+ Parameters:
391
+
392
+ * cluster_id (required), region (optional)
393
+
394
+ #### `nodegroup_get`
395
+
396
+ Gets full detail of a specific node group. Returns a markdown key-value table.
397
+
398
+ Features:
399
+
400
+ * Shows flavor, image, disk size, scaling config, labels, taints, security groups.
401
+
402
+ Parameters:
403
+
404
+ * cluster_id (required), nodegroup_id (required), region (optional)
405
+
406
+ #### `nodegroup_list_nodes`
407
+
408
+ Lists individual nodes in a node group. Returns a markdown table with node name, ID, status, IP, and creation time.
409
+
410
+ Features:
411
+
412
+ * Supports pagination for large node groups.
413
+
414
+ Parameters:
415
+
416
+ * cluster_id (required), nodegroup_id (required), page (optional), pageSize (optional, default: 50), region (optional)
417
+
418
+ #### `nodegroup_delete_dryrun`
419
+
420
+ Preview what will be deleted when deleting a node group.
421
+
422
+ Features:
423
+
424
+ * Shows node group details and node count.
425
+ * Safe to run — does not modify any resources.
426
+
427
+ Parameters:
428
+
429
+ * cluster_id (required), nodegroup_id (required), region (optional)
430
+
431
+ #### `nodegroup_create`
432
+
433
+ Creates a new node group in a VKS cluster. **Requires `--allow-write` flag.**
434
+
435
+ Features:
436
+
437
+ * Supports full node group configuration: flavor, image, disk, scaling, security groups, SSH key.
438
+
439
+ Parameters:
440
+
441
+ * cluster_id (required), body (required — CreateNodeGroupDto JSON with name, numNodes, imageId, flavorId, diskSize, diskType, enablePrivateNodes, securityGroups, sshKeyId, upgradeConfig), region (optional)
442
+
443
+ #### `nodegroup_update`
444
+
445
+ Updates a node group. **Requires `--allow-write` flag.** `imageId` is always required in body.
446
+
447
+ Features:
448
+
449
+ * Supports partial updates for numNodes, securityGroups, labels, taints, autoScaleConfig, upgradeConfig.
450
+
451
+ Parameters:
452
+
453
+ * cluster_id (required), nodegroup_id (required), body (required — must include imageId), region (optional)
454
+
455
+ #### `nodegroup_delete`
456
+
457
+ Deletes a node group. **IRREVERSIBLE. Requires `--allow-write` flag.** Use `nodegroup_delete_dryrun` first.
458
+
459
+ Features:
460
+
461
+ * Permanently removes node group and all its nodes.
462
+
463
+ Parameters:
464
+
465
+ * cluster_id (required), nodegroup_id (required), region (optional)
466
+
467
+ ### Kubernetes Resource Management
468
+
469
+ #### `list_k8s_resources`
470
+
471
+ Lists Kubernetes resources of a specific kind in a VKS cluster. Use this tool instead of `kubectl get` commands.
472
+
473
+ Features:
474
+
475
+ * Supports filtering by namespace, labels, and fields.
476
+ * Returns resource summaries with name, namespace, creation time, and metadata.
477
+ * Works with any resource kind (Pod, Service, Deployment, ConfigMap, etc.).
478
+
479
+ Parameters:
480
+
481
+ * cluster_id (required), kind (required — e.g. 'Pod', 'Service'), api_version (required — e.g. 'v1', 'apps/v1'), namespace (optional), label_selector (optional), field_selector (optional), region (optional)
482
+
483
+ #### `get_pod_logs`
484
+
485
+ Gets logs from a pod in a Kubernetes cluster. Use this tool instead of `kubectl logs`. **Requires `--allow-sensitive-data-access` flag.**
486
+
487
+ Features:
488
+
489
+ * Supports filtering by container, time range, and size.
490
+ * Can retrieve previous terminated container logs for crash debugging.
491
+
492
+ Parameters:
493
+
494
+ * cluster_id (required), namespace (required), pod_name (required), container_name (optional), since_seconds (optional), tail_lines (optional, default: 100), limit_bytes (optional, default: 10240), previous (optional, default: false), region (optional)
495
+
496
+ #### `get_k8s_events`
497
+
498
+ Gets events related to a specific Kubernetes resource. Use this tool instead of `kubectl describe` or `kubectl get events`. **Requires `--allow-sensitive-data-access` flag.**
499
+
500
+ Features:
501
+
502
+ * Returns event timestamps, occurrence counts, messages, reasons, and reporting components.
503
+ * Useful for troubleshooting pod startup failures, deployment issues, and scheduling problems.
504
+
505
+ Parameters:
506
+
507
+ * cluster_id (required), kind (required — e.g. 'Pod', 'Deployment'), name (required), namespace (optional), region (optional)
508
+
509
+ #### `list_api_versions`
510
+
511
+ Lists all available API versions in the Kubernetes cluster.
512
+
513
+ Features:
514
+
515
+ * Discovers core APIs (e.g. 'v1'), API groups (e.g. 'apps/v1'), and CRD APIs.
516
+ * Helps determine the correct apiVersion for managing resources.
517
+
518
+ Parameters:
519
+
520
+ * cluster_id (required), region (optional)
521
+
522
+ #### `manage_k8s_resource`
523
+
524
+ Manages a single Kubernetes resource with CRUD operations. Use this tool instead of `kubectl create/edit/patch/delete/get`. **Requires `--allow-write` flag for mutating operations.** **Requires `--allow-sensitive-data-access` for Secret resources.**
525
+
526
+ Features:
527
+
528
+ * Supports create, replace, patch, delete, and read operations.
529
+ * Handles both namespaced and cluster-scoped resources.
530
+
531
+ Parameters:
532
+
533
+ * operation (required — create/replace/patch/delete/read), cluster_id (required), kind (required), api_version (required), name (optional), namespace (optional), body (optional — required for create/replace/patch), region (optional)
534
+
535
+ #### `apply_yaml`
536
+
537
+ Applies Kubernetes YAML manifests from a local file. Use this tool instead of `kubectl apply -f`. **Requires `--allow-write` flag.**
538
+
539
+ Features:
540
+
541
+ * Supports multi-document YAML files.
542
+ * Can create or update existing resources.
543
+ * Path must be absolute (e.g. '/home/user/manifests/app.yaml').
544
+
545
+ Parameters:
546
+
547
+ * yaml_path (required — absolute path), cluster_id (required), namespace (required), force (optional, default: true), region (optional)
548
+
549
+ ## Security
550
+
551
+ ### Features
552
+
553
+ - **Read-only by default** — Write operations (create/update/delete) require `--allow-write` flag
554
+ - **Sensitive data protection** — Kubernetes Secrets hidden by default, require `--allow-sensitive-data-access`
555
+ - **Credential security** — Credentials read from `~/.greenode/credentials` with `0600` file permissions
556
+ - **Input validation** — All cluster and nodegroup IDs validated (alphanumeric + hyphens only) to prevent path traversal
557
+ - **Token handling** — Access tokens stored in memory only, never written to disk or logged
558
+ - **Request timeout** — All HTTP requests have 30s timeout to prevent hanging
559
+ - **Retry with backoff** — Automatic retry with exponential backoff (1s → 2s → 4s) for transient errors (5xx, timeouts)
560
+
561
+ ### Permissions
562
+
563
+ **Read-only mode** (default):
564
+
565
+ All list, get, describe, and validation tools are available without any flags.
566
+
567
+ **Write mode** (`--allow-write`):
568
+
569
+ Enables mutating operations: `cluster_create`, `cluster_update`, `cluster_delete`, `nodegroup_create`, `nodegroup_update`, `nodegroup_delete`, `cluster_auto_upgrade_config`, `cluster_auto_upgrade_delete`, `manage_k8s_resource`, `apply_yaml`.
570
+
571
+ **Sensitive data mode** (`--allow-sensitive-data-access`):
572
+
573
+ Enables reading Kubernetes Secret resources via `list_k8s_resources` and `manage_k8s_resource`.
574
+
575
+ ### Best Practices
576
+
577
+ - Start with **read-only mode** to explore clusters before enabling writes
578
+ - Use `cluster_delete_dryrun` and `nodegroup_delete_dryrun` to preview deletions
579
+ - Use `cluster_create_validate` to check parameters before creating clusters
580
+ - Review AI-generated YAML carefully before using `apply_yaml`
581
+ - Use separate IAM service accounts with minimal permissions per environment
582
+
583
+ ## Getting Help
584
+
585
+ - [Open an issue](https://github.com/vngcloud/greennode-mcp/issues/new/choose) — Bug reports and feature requests
586
+ - Search [existing issues](https://github.com/vngcloud/greennode-mcp/issues) before opening a new one
587
+
588
+ ## More Resources
589
+
590
+ - [Development Guide](docs/DEVELOPMENT.md) — Contributing, CI/CD, release process
591
+ - [GreenNode CLI](https://github.com/vngcloud/greennode-cli) — CLI companion tool
592
+ - [MCP Protocol](https://modelcontextprotocol.io/) — Model Context Protocol specification
593
+ - [VNG Cloud Console](https://hcm-3.console.vngcloud.vn/)
594
+
595
+ ## License
596
+
597
+ Apache License 2.0 — see [LICENSE](LICENSE).