@futuretea/rancher-mcp-server 0.3.3 → 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 +227 -251
- 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
|
{
|
|
@@ -59,7 +48,7 @@ Open your `claude_desktop_config.json` and add the mcp server to the list of `mc
|
|
|
59
48
|
"-y",
|
|
60
49
|
"@futuretea/rancher-mcp-server@latest",
|
|
61
50
|
"--rancher-server-url",
|
|
62
|
-
"https://your-rancher-server.com
|
|
51
|
+
"https://your-rancher-server.com",
|
|
63
52
|
"--rancher-token",
|
|
64
53
|
"your-token"
|
|
65
54
|
]
|
|
@@ -70,19 +59,17 @@ 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
|
-
code --add-mcp '{"name":"rancher","command":"npx","args":["@futuretea/rancher-mcp-server@latest","--rancher-server-url","https://your-rancher-server.com
|
|
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"]}'
|
|
78
65
|
|
|
79
66
|
# For VS Code Insiders
|
|
80
|
-
code-insiders --add-mcp '{"name":"rancher","command":"npx","args":["@futuretea/rancher-mcp-server@latest","--rancher-server-url","https://your-rancher-server.com
|
|
67
|
+
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"]}'
|
|
81
68
|
```
|
|
82
69
|
|
|
83
70
|
### Cursor
|
|
84
71
|
|
|
85
|
-
|
|
72
|
+
Edit `mcp.json`:
|
|
86
73
|
|
|
87
74
|
```json
|
|
88
75
|
{
|
|
@@ -93,7 +80,7 @@ Install the Rancher MCP server extension in Cursor by editing the `mcp.json` fil
|
|
|
93
80
|
"-y",
|
|
94
81
|
"@futuretea/rancher-mcp-server@latest",
|
|
95
82
|
"--rancher-server-url",
|
|
96
|
-
"https://your-rancher-server.com
|
|
83
|
+
"https://your-rancher-server.com",
|
|
97
84
|
"--rancher-token",
|
|
98
85
|
"your-token"
|
|
99
86
|
]
|
|
@@ -102,296 +89,285 @@ 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
|
-
rancher_server_url: https://your-rancher-server.com
|
|
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
|
-
--rancher-server-url https://your-rancher-server.com
|
|
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
|
|
182
|
+
Endpoints:
|
|
183
|
+
- `/healthz` - Health check
|
|
184
|
+
- `/mcp` - Streamable HTTP endpoint
|
|
185
|
+
- `/sse` - Server-Sent Events endpoint
|
|
186
|
+
- `/message` - Message endpoint for SSE clients
|
|
189
187
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
When deploying behind a reverse proxy or load balancer, you can specify a public base URL:
|
|
188
|
+
With a public URL behind a proxy:
|
|
193
189
|
|
|
194
190
|
```shell
|
|
195
191
|
rancher-mcp-server --port 8080 \
|
|
196
192
|
--sse-base-url https://your-domain.com:8080 \
|
|
197
|
-
--rancher-server-url https://your-rancher-server.com
|
|
193
|
+
--rancher-server-url https://your-rancher-server.com \
|
|
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.
|
|
214
|
+
|
|
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) |
|
|
202
222
|
|
|
203
|
-
|
|
204
|
-
This allows you to control which Rancher functionalities are available to your AI tools.
|
|
205
|
-
Enabling only the toolsets you need can help reduce the context size and improve the LLM's tool selection accuracy.
|
|
223
|
+
</details>
|
|
206
224
|
|
|
207
|
-
|
|
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>
|
|
245
|
+
|
|
246
|
+
Get logs from a pod container.
|
|
222
247
|
|
|
223
|
-
|
|
224
|
-
|
|
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: "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")
|
|
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: "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")
|
|
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: "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")
|
|
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 |
|
|
307
271
|
|
|
308
272
|
</details>
|
|
309
273
|
|
|
310
274
|
<details>
|
|
311
|
-
<summary>
|
|
275
|
+
<summary>kubernetes_create</summary>
|
|
312
276
|
|
|
313
|
-
|
|
314
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "json")
|
|
277
|
+
Create a Kubernetes resource. Disabled when `read_only=true`.
|
|
315
278
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
279
|
+
| Parameter | Type | Required | Description |
|
|
280
|
+
|-----------|------|----------|-------------|
|
|
281
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
282
|
+
| `resource` | string | Yes | JSON manifest (must include apiVersion, kind, metadata, spec) |
|
|
320
283
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
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`.
|
|
324
290
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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}]` |
|
|
328
298
|
|
|
329
|
-
|
|
330
|
-
|
|
299
|
+
</details>
|
|
300
|
+
|
|
301
|
+
<details>
|
|
302
|
+
<summary>kubernetes_delete</summary>
|
|
331
303
|
|
|
332
|
-
|
|
333
|
-
- `cluster` (`string`) - Specific cluster ID to check health (optional)
|
|
334
|
-
- `format` (`string`) - Output format: table, yaml, or json (default: "json")
|
|
304
|
+
Delete a Kubernetes resource. Disabled when `read_only=true` or `disable_destructive=true`.
|
|
335
305
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
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 |
|
|
340
312
|
|
|
341
313
|
</details>
|
|
342
314
|
|
|
315
|
+
### rancher
|
|
316
|
+
|
|
343
317
|
<details>
|
|
344
|
-
<summary>
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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")
|
|
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) |
|
|
360
328
|
|
|
361
329
|
</details>
|
|
362
330
|
|
|
363
|
-
|
|
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>
|
|
364
345
|
|
|
365
|
-
|
|
346
|
+
## Development <a id="development"></a>
|
|
366
347
|
|
|
367
|
-
|
|
348
|
+
### Build
|
|
368
349
|
|
|
369
350
|
```shell
|
|
370
|
-
# Compile the project
|
|
371
351
|
make build
|
|
372
|
-
# Run the Rancher MCP server with mcp-inspector
|
|
373
|
-
npx @modelcontextprotocol/inspector@latest $(pwd)/rancher-mcp-server
|
|
374
352
|
```
|
|
375
353
|
|
|
376
|
-
|
|
354
|
+
### Run with mcp-inspector
|
|
377
355
|
|
|
378
|
-
|
|
356
|
+
```shell
|
|
357
|
+
npx @modelcontextprotocol/inspector@latest $(pwd)/rancher-mcp-server
|
|
358
|
+
```
|
|
379
359
|
|
|
380
|
-
|
|
360
|
+
See [DEVELOPMENT.md](DEVELOPMENT.md) for more details.
|
|
381
361
|
|
|
382
|
-
|
|
362
|
+
## Contributing
|
|
383
363
|
|
|
384
|
-
|
|
364
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
385
365
|
|
|
386
366
|
## Support
|
|
387
367
|
|
|
388
|
-
|
|
389
|
-
-
|
|
390
|
-
- Check the [troubleshooting guide](TROUBLESHOOTING.md)
|
|
391
|
-
- 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)
|
|
392
370
|
|
|
393
|
-
##
|
|
371
|
+
## License
|
|
394
372
|
|
|
395
|
-
|
|
396
|
-
- **Issues**: [GitHub Issues](https://github.com/futuretea/rancher-mcp-server/issues)
|
|
397
|
-
- **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",
|