@teamnetwork-nz/sonicwall-api-mcp-server 0.8.0 → 0.9.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 CHANGED
@@ -15,11 +15,16 @@ A [Model Context Protocol](https://modelcontextprotocol.io/) server that provide
15
15
  - **NAT policies** — full CRUD for inbound/outbound NAT rules
16
16
  - **Security policies** — CRUD for zone-based security policies
17
17
  - **Network discovery** — list zones, interfaces, schedules, and route policies (read-only)
18
+ - **Appliance diagnostics** — network-path lookup, ARP cache, ping, traceroute, and combined IP diagnosis (read-only)
18
19
  - **GeoIP lookup** — identify the country/botnet classification of an IP address
19
20
  - **Config management** — view and commit (or discard) staged changes
20
21
 
21
22
  > The SonicOS REST API is configuration-focused. Runtime event/threat/connection logs and GeoIP *policy* objects are not exposed as REST endpoints and therefore have no tools. `get_log_categories` and `list_log_event_definitions` inspect logging configuration only.
22
23
 
24
+ ### Diagnosing an unreachable IP
25
+
26
+ Use `diagnose_ip` for a combined report containing the appliance's selected network path, configured interfaces and route policies, matching ARP entry, ping result, and traceroute. Set `interface` to force the live tests through an interface such as `X1`, or set `include_traceroute=false` for a faster check. The focused tools `find_network_path`, `lookup_arp`, `ping_from_appliance`, and `traceroute_from_appliance` are also available. Diagnostic POST actions are read-only and work without enabling `SONICWALL_READWRITE`.
27
+
23
28
  Supports SonicOS 6.5.x, 7.x, and 8.x with automatic version detection.
24
29
 
25
30
  ## Quick Start
@@ -58,7 +63,9 @@ uv pip install sonicwall-mcp-server
58
63
  | `SONICWALL_PASSWORD` | Yes | — | Admin password |
59
64
  | `SONICWALL_PORT` | No | `443` | HTTPS management port |
60
65
  | `SONICWALL_SSL_VERIFY` | No | `true` | Set `false` for self-signed certificates |
61
- | `SONICWALL_READ_ONLY` | No | `true` | Set `false` to allow write operations |
66
+ | `SONICWALL_READWRITE` | No | `false` | Set `true` to allow write operations |
67
+
68
+ `SONICWALL_READ_ONLY=false` remains a deprecated compatibility alias for one release. `SONICWALL_READWRITE` takes precedence when both are set.
62
69
  | `SONICWALL_DEVICES_FILE` | No | — | Path to JSON file for multi-device config |
63
70
  | `SONICWALL_REQUEST_TIMEOUT` | No | `30.0` | Per-request timeout in seconds |
64
71
 
@@ -81,7 +88,7 @@ Add to your MCP config (`claude_desktop_config.json` or `.claude/settings.json`)
81
88
  "SONICWALL_USERNAME": "admin",
82
89
  "SONICWALL_PASSWORD": "your_password",
83
90
  "SONICWALL_SSL_VERIFY": "false",
84
- "SONICWALL_READ_ONLY": "false"
91
+ "SONICWALL_READWRITE": "true"
85
92
  }
86
93
  }
87
94
  }
@@ -101,7 +108,7 @@ Add to your MCP config (`claude_desktop_config.json` or `.claude/settings.json`)
101
108
  "SONICWALL_USERNAME": "admin",
102
109
  "SONICWALL_PASSWORD": "your_password",
103
110
  "SONICWALL_SSL_VERIFY": "false",
104
- "SONICWALL_READ_ONLY": "false"
111
+ "SONICWALL_READWRITE": "true"
105
112
  }
106
113
  }
107
114
  }
@@ -120,7 +127,7 @@ Add to your MCP config (`claude_desktop_config.json` or `.claude/settings.json`)
120
127
  "SONICWALL_USERNAME": "admin",
121
128
  "SONICWALL_PASSWORD": "your_password",
122
129
  "SONICWALL_SSL_VERIFY": "false",
123
- "SONICWALL_READ_ONLY": "false"
130
+ "SONICWALL_READWRITE": "true"
124
131
  }
125
132
  }
126
133
  }
package/dist/env.js ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/env.ts
22
+ var env_exports = {};
23
+ __export(env_exports, {
24
+ parsePositiveInt: () => parsePositiveInt
25
+ });
26
+ module.exports = __toCommonJS(env_exports);
27
+ function parsePositiveInt(name, raw, fallback, maximum) {
28
+ if (raw === void 0 || raw.trim() === "") return fallback;
29
+ if (!/^\d+$/.test(raw.trim())) {
30
+ throw new Error(`${name} must be an integer from 1 to ${maximum}`);
31
+ }
32
+ const value = Number(raw);
33
+ if (!Number.isSafeInteger(value) || value < 1 || value > maximum) {
34
+ throw new Error(`${name} must be an integer from 1 to ${maximum}`);
35
+ }
36
+ return value;
37
+ }
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ parsePositiveInt
41
+ });