@futuretea/rancher-mcp-server 0.3.1 → 0.3.3

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 (2) hide show
  1. package/README.md +125 -25
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -12,21 +12,26 @@ A powerful and flexible [Model Context Protocol (MCP)](https://blog.marcnuri.com
12
12
 
13
13
  - **✅ Multi-cluster Management**: Access and manage multiple Kubernetes clusters through Rancher API
14
14
  - **✅ Core Kubernetes Resources**: Perform operations on Kubernetes resources across multiple clusters
15
- - **List** clusters, nodes, workloads, and namespaces
15
+ - **List** clusters, nodes, workloads, namespaces, services, configmaps, and secrets
16
16
  - **Get** kubeconfig for any cluster
17
+ - **Intelligent Diagnostic Chain**: Perform health checks with Service → Pods and Ingress → Service → Pods diagnostic chains
18
+ - **Ready/Degraded Dual-State Diagnosis**: Identify both critical failures and performance degradation
17
19
  - **✅ Rancher-specific Resources**: Access Rancher-specific resources
18
20
  - **List** Rancher projects and users
19
21
  - **Check** cluster health status
20
22
  - **View** project access permissions
21
23
  - **✅ Security Configuration**: Support for read-only mode and disabling destructive operations
24
+ - **Secrets Protection**: Secret data is never exposed, only metadata
22
25
  - **✅ Multiple Output Formats**: Support for table, YAML, and JSON output formats
26
+ - **✅ Performance Optimized**: Intelligent API call caching reduces API calls by up to 93% during bulk operations
23
27
  - **✅ Cross-platform Support**: Available as native binaries for Linux, macOS, and Windows, as well as an npm package
24
28
 
25
29
  Unlike other Kubernetes MCP server implementations, this server is **specifically designed for Rancher multi-cluster environments** and provides seamless access to multiple clusters through a single interface.
26
30
 
27
31
  - **✅ Lightweight**: The server is distributed as a single native binary for Linux, macOS, and Windows
28
32
  - **✅ High-Performance / Low-Latency**: Directly interacts with Rancher API server without the overhead of calling external commands
29
- - **✅ Cross-Platform**: Available as a native binary for Linux, macOS, and Windows, as well as an npm package
33
+ - **✅ Efficient Bulk Operations**: Optimized API calls with intelligent caching for diagnosing multiple resources
34
+ - **✅ Self-Documenting**: Detailed tool descriptions help LLMs understand capabilities and select the right tools
30
35
  - **✅ Configurable**: Supports [command-line arguments](#configuration) to configure the server behavior
31
36
  - **✅ Well tested**: The server has an extensive test suite to ensure its reliability and correctness
32
37
 
@@ -54,7 +59,7 @@ Open your `claude_desktop_config.json` and add the mcp server to the list of `mc
54
59
  "-y",
55
60
  "@futuretea/rancher-mcp-server@latest",
56
61
  "--rancher-server-url",
57
- "https://your-rancher-server.com",
62
+ "https://your-rancher-server.com/v3",
58
63
  "--rancher-token",
59
64
  "your-token"
60
65
  ]
@@ -69,10 +74,10 @@ Install the Rancher MCP server extension in VS Code by running the following com
69
74
 
70
75
  ```shell
71
76
  # For VS Code
72
- code --add-mcp '{"name":"rancher","command":"npx","args":["@futuretea/rancher-mcp-server@latest","--rancher-server-url","https://your-rancher-server.com","--rancher-token","your-token"]}'
77
+ code --add-mcp '{"name":"rancher","command":"npx","args":["@futuretea/rancher-mcp-server@latest","--rancher-server-url","https://your-rancher-server.com/v3","--rancher-token","your-token"]}'
73
78
 
74
79
  # For VS Code Insiders
75
- code-insiders --add-mcp '{"name":"rancher","command":"npx","args":["@futuretea/rancher-mcp-server@latest","--rancher-server-url","https://your-rancher-server.com","--rancher-token","your-token"]}'
80
+ code-insiders --add-mcp '{"name":"rancher","command":"npx","args":["@futuretea/rancher-mcp-server@latest","--rancher-server-url","https://your-rancher-server.com/v3","--rancher-token","your-token"]}'
76
81
  ```
77
82
 
78
83
  ### Cursor
@@ -88,7 +93,7 @@ Install the Rancher MCP server extension in Cursor by editing the `mcp.json` fil
88
93
  "-y",
89
94
  "@futuretea/rancher-mcp-server@latest",
90
95
  "--rancher-server-url",
91
- "https://your-rancher-server.com",
96
+ "https://your-rancher-server.com/v3",
92
97
  "--rancher-token",
93
98
  "your-token"
94
99
  ]
@@ -120,14 +125,17 @@ npx @futuretea/rancher-mcp-server@latest --help
120
125
  | `--port` | Starts the MCP server in HTTP/SSE mode and listens on the specified port. Use 0 for stdio mode (default for MCP clients) |
121
126
  | `--sse-base-url` | SSE public base URL to use when sending the endpoint message (e.g. https://example.com) |
122
127
  | `--log-level` | Sets the logging level (values from 0-9) |
123
- | `--rancher-server-url` | URL of the Rancher server |
128
+ | `--rancher-server-url` | URL of the Rancher server (must include `/v3` path, e.g., `https://your-rancher-server.com/v3`) |
124
129
  | `--rancher-token` | Bearer token for Rancher API authentication |
125
130
  | `--rancher-access-key` | Access key for Rancher API authentication |
126
131
  | `--rancher-secret-key` | Secret key for Rancher API authentication |
127
- | `--list-output` | Output format for resource list operations (one of: table, yaml, json) (default "table") |
132
+ | `--rancher-tls-insecure` | Skip TLS certificate verification for Rancher server (default: false) |
133
+ | `--list-output` | Output format for resource list operations (one of: table, yaml, json) (default "json") |
128
134
  | `--read-only` | If set, the MCP server will run in read-only mode, meaning it will not allow any write operations on the Rancher cluster |
129
135
  | `--disable-destructive` | If set, the MCP server will disable all destructive operations on the Rancher cluster |
130
- | `--toolsets` | Comma-separated list of toolsets to enable. Check the [🛠️ Tools and Functionalities](#tools-and-functionalities) section for more information |
136
+ | `--toolsets` | Comma-separated list of toolsets to enable. Default: [config,core,rancher,networking] |
137
+ | `--enabled-tools` | Comma-separated list of tools to enable (overrides toolsets) |
138
+ | `--disabled-tools` | Comma-separated list of tools to disable (overrides toolsets) |
131
139
 
132
140
  ### Configuration File
133
141
 
@@ -140,18 +148,19 @@ log_level: 0
140
148
  # SSE (Server-Sent Events) configuration (optional, for HTTP/SSE mode)
141
149
  # sse_base_url: https://your-domain.com:8080
142
150
 
143
- rancher_server_url: https://your-rancher-server.com
151
+ rancher_server_url: https://your-rancher-server.com/v3
144
152
  rancher_token: your-bearer-token
145
153
  # Or use Access Key/Secret Key:
146
154
  # rancher_access_key: your-access-key
147
155
  # rancher_secret_key: your-secret-key
148
- list_output: table
156
+ list_output: json
149
157
  read_only: false
150
158
  disable_destructive: false
151
159
  toolsets:
152
160
  - config
153
161
  - core
154
162
  - rancher
163
+ - networking # Optional: enable network resource management
155
164
  ```
156
165
 
157
166
  ### HTTP/SSE Mode
@@ -167,7 +176,7 @@ The Rancher MCP server supports running in HTTP/SSE (Server-Sent Events) mode fo
167
176
  ```shell
168
177
  # Start the server on port 8080
169
178
  rancher-mcp-server --port 8080 \
170
- --rancher-server-url https://your-rancher-server.com \
179
+ --rancher-server-url https://your-rancher-server.com/v3 \
171
180
  --rancher-token your-token
172
181
  ```
173
182
 
@@ -185,7 +194,7 @@ When deploying behind a reverse proxy or load balancer, you can specify a public
185
194
  ```shell
186
195
  rancher-mcp-server --port 8080 \
187
196
  --sse-base-url https://your-domain.com:8080 \
188
- --rancher-server-url https://your-rancher-server.com \
197
+ --rancher-server-url https://your-rancher-server.com/v3 \
189
198
  --rancher-token your-token
190
199
  ```
191
200
 
@@ -202,16 +211,17 @@ The following sets of tools are available (all on by default):
202
211
  | Toolset | Description |
203
212
  |---------|-------------|
204
213
  | config | Tools for managing cluster configuration (kubeconfig) |
205
- | core | Core Kubernetes resource management tools (clusters, nodes, workloads, namespaces) |
206
- | rancher | Rancher-specific tools (projects, users, cluster health, access control) |
214
+ | core | Core Kubernetes resource management tools (nodes, workloads, namespaces, configmaps, secrets, services) |
215
+ | rancher | Rancher-specific tools (clusters, projects, users, cluster health, access control) |
216
+ | networking | Network resource management tools (ingresses) |
207
217
 
208
218
  ### Tools
209
219
 
210
220
  <details>
211
221
  <summary>config</summary>
212
222
 
213
- - **kubeconfig_get** - Get kubeconfig file for a cluster
214
- - `cluster_id` (`string`) **(required)** - ID of the cluster to get kubeconfig for
223
+ - **configuration_view** - Generate and view Kubernetes configuration (kubeconfig) for a Rancher cluster
224
+ - `cluster` (`string`) - Cluster ID to generate kubeconfig for
215
225
 
216
226
  </details>
217
227
 
@@ -219,44 +229,134 @@ The following sets of tools are available (all on by default):
219
229
  <summary>core</summary>
220
230
 
221
231
  - **cluster_list** - List all available Kubernetes clusters
222
- - `format` (`string`) - Output format: table, yaml, or json (default: "table")
232
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
233
+
234
+ - **node_get** - Get a single node by ID, more efficient than list
235
+ - `cluster` (`string`) **(required)** - Cluster ID
236
+ - `node` (`string`) **(required)** - Node ID to get
237
+ - `format` (`string`) - Output format: yaml or json (default: "json")
223
238
 
224
239
  - **node_list** - List all nodes in a cluster
225
240
  - `cluster` (`string`) - Cluster ID to list nodes from (optional)
226
- - `format` (`string`) - Output format: table, yaml, or json (default: "table")
241
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
242
+
243
+ - **workload_get** - Get a single workload by name and namespace, more efficient than list
244
+ - `cluster` (`string`) **(required)** - Cluster ID
245
+ - `namespace` (`string`) **(required)** - Namespace name
246
+ - `name` (`string`) **(required)** - Workload name to get
247
+ - `project` (`string`) - Project ID (optional, will auto-detect if not provided)
248
+ - `format` (`string`) - Output format: yaml or json (default: "json")
227
249
 
228
250
  - **workload_list** - List workloads (deployments, statefulsets, daemonsets, jobs) and orphan pods in a cluster
229
251
  - `cluster` (`string`) **(required)** - Cluster ID
230
252
  - `project` (`string`) - Project ID to filter workloads (optional)
231
253
  - `namespace` (`string`) - Namespace name to filter workloads (optional)
232
254
  - `node` (`string`) - Node name to filter workloads (optional)
233
- - `format` (`string`) - Output format: table, yaml, or json (default: "table")
255
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
256
+
257
+ - **namespace_get** - Get a single namespace by name, more efficient than list
258
+ - `cluster` (`string`) **(required)** - Cluster ID
259
+ - `name` (`string`) **(required)** - Namespace name to get
260
+ - `format` (`string`) - Output format: yaml or json (default: "json")
234
261
 
235
262
  - **namespace_list** - List namespaces in a cluster
236
263
  - `cluster` (`string`) **(required)** - Cluster ID
237
264
  - `project` (`string`) - Project ID to filter namespaces (optional)
238
- - `format` (`string`) - Output format: table, yaml, or json (default: "table")
265
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
266
+
267
+ - **configmap_get** - Get a single ConfigMap by name and namespace, more efficient than list
268
+ - `cluster` (`string`) **(required)** - Cluster ID
269
+ - `namespace` (`string`) **(required)** - Namespace name
270
+ - `name` (`string`) **(required)** - ConfigMap name to get
271
+ - `project` (`string`) - Project ID (optional, will auto-detect if not provided)
272
+ - `format` (`string`) - Output format: yaml or json (default: "json")
273
+
274
+ - **configmap_list** - List all ConfigMaps in a cluster
275
+ - `cluster` (`string`) **(required)** - Cluster ID
276
+ - `project` (`string`) - Project ID to filter ConfigMaps (optional)
277
+ - `namespace` (`string`) - Namespace name to filter ConfigMaps (optional)
278
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
279
+
280
+ - **secret_get** - Get a single Secret by name and namespace, more efficient than list (metadata only, does not expose secret data)
281
+ - `cluster` (`string`) **(required)** - Cluster ID
282
+ - `namespace` (`string`) **(required)** - Namespace name
283
+ - `name` (`string`) **(required)** - Secret name to get
284
+ - `project` (`string`) - Project ID (optional, will auto-detect if not provided)
285
+ - `format` (`string`) - Output format: yaml or json (default: "json")
286
+
287
+ - **secret_list** - List all Secrets in a cluster (metadata only, does not expose secret data)
288
+ - `cluster` (`string`) **(required)** - Cluster ID
289
+ - `project` (`string`) - Project ID to filter secrets (optional)
290
+ - `namespace` (`string`) - Namespace name to filter secrets (optional)
291
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
292
+
293
+ - **service_get** - Get a single service by name with optional pod diagnostic check (Service → Pods), more efficient than list
294
+ - `cluster` (`string`) **(required)** - Cluster ID
295
+ - `namespace` (`string`) **(required)** - Namespace name
296
+ - `name` (`string`) **(required)** - Service name to get
297
+ - `project` (`string`) - Project ID (optional, will auto-detect if not provided)
298
+ - `getPodDetails` (`boolean`) - Get detailed pod information and perform health checks (default: false)
299
+ - `format` (`string`) - Output format: yaml or json (default: "json")
300
+
301
+ - **service_list** - List services with optional pod diagnostic check (Service → Pods)
302
+ - `cluster` (`string`) **(required)** - Cluster ID
303
+ - `project` (`string`) - Project ID to filter services (optional)
304
+ - `namespace` (`string`) - Namespace name to filter services (optional)
305
+ - `getPodDetails` (`boolean`) - Get pod information and perform health checks for services (default: false)
306
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
239
307
 
240
308
  </details>
241
309
 
242
310
  <details>
243
311
  <summary>rancher</summary>
244
312
 
313
+ - **cluster_list** - List all available Kubernetes clusters
314
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
315
+
316
+ - **project_get** - Get a single Rancher project by ID, more efficient than list
317
+ - `project` (`string`) **(required)** - Project ID to get
318
+ - `cluster` (`string`) **(required)** - Cluster ID (required for verification)
319
+ - `format` (`string`) - Output format: yaml or json (default: "json")
320
+
245
321
  - **project_list** - List Rancher projects across clusters
246
322
  - `cluster` (`string`) - Filter projects by cluster ID (optional)
247
- - `format` (`string`) - Output format: table, yaml, or json (default: "table")
323
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
324
+
325
+ - **user_get** - Get a single Rancher user by ID, more efficient than list
326
+ - `user` (`string`) **(required)** - User ID to get
327
+ - `format` (`string`) - Output format: yaml or json (default: "json")
248
328
 
249
329
  - **user_list** - List all Rancher users
250
- - `format` (`string`) - Output format: table, yaml, or json (default: "table")
330
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
251
331
 
252
332
  - **cluster_health** - Get health status of Rancher clusters
253
333
  - `cluster` (`string`) - Specific cluster ID to check health (optional)
254
- - `format` (`string`) - Output format: table, yaml, or json (default: "table")
334
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
255
335
 
256
336
  - **project_access** - List user access permissions for Rancher projects
257
337
  - `project` (`string`) - Project ID to check access (optional)
258
338
  - `cluster` (`string`) - Cluster ID (optional)
259
- - `format` (`string`) - Output format: table, yaml, or json (default: "table")
339
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
340
+
341
+ </details>
342
+
343
+ <details>
344
+ <summary>networking</summary>
345
+
346
+ - **ingress_get** - Get a single ingress by name with diagnostic chain check (Ingress → Service → Pods), more efficient than list
347
+ - `cluster` (`string`) **(required)** - Cluster ID
348
+ - `namespace` (`string`) **(required)** - Namespace name
349
+ - `name` (`string`) **(required)** - Ingress name to get
350
+ - `project` (`string`) - Project ID (optional, will auto-detect if not provided)
351
+ - `getPodDetails` (`boolean`) - Get detailed pod information and perform health checks (default: false)
352
+ - `format` (`string`) - Output format: yaml or json (default: "json")
353
+
354
+ - **ingress_list** - List ingresses with full diagnostic chain check (Ingress → Service → Pods)
355
+ - `cluster` (`string`) **(required)** - Cluster ID
356
+ - `project` (`string`) - Project ID to filter ingresses (optional)
357
+ - `namespace` (`string`) - Namespace name to filter ingresses (optional)
358
+ - `getPodDetails` (`boolean`) - Get detailed pod information and perform health checks (default: false)
359
+ - `format` (`string`) - Output format: table, yaml, or json (default: "json")
260
360
 
261
361
  </details>
262
362
 
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@futuretea/rancher-mcp-server",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Model Context Protocol (MCP) server for Rancher multi-cluster management",
5
5
  "main": "./bin/index.js",
6
6
  "bin": {
7
7
  "rancher-mcp-server": "bin/index.js"
8
8
  },
9
9
  "optionalDependencies": {
10
- "@futuretea/rancher-mcp-server-darwin-amd64": "0.3.1",
11
- "@futuretea/rancher-mcp-server-darwin-arm64": "0.3.1",
12
- "@futuretea/rancher-mcp-server-linux-amd64": "0.3.1",
13
- "@futuretea/rancher-mcp-server-linux-arm64": "0.3.1",
14
- "@futuretea/rancher-mcp-server-windows-amd64": "0.3.1",
15
- "@futuretea/rancher-mcp-server-windows-arm64": "0.3.1"
10
+ "@futuretea/rancher-mcp-server-darwin-amd64": "0.3.3",
11
+ "@futuretea/rancher-mcp-server-darwin-arm64": "0.3.3",
12
+ "@futuretea/rancher-mcp-server-linux-amd64": "0.3.3",
13
+ "@futuretea/rancher-mcp-server-linux-arm64": "0.3.3",
14
+ "@futuretea/rancher-mcp-server-windows-amd64": "0.3.3",
15
+ "@futuretea/rancher-mcp-server-windows-arm64": "0.3.3"
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",