@teamnetwork-nz/sonicwall-api-mcp-server 0.2.0 → 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 +55 -21
- package/dist/index.js +2083 -0
- package/package.json +51 -39
- package/bin/index.js +0 -63
package/package.json
CHANGED
|
@@ -1,39 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@teamnetwork-nz/sonicwall-api-mcp-server",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server for SonicWall NSA appliance API — logs, CRUD objects, rules, NAT, GeoIP",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"mcp",
|
|
7
|
-
"model-context-protocol",
|
|
8
|
-
"sonicwall",
|
|
9
|
-
"firewall",
|
|
10
|
-
"sonicOS",
|
|
11
|
-
"api",
|
|
12
|
-
"network",
|
|
13
|
-
"security"
|
|
14
|
-
],
|
|
15
|
-
"homepage": "https://github.com/teamnetwork-nz/sonicwall-api-mcp-server",
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/teamnetwork-nz/sonicwall-api-mcp-server/issues"
|
|
18
|
-
},
|
|
19
|
-
"license": "MIT",
|
|
20
|
-
"author": "Daryl",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
}
|
|
39
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@teamnetwork-nz/sonicwall-api-mcp-server",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "MCP server for SonicWall NSA appliance API — logs, CRUD objects, rules, NAT, GeoIP",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"sonicwall",
|
|
9
|
+
"firewall",
|
|
10
|
+
"sonicOS",
|
|
11
|
+
"api",
|
|
12
|
+
"network",
|
|
13
|
+
"security"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/teamnetwork-nz/sonicwall-api-mcp-server",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/teamnetwork-nz/sonicwall-api-mcp-server/issues"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "Daryl",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/teamnetwork-nz/sonicwall-api-mcp-server.git"
|
|
24
|
+
},
|
|
25
|
+
"main": "dist/index.js",
|
|
26
|
+
"bin": {
|
|
27
|
+
"sonicwall-mcp": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist/",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsup",
|
|
36
|
+
"prepublishOnly": "npm run build",
|
|
37
|
+
"start": "node dist/index.js"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@modelcontextprotocol/sdk": "^1.10.0",
|
|
44
|
+
"zod": "^3.23.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^20.0.0",
|
|
48
|
+
"tsup": "^8.0.0",
|
|
49
|
+
"typescript": "^5.4.0"
|
|
50
|
+
}
|
|
51
|
+
}
|
package/bin/index.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Launcher for the SonicWall MCP server (Python package).
|
|
4
|
-
* Requires uv to be installed: https://docs.astral.sh/uv/
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* npx @teamnetwork-nz/sonicwall-api-mcp-server
|
|
8
|
-
*
|
|
9
|
-
* Environment variables:
|
|
10
|
-
* SONICWALL_HOST, SONICWALL_USERNAME, SONICWALL_PASSWORD (required)
|
|
11
|
-
* SONICWALL_SSL_VERIFY, SONICWALL_READ_ONLY, ... (optional — see .env.example)
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
const { spawn } = require('child_process');
|
|
15
|
-
|
|
16
|
-
const args = process.argv.slice(2);
|
|
17
|
-
const isWindows = process.platform === 'win32';
|
|
18
|
-
|
|
19
|
-
function run(cmd, cmdArgs) {
|
|
20
|
-
return spawn(cmd, cmdArgs, {
|
|
21
|
-
stdio: 'inherit',
|
|
22
|
-
env: process.env,
|
|
23
|
-
shell: isWindows,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function startWithFallback() {
|
|
28
|
-
const proc = run('uvx', ['sonicwall-mcp-server@latest', ...args]);
|
|
29
|
-
|
|
30
|
-
proc.on('error', (err) => {
|
|
31
|
-
if (err.code !== 'ENOENT') {
|
|
32
|
-
console.error(`sonicwall-mcp: failed to start via uvx: ${err.message}`);
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// uvx not available — try python -m fallback
|
|
37
|
-
console.error(
|
|
38
|
-
'sonicwall-mcp: uvx not found. Falling back to `python -m sonicwall_mcp.server`.\n' +
|
|
39
|
-
'Install uv for the best experience: https://docs.astral.sh/uv/'
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
const fallback = run('python', ['-m', 'sonicwall_mcp.server', ...args]);
|
|
43
|
-
|
|
44
|
-
fallback.on('error', (e) => {
|
|
45
|
-
if (e.code === 'ENOENT') {
|
|
46
|
-
console.error(
|
|
47
|
-
'sonicwall-mcp: neither uvx nor python was found.\n' +
|
|
48
|
-
'Install uv (https://docs.astral.sh/uv/) or Python with sonicwall-mcp-server:\n' +
|
|
49
|
-
' pip install sonicwall-mcp-server'
|
|
50
|
-
);
|
|
51
|
-
} else {
|
|
52
|
-
console.error(`sonicwall-mcp: ${e.message}`);
|
|
53
|
-
}
|
|
54
|
-
process.exit(1);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
fallback.on('close', (code) => process.exit(code ?? 0));
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
proc.on('close', (code) => process.exit(code ?? 0));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
startWithFallback();
|