SonicWall NSM MCP Server
Provides read-only access to SonicWall Network Security Manager (NSM) SaaS, enabling fleet posture checks, device and firmware reporting, per-site live status reads, security service audits, VPN/NAT/access rule inspection, config history and diff review, and fleet-wide host/subnet searches.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SonicWall NSM MCP ServerIs the Springfield site up?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SonicWall NSM MCP Server
A read-only Model Context Protocol server for SonicWall Network Security Manager (NSM) SaaS. It gives any MCP-capable AI agent — Claude Code, Claude Desktop, Copilot Studio, or your own — 46 tools for answering real network-operations questions about a SonicWall firewall fleet:
"Is the Springfield site up?" · "Which firewalls still have IPS switched off?" · "What changed on this firewall in the last 24 hours?" · "Which site has the device with MAC 00:1A:2B...?" · "Is anything still permitting RDP inbound?"
Everything is read-only by construction: the HTTP client refuses non-GET methods before any I/O, and the recommended deployment authenticates with a MySonicWall account whose NSM role is ReadOnly — so a write is impossible even if the code were wrong.
Design principles
These rules are enforced across every tool, because they are what make an AI agent's answers trustworthy:
"Zero findings" and "data unavailable" are never merged. Every response carries
data_status: "ok"(zeros are real zeros) or"unavailable"(upstream failed — no data keys at all). Partial answers name each area that could not be read (areas_unavailable) and each area the platform cannot report at all (not_covered), so silence is never mistaken for health.Provenance is explicit. Every answer says whether it is live (read from the firewall right now), cached (NSM's tenant record, ≤60 s old), or collected (NSM's analytics store, only as fresh as the firewall's last check-in — where an offline firewall looks identical to a quiet one, the payload says so).
Responses stay under 500 KB via field projection, top-N caps, and an explicit
truncatedflag with authoritative counts.Secrets never cross the boundary. Credential-dense payloads are projected through allow-lists of named fields (never deny-lists); config diffs return changed key names only, never values; registration/authentication codes are never returned.
Chat-client-friendly schemas. Single primitive parameter types with defaults — no
Optional[...]unions, which some MCP clients silently drop.
Related MCP server: Datadog MCP Server
Tools
Fleet posture (cached from NSM's tenant record, ≤60 s old)
Tool | What it answers |
| Inventory with filters on name, model, group, online state |
| Full posture for one firewall or one site |
| Version counts, outliers, vulnerable-firmware count |
| Who has a newer SonicOS on offer, and the upgrade paths |
| Who is offline, why, and since when |
| Config modified / out of sync / deploy pending |
| Why NSM couldn't deploy or sync, categorized, worst first |
| Devices with published PSIRT advisories |
| Licence status per security service, expiry windows, coterm |
| Which NSM templates are applied where, and failed pushes |
| Every HA pair, failed-over/mismatched/degraded pairs flagged |
| Device counts per region/city/country, with coordinates |
| Posture rolled up per NSM device group |
| ATP off, analytics off, restart required, zero-touch state |
| One-screen fleet posture card, every number source-attributed |
Per-site live reads (read from the firewall on demand)
Tool | What it answers |
| Is this site up? One-word verdict per site |
| Interfaces, zones, VLANs, LAN summary |
| WAN links with failover roles |
| Which circuit is actually carrying traffic right now |
| Live uptime, connections, firmware — flags stale NSM cache |
| Configured site-to-site VPN policies (never the PSK) |
| NAT policies, searchable |
| The rulebase with hit counts, filterable by zone/action |
| Never-hit / zero-traffic / disabled rule candidates |
| Licence + signature freshness per service, live |
| Is SSL-VPN on, WAN-exposed, MFA-configured? |
| Who is connected right now (flagged as personal data) |
| Admin-plane hardening graded against a named standard |
| DHCP leases / ARP cache behind one firewall |
| Built-in radio + SonicPoint APs, clients, RF scores |
| The on-box event log, searchable, with buffer coverage |
| One composed health verdict from every read above |
Fleet-wide sweep-backed search (background sweep, one GET per device)
Tool | What it answers |
| Which LANs are on factory-default or non-standard ranges |
| Find an IP/MAC/hostname/vendor anywhere in the fleet |
| Host counts per site, fleet-wide vendor breakdown |
Change management (NSM manager plane)
Tool | What it answers |
| Stored config versions: who, when, committed vs synchronized |
| Commits NSM pushed, failures first |
| Changed config key names between two versions — never values |
| One timeline of everything NSM knows changed in a window |
Telemetry & analytics (collected by NSM)
Tool | What it answers |
| Attacks, scans, floods, setting changes (long retention) |
| Top attackers, targets, ports, countries |
| Top apps/sources/destinations/users by bandwidth |
| Viruses, intrusions, spyware, botnet, blocked categories |
| Evidence retrieval: has a drop been recorded? (deliberately has no "allowed" verdict) |
Fleet security services (one tenant-wide call)
Tool | What it answers |
| Which services are on/off across every firewall |
| Service state joined to licence state, per-site gap list |
A diagnostic _debug_slow tool (for measuring client timeout budgets) is
registered only when MCP_DEBUG_TOOLS=1.
Requirements
Python 3.12+
A SonicWall NSM SaaS tenant (this server talks to the NSM cloud API, not directly to SonicOS on-box APIs)
A MySonicWall API key — ideally from a dedicated account whose NSM role is ReadOnly
Quick start (local)
git clone <this repo>
cd sonicwall-nsm-mcp
python -m venv .venv
. .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt -c constraints.txtProvide the API key one of two ways:
# Option A: environment variable
export MSW_API_KEY_READONLY="<your MySonicWall API key>"
# Option B: OS keyring (Windows Credential Manager / macOS Keychain / libsecret)
python -c "import keyring,getpass; keyring.set_password('msw-api-key-readonly','<your-msw-login>',getpass.getpass('key: '))"Verify the credential and auth chain end to end (also confirms the effective NSM role, so you know the key really is read-only):
python nsm_auth.pyRun the server:
export MCP_INBOUND_API_KEY="<generate a long random string>"
python server.py # serves streamable HTTP MCP on :8080, GET /health for livenessAttach it to Claude Code:
claude mcp add sonicwall-nsm --transport http http://localhost:8080/mcp \
--header "X-API-Key: <your MCP_INBOUND_API_KEY>"Any other MCP client works the same way: streamable HTTP transport, X-API-Key
header.
Configuration (environment variables)
Variable | Default | Purpose |
| (keyring fallback) | MySonicWall API key (read-only account) |
| (unset = all requests rejected) | Inbound auth: clients must send this in |
| (auto-discovered) | Tenant productGroupID on MySonicWall |
| (auto-discovered) | tenantSerial of the NSM service |
| (unset) | Tenant name substring, used to pick a tenant when your account sees several |
|
| NSM region host |
|
| Listen port |
|
| Background fleet sweep (powers |
|
| Sweep cycle interval |
|
| Politeness delay between per-device sweep calls |
|
| CIDRs treated as "factory default" by the LAN audit |
|
| CIDRs treated as your addressing standard (containment match) |
| (unset) |
|
Tenant discovery: with MSW_TENANT_ID/NSM_TENANT_SERIAL unset, the server
discovers them from the MySonicWall get-cloud-tenants API at first use. If
your account sees exactly one tenant, nothing more is needed; otherwise set
MSW_TENANT_NAME (or the explicit IDs, which python nsm_auth.py prints via
discover_tenant_ids).
Docker
docker build -t sonicwall-nsm-mcp .
docker run -p 8080:8080 \
-e MSW_API_KEY_READONLY="..." \
-e MCP_INBOUND_API_KEY="..." \
sonicwall-nsm-mcpThe container logs one structured JSON line per tool call to stdout.
Security model
Read-only, twice over.
NsmSessionraises on any non-GET/HEAD/OPTIONS method before any I/O; and if you provision the recommended ReadOnly MySonicWall account, NSM itself will refuse writes regardless of what any code asks for. Verify the effective role withpython nsm_auth.py.Inbound auth is fail-closed. With
MCP_INBOUND_API_KEYunset, every request except/healthis rejected. The key is compared constant-time.Secret projection. Live status reads use allow-lists (registration and authentication codes are never projected); config diffs emit changed key names only; SNMP community strings, PSKs, password hashes and RADIUS/LDAP secrets are never read out of any payload.
Personal data is labelled. SSL-VPN session lists and per-user traffic tables carry an explicit
contains_personal_data/privacy_noteflag so your agent layer can gate them.
Operational notes
The background sweep makes one GET per online device per cycle (default every 30 min) for the three fleet-search tools. Disable with
SWEEP_ENABLED=0if you don't need them; those tools then reportdata_status: "unavailable"honestly.NSM bearer tokens have a 15-minute inactivity timeout; the session re-runs the auth chain automatically.
Several NSM endpoints answer HTTP 200 with an error body; the server detects that and reports "unavailable" rather than presenting an answer-shaped non-answer. Many hard-won API behaviors (boolean
limitgates, CSV-in-JSON payloads, integer-encoded IPs, misspelled vendor fields) are documented in comments where they are handled.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
A read-only verified record of agent-operable GTM tools: search, fetch, compare, track changes.
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceProvides real-time access to Firewalla firewall data through 28 specialized tools for network monitoring, security analysis, bandwidth tracking, and firewall rule management. Enables users to query security alerts, analyze network flows, monitor device status, and manage firewall configurations through natural language.761
- AlicenseCqualityAmaintenanceA comprehensive read-only MCP server for Datadog, providing 117 tools to query logs, APM, metrics, monitors, dashboards, SLOs, and more, with zero write capabilities for safe AI integration.1001,1062MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server for Cisco Firepower Management Center (FMC) 7.4.x, allowing LLMs to query firewall configuration, search network objects, and check deployment status through natural language.Apache 2.0
- AlicenseNot gradedqualityAmaintenanceManage a fleet of OPNsense firewalls from an AI agent, inside guardrails it can't drive around. MCP server for central management of OPNsense firewall fleets. 129 tools across devices, config sync, tasks, schedules, templates, backups and remote consoles - destructive actions confirmation-gated, MCP-issued tokens lifetime-bounded, backup and storage secrets excluded from the toolset entirely.Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/GTalksTech/sonicwall-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server