@futuretea/rancher-mcp-server 0.3.2 → 0.4.0
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.
- package/README.md +220 -258
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -4,38 +4,31 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@futuretea/rancher-mcp-server)
|
|
5
5
|
[](https://github.com/futuretea/rancher-mcp-server/releases/latest)
|
|
6
6
|
|
|
7
|
-
[
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
A
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- **✅ High-Performance / Low-Latency**: Directly interacts with Rancher API server without the overhead of calling external commands
|
|
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
|
|
35
|
-
- **✅ Configurable**: Supports [command-line arguments](#configuration) to configure the server behavior
|
|
36
|
-
- **✅ Well tested**: The server has an extensive test suite to ensure its reliability and correctness
|
|
37
|
-
|
|
38
|
-
## 🚀 Getting Started <a id="getting-started"></a>
|
|
7
|
+
[Features](#features) | [Getting Started](#getting-started) | [Configuration](#configuration) | [Tools](#tools-and-functionalities) | [Development](#development)
|
|
8
|
+
|
|
9
|
+
## Features <a id="features"></a>
|
|
10
|
+
|
|
11
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for Rancher multi-cluster management.
|
|
12
|
+
|
|
13
|
+
- **Multi-cluster Management**: Access multiple Kubernetes clusters through Rancher API
|
|
14
|
+
- **Kubernetes Resources via Steve API**: CRUD operations on any resource type
|
|
15
|
+
- Get/List any resource (Pod, Deployment, Service, ConfigMap, Secret, CRD, etc.)
|
|
16
|
+
- Create resources from JSON manifests
|
|
17
|
+
- Patch resources using JSON Patch (RFC 6902)
|
|
18
|
+
- Delete resources
|
|
19
|
+
- Query container logs with filtering (tail lines, time range, timestamps)
|
|
20
|
+
- Inspect pods with parent workload, metrics, and logs
|
|
21
|
+
- **Rancher Resources via Norman API**: List clusters and projects
|
|
22
|
+
- **Security Controls**:
|
|
23
|
+
- `read_only`: Disables create, patch, and delete operations
|
|
24
|
+
- `disable_destructive`: Disables delete operations only
|
|
25
|
+
- Secret data is never exposed, only metadata
|
|
26
|
+
- **Output Formats**: Table, YAML, and JSON
|
|
27
|
+
- **Output Filters**: Remove verbose fields like `managedFields` from responses
|
|
28
|
+
- **Pagination**: Limit and page parameters for list operations
|
|
29
|
+
- **Cross-platform**: Native binaries for Linux, macOS, Windows, and npm package
|
|
30
|
+
|
|
31
|
+
## Getting Started <a id="getting-started"></a>
|
|
39
32
|
|
|
40
33
|
### Requirements
|
|
41
34
|
|
|
@@ -44,11 +37,7 @@ Unlike other Kubernetes MCP server implementations, this server is **specificall
|
|
|
44
37
|
|
|
45
38
|
### Claude Desktop
|
|
46
39
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
If you have npm installed, this is the fastest way to get started with `@futuretea/rancher-mcp-server` on Claude Desktop.
|
|
50
|
-
|
|
51
|
-
Open your `claude_desktop_config.json` and add the mcp server to the list of `mcpServers`:
|
|
40
|
+
Using npx:
|
|
52
41
|
|
|
53
42
|
```json
|
|
54
43
|
{
|
|
@@ -70,8 +59,6 @@ Open your `claude_desktop_config.json` and add the mcp server to the list of `mc
|
|
|
70
59
|
|
|
71
60
|
### VS Code / VS Code Insiders
|
|
72
61
|
|
|
73
|
-
Install the Rancher MCP server extension in VS Code by running the following command:
|
|
74
|
-
|
|
75
62
|
```shell
|
|
76
63
|
# For VS Code
|
|
77
64
|
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"]}'
|
|
@@ -82,7 +69,7 @@ code-insiders --add-mcp '{"name":"rancher","command":"npx","args":["@futuretea/r
|
|
|
82
69
|
|
|
83
70
|
### Cursor
|
|
84
71
|
|
|
85
|
-
|
|
72
|
+
Edit `mcp.json`:
|
|
86
73
|
|
|
87
74
|
```json
|
|
88
75
|
{
|
|
@@ -102,94 +89,103 @@ Install the Rancher MCP server extension in Cursor by editing the `mcp.json` fil
|
|
|
102
89
|
}
|
|
103
90
|
```
|
|
104
91
|
|
|
105
|
-
##
|
|
92
|
+
## Configuration <a id="configuration"></a>
|
|
106
93
|
|
|
107
|
-
|
|
94
|
+
Configuration can be set via CLI flags, environment variables, or a config file.
|
|
108
95
|
|
|
109
|
-
|
|
96
|
+
**Priority (highest to lowest):**
|
|
97
|
+
1. Command-line flags
|
|
98
|
+
2. Environment variables (prefix: `RANCHER_MCP_`)
|
|
99
|
+
3. Configuration file
|
|
100
|
+
4. Default values
|
|
110
101
|
|
|
111
|
-
|
|
112
|
-
# Run the Rancher MCP server using npx (in case you have npm and node installed)
|
|
113
|
-
npx @futuretea/rancher-mcp-server@latest --help
|
|
114
|
-
```
|
|
102
|
+
### CLI Options
|
|
115
103
|
|
|
116
104
|
```shell
|
|
117
|
-
|
|
118
|
-
./rancher-mcp-server --help
|
|
105
|
+
npx @futuretea/rancher-mcp-server@latest --help
|
|
119
106
|
```
|
|
120
107
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
|
124
|
-
|
|
125
|
-
| `--
|
|
126
|
-
| `--
|
|
127
|
-
| `--
|
|
128
|
-
| `--rancher-
|
|
129
|
-
| `--rancher-
|
|
130
|
-
| `--rancher-
|
|
131
|
-
| `--rancher-
|
|
132
|
-
| `--
|
|
133
|
-
| `--
|
|
134
|
-
| `--
|
|
135
|
-
| `--
|
|
136
|
-
| `--toolsets` |
|
|
137
|
-
| `--enabled-tools` |
|
|
138
|
-
| `--disabled-tools` |
|
|
108
|
+
| Option | Description | Default |
|
|
109
|
+
|--------|-------------|---------|
|
|
110
|
+
| `--config` | Config file path (YAML) | |
|
|
111
|
+
| `--port` | Port for HTTP/SSE mode (0 = stdio mode) | `0` |
|
|
112
|
+
| `--sse-base-url` | Public base URL for SSE endpoint | |
|
|
113
|
+
| `--log-level` | Log level (0-9) | `0` |
|
|
114
|
+
| `--rancher-server-url` | Rancher server URL | |
|
|
115
|
+
| `--rancher-token` | Rancher bearer token | |
|
|
116
|
+
| `--rancher-access-key` | Rancher access key | |
|
|
117
|
+
| `--rancher-secret-key` | Rancher secret key | |
|
|
118
|
+
| `--rancher-tls-insecure` | Skip TLS verification | `false` |
|
|
119
|
+
| `--read-only` | Disable write operations | `true` |
|
|
120
|
+
| `--disable-destructive` | Disable delete operations | `false` |
|
|
121
|
+
| `--list-output` | Output format (json, table, yaml) | `json` |
|
|
122
|
+
| `--output-filters` | Fields to remove from output | `metadata.managedFields` |
|
|
123
|
+
| `--toolsets` | Toolsets to enable | `kubernetes,rancher` |
|
|
124
|
+
| `--enabled-tools` | Specific tools to enable | |
|
|
125
|
+
| `--disabled-tools` | Specific tools to disable | |
|
|
139
126
|
|
|
140
127
|
### Configuration File
|
|
141
128
|
|
|
142
|
-
Create
|
|
129
|
+
Create `config.yaml`:
|
|
143
130
|
|
|
144
131
|
```yaml
|
|
145
|
-
port: 0 # 0 for stdio
|
|
146
|
-
log_level: 0
|
|
132
|
+
port: 0 # 0 for stdio, or set a port like 8080 for HTTP/SSE
|
|
147
133
|
|
|
148
|
-
|
|
149
|
-
# sse_base_url: https://your-domain.com:8080
|
|
134
|
+
log_level: 0
|
|
150
135
|
|
|
151
136
|
rancher_server_url: https://your-rancher-server.com
|
|
152
137
|
rancher_token: your-bearer-token
|
|
153
138
|
# Or use Access Key/Secret Key:
|
|
154
139
|
# rancher_access_key: your-access-key
|
|
155
140
|
# rancher_secret_key: your-secret-key
|
|
156
|
-
|
|
157
|
-
|
|
141
|
+
# rancher_tls_insecure: false
|
|
142
|
+
|
|
143
|
+
read_only: true # default: true
|
|
158
144
|
disable_destructive: false
|
|
145
|
+
|
|
146
|
+
list_output: json
|
|
147
|
+
|
|
148
|
+
# Remove verbose fields from output
|
|
149
|
+
output_filters:
|
|
150
|
+
- metadata.managedFields
|
|
151
|
+
- metadata.annotations.kubectl.kubernetes.io/last-applied-configuration
|
|
152
|
+
|
|
159
153
|
toolsets:
|
|
160
|
-
-
|
|
161
|
-
- core
|
|
154
|
+
- kubernetes
|
|
162
155
|
- rancher
|
|
163
|
-
|
|
156
|
+
|
|
157
|
+
# enabled_tools: []
|
|
158
|
+
# disabled_tools: []
|
|
164
159
|
```
|
|
165
160
|
|
|
166
|
-
###
|
|
161
|
+
### Environment Variables
|
|
167
162
|
|
|
168
|
-
|
|
163
|
+
Use `RANCHER_MCP_` prefix with underscores:
|
|
169
164
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
165
|
+
```shell
|
|
166
|
+
RANCHER_MCP_PORT=8080
|
|
167
|
+
RANCHER_MCP_RANCHER_SERVER_URL=https://rancher.example.com
|
|
168
|
+
RANCHER_MCP_RANCHER_TOKEN=your-token
|
|
169
|
+
RANCHER_MCP_READ_ONLY=true
|
|
170
|
+
```
|
|
173
171
|
|
|
174
|
-
|
|
172
|
+
### HTTP/SSE Mode
|
|
173
|
+
|
|
174
|
+
Run with a port number for network access:
|
|
175
175
|
|
|
176
176
|
```shell
|
|
177
|
-
# Start the server on port 8080
|
|
178
177
|
rancher-mcp-server --port 8080 \
|
|
179
178
|
--rancher-server-url https://your-rancher-server.com \
|
|
180
179
|
--rancher-token your-token
|
|
181
180
|
```
|
|
182
181
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
- **`/message`** - Message endpoint for SSE clients
|
|
189
|
-
|
|
190
|
-
#### Using SSE Base URL
|
|
182
|
+
Endpoints:
|
|
183
|
+
- `/healthz` - Health check
|
|
184
|
+
- `/mcp` - Streamable HTTP endpoint
|
|
185
|
+
- `/sse` - Server-Sent Events endpoint
|
|
186
|
+
- `/message` - Message endpoint for SSE clients
|
|
191
187
|
|
|
192
|
-
|
|
188
|
+
With a public URL behind a proxy:
|
|
193
189
|
|
|
194
190
|
```shell
|
|
195
191
|
rancher-mcp-server --port 8080 \
|
|
@@ -198,214 +194,180 @@ rancher-mcp-server --port 8080 \
|
|
|
198
194
|
--rancher-token your-token
|
|
199
195
|
```
|
|
200
196
|
|
|
201
|
-
##
|
|
197
|
+
## Tools and Functionalities <a id="tools-and-functionalities"></a>
|
|
198
|
+
|
|
199
|
+
Tools are organized into toolsets. Use `--toolsets` to enable specific sets or `--enabled-tools`/`--disabled-tools` for fine-grained control.
|
|
200
|
+
|
|
201
|
+
### Toolsets
|
|
202
|
+
|
|
203
|
+
| Toolset | API | Description |
|
|
204
|
+
|---------|-----|-------------|
|
|
205
|
+
| kubernetes | Steve | Kubernetes CRUD operations for any resource type |
|
|
206
|
+
| rancher | Norman | Cluster and project listing |
|
|
207
|
+
|
|
208
|
+
### kubernetes
|
|
209
|
+
|
|
210
|
+
<details>
|
|
211
|
+
<summary>kubernetes_get</summary>
|
|
212
|
+
|
|
213
|
+
Get a Kubernetes resource by kind, namespace, and name.
|
|
202
214
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
215
|
+
| Parameter | Type | Required | Description |
|
|
216
|
+
|-----------|------|----------|-------------|
|
|
217
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
218
|
+
| `kind` | string | Yes | Resource kind (e.g., pod, deployment, service) |
|
|
219
|
+
| `namespace` | string | No | Namespace (optional for cluster-scoped resources) |
|
|
220
|
+
| `name` | string | Yes | Resource name |
|
|
221
|
+
| `format` | string | No | Output format: json, yaml (default: json) |
|
|
206
222
|
|
|
207
|
-
|
|
223
|
+
</details>
|
|
224
|
+
|
|
225
|
+
<details>
|
|
226
|
+
<summary>kubernetes_list</summary>
|
|
208
227
|
|
|
209
|
-
|
|
228
|
+
List Kubernetes resources by kind.
|
|
210
229
|
|
|
211
|
-
|
|
|
212
|
-
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
230
|
+
| Parameter | Type | Required | Description |
|
|
231
|
+
|-----------|------|----------|-------------|
|
|
232
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
233
|
+
| `kind` | string | Yes | Resource kind |
|
|
234
|
+
| `namespace` | string | No | Namespace (empty = all namespaces) |
|
|
235
|
+
| `name` | string | No | Filter by name (partial match) |
|
|
236
|
+
| `labelSelector` | string | No | Label selector (e.g., "app=nginx,env=prod") |
|
|
237
|
+
| `limit` | integer | No | Items per page (default: 100) |
|
|
238
|
+
| `page` | integer | No | Page number, starting from 1 (default: 1) |
|
|
239
|
+
| `format` | string | No | Output format: json, table, yaml (default: json) |
|
|
217
240
|
|
|
218
|
-
|
|
241
|
+
</details>
|
|
219
242
|
|
|
220
243
|
<details>
|
|
221
|
-
<summary>
|
|
244
|
+
<summary>kubernetes_logs</summary>
|
|
222
245
|
|
|
223
|
-
|
|
224
|
-
|
|
246
|
+
Get logs from a pod container.
|
|
247
|
+
|
|
248
|
+
| Parameter | Type | Required | Description |
|
|
249
|
+
|-----------|------|----------|-------------|
|
|
250
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
251
|
+
| `namespace` | string | Yes | Namespace |
|
|
252
|
+
| `name` | string | Yes | Pod name |
|
|
253
|
+
| `container` | string | No | Container name (empty = all containers) |
|
|
254
|
+
| `tailLines` | integer | No | Lines from end (default: 100) |
|
|
255
|
+
| `sinceSeconds` | integer | No | Logs from last N seconds |
|
|
256
|
+
| `timestamps` | boolean | No | Include timestamps (default: false) |
|
|
257
|
+
| `previous` | boolean | No | Previous container instance (default: false) |
|
|
225
258
|
|
|
226
259
|
</details>
|
|
227
260
|
|
|
228
261
|
<details>
|
|
229
|
-
<summary>
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
- **node_list** - List all nodes in a cluster
|
|
240
|
-
- `cluster` (`string`) - Cluster ID to list nodes from (optional)
|
|
241
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
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: "yaml")
|
|
249
|
-
|
|
250
|
-
- **workload_list** - List workloads (deployments, statefulsets, daemonsets, jobs) and orphan pods in a cluster
|
|
251
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
252
|
-
- `project` (`string`) - Project ID to filter workloads (optional)
|
|
253
|
-
- `namespace` (`string`) - Namespace name to filter workloads (optional)
|
|
254
|
-
- `node` (`string`) - Node name to filter workloads (optional)
|
|
255
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
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: "yaml")
|
|
261
|
-
|
|
262
|
-
- **namespace_list** - List namespaces in a cluster
|
|
263
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
264
|
-
- `project` (`string`) - Project ID to filter namespaces (optional)
|
|
265
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
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: "yaml")
|
|
273
|
-
|
|
274
|
-
- **configmap_get** - Get a single ConfigMap by name and namespace, more efficient than list
|
|
275
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
276
|
-
- `namespace` (`string`) **(required)** - Namespace name
|
|
277
|
-
- `name` (`string`) **(required)** - ConfigMap name to get
|
|
278
|
-
- `project` (`string`) - Project ID (optional, will auto-detect if not provided)
|
|
279
|
-
- `format` (`string`) - Output format: yaml or json (default: "json")
|
|
280
|
-
|
|
281
|
-
- **configmap_list** - List all ConfigMaps in a cluster
|
|
282
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
283
|
-
- `project` (`string`) - Project ID to filter ConfigMaps (optional)
|
|
284
|
-
- `namespace` (`string`) - Namespace name to filter ConfigMaps (optional)
|
|
285
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
286
|
-
|
|
287
|
-
- **secret_get** - Get a single Secret by name and namespace, more efficient than list (metadata only, does not expose secret data)
|
|
288
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
289
|
-
- `namespace` (`string`) **(required)** - Namespace name
|
|
290
|
-
- `name` (`string`) **(required)** - Secret name to get
|
|
291
|
-
- `project` (`string`) - Project ID (optional, will auto-detect if not provided)
|
|
292
|
-
- `format` (`string`) - Output format: yaml or json (default: "yaml")
|
|
293
|
-
|
|
294
|
-
- **secret_get** - Get a single Secret by name and namespace, more efficient than list (metadata only, does not expose secret data)
|
|
295
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
296
|
-
- `namespace` (`string`) **(required)** - Namespace name
|
|
297
|
-
- `name` (`string`) **(required)** - Secret name to get
|
|
298
|
-
- `project` (`string`) - Project ID (optional, will auto-detect if not provided)
|
|
299
|
-
- `format` (`string`) - Output format: yaml or json (default: "json")
|
|
300
|
-
|
|
301
|
-
- **secret_list** - List all Secrets in a cluster (metadata only, does not expose secret data)
|
|
302
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
303
|
-
- `project` (`string`) - Project ID to filter secrets (optional)
|
|
304
|
-
- `namespace` (`string`) - Namespace name to filter secrets (optional)
|
|
305
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
306
|
-
|
|
307
|
-
- **service_get** - Get a single service by name with optional pod diagnostic check (Service → Pods), more efficient than list
|
|
308
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
309
|
-
- `namespace` (`string`) **(required)** - Namespace name
|
|
310
|
-
- `name` (`string`) **(required)** - Service name to get
|
|
311
|
-
- `project` (`string`) - Project ID (optional, will auto-detect if not provided)
|
|
312
|
-
- `getPodDetails` (`boolean`) - Get detailed pod information and perform health checks (default: false)
|
|
313
|
-
- `format` (`string`) - Output format: yaml or json (default: "yaml")
|
|
314
|
-
|
|
315
|
-
- **service_list** - List services with optional pod diagnostic check (Service → Pods), supports Ready/Degraded dual-state diagnosis
|
|
316
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
317
|
-
- `project` (`string`) - Project ID to filter services (optional)
|
|
318
|
-
- `namespace` (`string`) - Namespace name to filter services (optional)
|
|
319
|
-
- `getPodDetails` (`boolean`) - Get pod information and perform health checks for services (default: false)
|
|
320
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
262
|
+
<summary>kubernetes_inspect_pod</summary>
|
|
263
|
+
|
|
264
|
+
Get pod diagnostics: details, parent workload, metrics, and logs.
|
|
265
|
+
|
|
266
|
+
| Parameter | Type | Required | Description |
|
|
267
|
+
|-----------|------|----------|-------------|
|
|
268
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
269
|
+
| `namespace` | string | Yes | Namespace |
|
|
270
|
+
| `name` | string | Yes | Pod name |
|
|
321
271
|
|
|
322
272
|
</details>
|
|
323
273
|
|
|
324
274
|
<details>
|
|
325
|
-
<summary>
|
|
275
|
+
<summary>kubernetes_create</summary>
|
|
326
276
|
|
|
327
|
-
|
|
328
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
277
|
+
Create a Kubernetes resource. Disabled when `read_only=true`.
|
|
329
278
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
279
|
+
| Parameter | Type | Required | Description |
|
|
280
|
+
|-----------|------|----------|-------------|
|
|
281
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
282
|
+
| `resource` | string | Yes | JSON manifest (must include apiVersion, kind, metadata, spec) |
|
|
334
283
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
284
|
+
</details>
|
|
285
|
+
|
|
286
|
+
<details>
|
|
287
|
+
<summary>kubernetes_patch</summary>
|
|
288
|
+
|
|
289
|
+
Patch a resource using JSON Patch (RFC 6902). Disabled when `read_only=true`.
|
|
338
290
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
291
|
+
| Parameter | Type | Required | Description |
|
|
292
|
+
|-----------|------|----------|-------------|
|
|
293
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
294
|
+
| `kind` | string | Yes | Resource kind |
|
|
295
|
+
| `namespace` | string | No | Namespace (optional for cluster-scoped) |
|
|
296
|
+
| `name` | string | Yes | Resource name |
|
|
297
|
+
| `patch` | string | Yes | JSON Patch array, e.g., `[{"op":"replace","path":"/spec/replicas","value":3}]` |
|
|
342
298
|
|
|
343
|
-
|
|
344
|
-
|
|
299
|
+
</details>
|
|
300
|
+
|
|
301
|
+
<details>
|
|
302
|
+
<summary>kubernetes_delete</summary>
|
|
345
303
|
|
|
346
|
-
|
|
347
|
-
- `cluster` (`string`) - Specific cluster ID to check health (optional)
|
|
348
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
304
|
+
Delete a Kubernetes resource. Disabled when `read_only=true` or `disable_destructive=true`.
|
|
349
305
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
306
|
+
| Parameter | Type | Required | Description |
|
|
307
|
+
|-----------|------|----------|-------------|
|
|
308
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
309
|
+
| `kind` | string | Yes | Resource kind |
|
|
310
|
+
| `namespace` | string | No | Namespace (optional for cluster-scoped) |
|
|
311
|
+
| `name` | string | Yes | Resource name |
|
|
354
312
|
|
|
355
313
|
</details>
|
|
356
314
|
|
|
315
|
+
### rancher
|
|
316
|
+
|
|
357
317
|
<details>
|
|
358
|
-
<summary>
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
- **ingress_list** - List ingresses with full diagnostic chain check (Ingress → Service → Pods), supports Ready/Degraded dual-state diagnosis
|
|
369
|
-
- `cluster` (`string`) **(required)** - Cluster ID
|
|
370
|
-
- `project` (`string`) - Project ID to filter ingresses (optional)
|
|
371
|
-
- `namespace` (`string`) - Namespace name to filter ingresses (optional)
|
|
372
|
-
- `getPodDetails` (`boolean`) - Get detailed pod information and perform health checks (default: false)
|
|
373
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "table")
|
|
318
|
+
<summary>cluster_list</summary>
|
|
319
|
+
|
|
320
|
+
List available Rancher clusters.
|
|
321
|
+
|
|
322
|
+
| Parameter | Type | Required | Description |
|
|
323
|
+
|-----------|------|----------|-------------|
|
|
324
|
+
| `name` | string | No | Filter by cluster name (partial match) |
|
|
325
|
+
| `limit` | integer | No | Items per page (default: 100) |
|
|
326
|
+
| `page` | integer | No | Page number (default: 1) |
|
|
327
|
+
| `format` | string | No | Output format: json, table, yaml (default: json) |
|
|
374
328
|
|
|
375
329
|
</details>
|
|
376
330
|
|
|
377
|
-
|
|
331
|
+
<details>
|
|
332
|
+
<summary>project_list</summary>
|
|
333
|
+
|
|
334
|
+
List Rancher projects.
|
|
335
|
+
|
|
336
|
+
| Parameter | Type | Required | Description |
|
|
337
|
+
|-----------|------|----------|-------------|
|
|
338
|
+
| `cluster` | string | No | Filter by cluster ID |
|
|
339
|
+
| `name` | string | No | Filter by project name (partial match) |
|
|
340
|
+
| `limit` | integer | No | Items per page (default: 100) |
|
|
341
|
+
| `page` | integer | No | Page number (default: 1) |
|
|
342
|
+
| `format` | string | No | Output format: json, table, yaml (default: json) |
|
|
343
|
+
|
|
344
|
+
</details>
|
|
378
345
|
|
|
379
|
-
|
|
346
|
+
## Development <a id="development"></a>
|
|
380
347
|
|
|
381
|
-
|
|
348
|
+
### Build
|
|
382
349
|
|
|
383
350
|
```shell
|
|
384
|
-
# Compile the project
|
|
385
351
|
make build
|
|
386
|
-
# Run the Rancher MCP server with mcp-inspector
|
|
387
|
-
npx @modelcontextprotocol/inspector@latest $(pwd)/rancher-mcp-server
|
|
388
352
|
```
|
|
389
353
|
|
|
390
|
-
|
|
354
|
+
### Run with mcp-inspector
|
|
391
355
|
|
|
392
|
-
|
|
356
|
+
```shell
|
|
357
|
+
npx @modelcontextprotocol/inspector@latest $(pwd)/rancher-mcp-server
|
|
358
|
+
```
|
|
393
359
|
|
|
394
|
-
|
|
360
|
+
See [DEVELOPMENT.md](DEVELOPMENT.md) for more details.
|
|
395
361
|
|
|
396
|
-
|
|
362
|
+
## Contributing
|
|
397
363
|
|
|
398
|
-
|
|
364
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
399
365
|
|
|
400
366
|
## Support
|
|
401
367
|
|
|
402
|
-
|
|
403
|
-
-
|
|
404
|
-
- Check the [troubleshooting guide](TROUBLESHOOTING.md)
|
|
405
|
-
- Review the [documentation](https://github.com/futuretea/rancher-mcp-server/docs)
|
|
368
|
+
- [GitHub Issues](https://github.com/futuretea/rancher-mcp-server/issues)
|
|
369
|
+
- [Troubleshooting Guide](TROUBLESHOOTING.md)
|
|
406
370
|
|
|
407
|
-
##
|
|
371
|
+
## License
|
|
408
372
|
|
|
409
|
-
|
|
410
|
-
- **Issues**: [GitHub Issues](https://github.com/futuretea/rancher-mcp-server/issues)
|
|
411
|
-
- **Discussions**: [GitHub Discussions](https://github.com/futuretea/rancher-mcp-server/discussions)
|
|
373
|
+
[Apache-2.0](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futuretea/rancher-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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.
|
|
11
|
-
"@futuretea/rancher-mcp-server-darwin-arm64": "0.
|
|
12
|
-
"@futuretea/rancher-mcp-server-linux-amd64": "0.
|
|
13
|
-
"@futuretea/rancher-mcp-server-linux-arm64": "0.
|
|
14
|
-
"@futuretea/rancher-mcp-server-windows-amd64": "0.
|
|
15
|
-
"@futuretea/rancher-mcp-server-windows-arm64": "0.
|
|
10
|
+
"@futuretea/rancher-mcp-server-darwin-amd64": "0.4.0",
|
|
11
|
+
"@futuretea/rancher-mcp-server-darwin-arm64": "0.4.0",
|
|
12
|
+
"@futuretea/rancher-mcp-server-linux-amd64": "0.4.0",
|
|
13
|
+
"@futuretea/rancher-mcp-server-linux-arm64": "0.4.0",
|
|
14
|
+
"@futuretea/rancher-mcp-server-windows-amd64": "0.4.0",
|
|
15
|
+
"@futuretea/rancher-mcp-server-windows-arm64": "0.4.0"
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|