Skip to content

Commit 5e2f872

Browse files
authored
Merge pull request #141 from rr-paras-patel/feature/simplify-tools-using-generic-kubectl
Feature/simplify-tools-using-generic-kubectl
2 parents def56e3 + 7aa0e96 commit 5e2f872

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+7212
-4520
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ dist
126126

127127
# Stores VSCode versions used for testing VSCode extensions
128128
.vscode-test
129+
.vscode/
129130

130131
# yarn v2
131132
.yarn/cache

README.md

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,27 @@ npx mcp-chat --config "%APPDATA%\Claude\claude_desktop_config.json"
6666
## Features
6767

6868
- [x] Connect to a Kubernetes cluster
69-
- [x] List all pods, services, deployments
70-
- [x] List, Describe nodes
71-
- [x] Create, describe, delete a pod
72-
- [x] List all namespaces, create a namespace
73-
- [x] Create custom pod & deployment configs, update deployment replicas
74-
- [x] Create, describe, delete, update a service
75-
- [x] Create, get, update, delete a ConfigMap
76-
- [x] Get logs from a pod for debugging (supports pods, deployments, jobs, and label selectors)
77-
- [x] Support Helm v3 for installing charts
78-
- Install charts with custom values
79-
- Uninstall releases
80-
- Upgrade existing releases
81-
- Support for namespaces
82-
- Support for version specification
83-
- Support for custom repositories
84-
- [x] kubectl explain and kubectl api-resources support
85-
- [x] Get Kubernetes events from the cluster
86-
- [x] Port forward to a pod or service
87-
- [x] Create, list, and decribe cronjobs
69+
- [x] Unified kubectl API for managing resources
70+
- Get or list resources with `kubectl_get`
71+
- Describe resources with `kubectl_describe`
72+
- List resources with `kubectl_list`
73+
- Create resources with `kubectl_create`
74+
- Apply YAML manifests with `kubectl_apply`
75+
- Delete resources with `kubectl_delete`
76+
- Get logs with `kubectl_logs`
77+
- Manage kubectl contexts with `kubectl_context`
78+
- Explain Kubernetes resources with `explain_resource`
79+
- List API resources with `list_api_resources`
80+
- Scale resources with `kubectl_scale`
81+
- Update field(s) of a resource with `kubectl_patch`
82+
- Manage deployment rollouts with `kubectl_rollout`
83+
- Execute any kubectl command with `kubectl_generic`
84+
- [x] Advanced operations
85+
- Scale deployments with `kubectl_scale` (replaces legacy `scale_deployment`)
86+
- Port forward to pods and services with `port_forward`
87+
- Run Helm operations
88+
- Install, upgrade, and uninstall charts
89+
- Support for custom values, repositories, and versions
8890
- [x] Non-destructive mode for read and create/update-only access to clusters
8991

9092
## Local Development
@@ -149,9 +151,31 @@ See the [CONTRIBUTING.md](CONTRIBUTING.md) file for details.
149151

150152
## Advanced
151153

152-
### Additional Advanced Features
154+
### Non-Destructive Mode
153155

154-
For more advanced information like using SSE transport, Non-destructive mode with `ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS`, see the [ADVANCED_README.md](ADVANCED_README.md).
156+
You can run the server in a non-destructive mode that disables all destructive operations (delete pods, delete deployments, delete namespaces, etc.):
157+
158+
```shell
159+
ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true npx mcp-server-kubernetes
160+
```
161+
162+
For Claude Desktop configuration with non-destructive mode:
163+
164+
```json
165+
{
166+
"mcpServers": {
167+
"kubernetes-readonly": {
168+
"command": "npx",
169+
"args": ["mcp-server-kubernetes"],
170+
"env": {
171+
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "true"
172+
}
173+
}
174+
}
175+
}
176+
```
177+
178+
For additional advanced features, see the [ADVANCED_README.md](ADVANCED_README.md).
155179

156180
## Architecture
157181

@@ -177,7 +201,7 @@ sequenceDiagram
177201
178202
alt Tools Request
179203
Server->>Handler: Route to tools handler
180-
Handler->>K8sManager: Execute tool operation
204+
Handler->>K8sManager: Execute kubectl operation
181205
K8sManager->>K8s: Make API call
182206
K8s-->>K8sManager: Return result
183207
K8sManager-->>Handler: Process response

0 commit comments

Comments
 (0)