@futuretea/rancher-mcp-server 0.4.0 → 0.4.2

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 +45 -34
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -16,7 +16,9 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for Ra
16
16
  - Create resources from JSON manifests
17
17
  - Patch resources using JSON Patch (RFC 6902)
18
18
  - Delete resources
19
- - Query container logs with filtering (tail lines, time range, timestamps)
19
+ - Describe resources with related events (similar to `kubectl describe`)
20
+ - List and filter Kubernetes events by namespace, object name, and object kind
21
+ - Query container logs with filtering (tail lines, time range, timestamps, keyword search)
20
22
  - Inspect pods with parent workload, metrics, and logs
21
23
  - **Rancher Resources via Norman API**: List clusters and projects
22
24
  - **Security Controls**:
@@ -35,45 +37,21 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for Ra
35
37
  - Access to a Rancher server
36
38
  - Rancher API credentials (Token or Access Key/Secret Key)
37
39
 
38
- ### Claude Desktop
39
-
40
- Using npx:
41
-
42
- ```json
43
- {
44
- "mcpServers": {
45
- "rancher": {
46
- "command": "npx",
47
- "args": [
48
- "-y",
49
- "@futuretea/rancher-mcp-server@latest",
50
- "--rancher-server-url",
51
- "https://your-rancher-server.com",
52
- "--rancher-token",
53
- "your-token"
54
- ]
55
- }
56
- }
57
- }
58
- ```
59
-
60
- ### VS Code / VS Code Insiders
40
+ ### Claude Code
61
41
 
62
42
  ```shell
63
- # For VS Code
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"]}'
65
-
66
- # For VS Code Insiders
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"]}'
43
+ claude mcp add rancher -- npx @futuretea/rancher-mcp-server@latest \
44
+ --rancher-server-url https://your-rancher-server.com \
45
+ --rancher-token your-token
68
46
  ```
69
47
 
70
- ### Cursor
48
+ ### VS Code / Cursor
71
49
 
72
- Edit `mcp.json`:
50
+ Add to `.vscode/mcp.json` or `~/.cursor/mcp.json`:
73
51
 
74
52
  ```json
75
53
  {
76
- "mcpServers": {
54
+ "servers": {
77
55
  "rancher": {
78
56
  "command": "npx",
79
57
  "args": [
@@ -110,7 +88,7 @@ npx @futuretea/rancher-mcp-server@latest --help
110
88
  | `--config` | Config file path (YAML) | |
111
89
  | `--port` | Port for HTTP/SSE mode (0 = stdio mode) | `0` |
112
90
  | `--sse-base-url` | Public base URL for SSE endpoint | |
113
- | `--log-level` | Log level (0-9) | `0` |
91
+ | `--log-level` | Log level (0-9) | `5` |
114
92
  | `--rancher-server-url` | Rancher server URL | |
115
93
  | `--rancher-token` | Rancher bearer token | |
116
94
  | `--rancher-access-key` | Rancher access key | |
@@ -131,7 +109,7 @@ Create `config.yaml`:
131
109
  ```yaml
132
110
  port: 0 # 0 for stdio, or set a port like 8080 for HTTP/SSE
133
111
 
134
- log_level: 0
112
+ log_level: 5
135
113
 
136
114
  rancher_server_url: https://your-rancher-server.com
137
115
  rancher_token: your-bearer-token
@@ -255,6 +233,7 @@ Get logs from a pod container.
255
233
  | `sinceSeconds` | integer | No | Logs from last N seconds |
256
234
  | `timestamps` | boolean | No | Include timestamps (default: false) |
257
235
  | `previous` | boolean | No | Previous container instance (default: false) |
236
+ | `keyword` | string | No | Filter log lines containing this keyword (case-insensitive) |
258
237
 
259
238
  </details>
260
239
 
@@ -271,6 +250,38 @@ Get pod diagnostics: details, parent workload, metrics, and logs.
271
250
 
272
251
  </details>
273
252
 
253
+ <details>
254
+ <summary>kubernetes_describe</summary>
255
+
256
+ Describe a Kubernetes resource with its related events. Similar to `kubectl describe`.
257
+
258
+ | Parameter | Type | Required | Description |
259
+ |-----------|------|----------|-------------|
260
+ | `cluster` | string | Yes | Cluster ID |
261
+ | `kind` | string | Yes | Resource kind (e.g., pod, deployment, service, node) |
262
+ | `namespace` | string | No | Namespace (optional for cluster-scoped resources) |
263
+ | `name` | string | Yes | Resource name |
264
+ | `format` | string | No | Output format: json, yaml (default: json) |
265
+
266
+ </details>
267
+
268
+ <details>
269
+ <summary>kubernetes_events</summary>
270
+
271
+ List Kubernetes events. Supports filtering by namespace, involved object name, and kind.
272
+
273
+ | Parameter | Type | Required | Description |
274
+ |-----------|------|----------|-------------|
275
+ | `cluster` | string | Yes | Cluster ID |
276
+ | `namespace` | string | No | Namespace (empty = all namespaces) |
277
+ | `name` | string | No | Filter by involved object name |
278
+ | `kind` | string | No | Filter by involved object kind (e.g., Pod, Deployment, Node) |
279
+ | `limit` | integer | No | Events per page (default: 50) |
280
+ | `page` | integer | No | Page number, starting from 1 (default: 1) |
281
+ | `format` | string | No | Output format: json, table, yaml (default: table) |
282
+
283
+ </details>
284
+
274
285
  <details>
275
286
  <summary>kubernetes_create</summary>
276
287
 
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@futuretea/rancher-mcp-server",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
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.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"
10
+ "@futuretea/rancher-mcp-server-darwin-amd64": "0.4.2",
11
+ "@futuretea/rancher-mcp-server-darwin-arm64": "0.4.2",
12
+ "@futuretea/rancher-mcp-server-linux-amd64": "0.4.2",
13
+ "@futuretea/rancher-mcp-server-linux-arm64": "0.4.2",
14
+ "@futuretea/rancher-mcp-server-windows-amd64": "0.4.2",
15
+ "@futuretea/rancher-mcp-server-windows-arm64": "0.4.2"
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",