Manage OPNsense firewall rules, NAT, routing, interfaces, VLANs, backups, and services through MCP tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We ran the install command below but it didn't respond within our test window β this can mean a slow first-time install rather than a real problem.
npx -y opnsense-mcp-serverNo response to initialize.
This is an experimental automated check and can have false negatives β missing environment variables, a slow cold install, etc. It doesnβt necessarily mean somethingβs wrong. Last checked 8d ago.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by OPNSenseMCP.
firewall_list_rulesList all firewall rules
firewall_create_ruleCreate a new rule
firewall_update_ruleUpdate existing rule
firewall_delete_ruleDelete a rule
firewall_apply_changesApply pending changes
nat_list_outboundList outbound NAT rules
vespo92/OPNSenseMCP MCP server gives an MCP-compatible assistant tools for administering an OPNsense firewall. Its listed operations cover firewall rules, outbound NAT, network inspection, routing troubleshooting, VLAN creation, configuration backups, service restarts, and direct command execution.
Firewall tools support listing, creating, updating, deleting, and applying changes to rules. NAT tools can inspect outbound rules, change the NAT mode, create rules, analyze the configuration, and address documented DMZ NAT issues. Network-oriented tools expose ARP entries and interfaces, diagnose routing, attempt routing fixes, and create VLANs.
The server also includes system_execute_command, which can run a CLI command on OPNsense, and backup_create for configuration backups. These capabilities mean the connected assistant can both inspect state and make administrative changes, so access should be limited to an appropriately privileged OPNsense account.
The primary connection uses the OPNsense API. The server reads the firewall address, API key, API secret, and SSL verification setting from environment variables. SSH is an optional second connection method. The README identifies SSH as necessary for NAT management and for advanced features that depend on shell or configuration-file access.
MCP clients invoke individual tools with structured arguments. For example, a client can request a firewall rule listing, pass network details to routing diagnostics, or provide source, destination, protocol, and port values when creating a rule. Changes that remain pending can be applied through the dedicated firewall tool.
The project supports Node.js 18 or newer and Bun 1.0 or newer. The published npm package is opnsense-mcp-server; the README shows installation with npm install -g opnsense-mcp-server, followed by the opnsense-mcp-server executable. The repository can also be cloned and run with Bun or built from source with npm.
Set these required variables before starting the server:
OPNSENSE_HOST: OPNsense URL and port.OPNSENSE_API_KEY: OPNsense API key.OPNSENSE_API_SECRET: OPNsense API secret.OPNSENSE_VERIFY_SSL: Whether SSL certificate verification is enabled.For SSH-dependent functions, configure the SSH host, username, and either a password or key path. SSH must be enabled on OPNsense, and the account needs sufficient privileges. The README recommends OPNsense 24.7 or later.
Claude Desktop can launch the npm package through an MCP server entry and pass the OPNsense variables in its env object. The documentation also shows a Bun-based Claude Desktop configuration, but its paths are examples that must be replaced for a local checkout.
The listed MCP tools include:
firewall_list_rules, firewall_create_rule, firewall_update_rule, firewall_delete_rule, and firewall_apply_changesnat_list_outbound, nat_set_mode, nat_create_outbound_rule, nat_fix_dmz, and nat_analyze_configarp_list, routing_diagnostics, routing_fix_all, interface_list, and vlan_createsystem_execute_command, backup_create, and service_restartAPI authentication failures can result from incorrect credentials, disabled API access, or firewall rules that block access. NAT functionality requires SSH configuration. CLI execution and automatic fixes should be tested against the target firewallβs permissions and operational requirements before being used in an unattended workflow. The repository is licensed under MIT.
Always refer to the official documentation for the most accurate and up-to-date information.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/vespo92-opnsensemcp)<a href="https://allmcps.com/mcp/vespo92-opnsensemcp"><img src="https://allmcps.com/api/badge/vespo92-opnsensemcp?style=directory" alt="OPNSenseMCP on AllMCPs" /></a>