Opnsense MCP Server
Firewall rules, NAT configuration, and network diagnostics for OPNsense via AI assistants.
Data last scanned 2 days ago · Reviewed 2 days ago
Overview
This server provides a bridge for AI agents to interact directly with OPNsense firewalls. It supports comprehensive CRUD operations for firewall rules, NAT management, and inter-VLAN routing configuration. Users can perform network diagnostics, inspect ARP tables, and manage interface settings through their AI interface of choice. Beyond basic firewall tasks, the tool enables direct SSH execution for system-level operations and configuration file manipulation. It also includes support for DHCP leases, DNS blocklists, and HAProxy load balancer configuration, alongside features for backing up and restoring system configurations.
Our verdict
With a security score of 37/100, this server is currently high-risk and should be deployed with caution in production network environments. The project is community-maintained rather than vendor-backed, and several critical areas—including authentication methods and read-only mode verification—have not yet undergone editorial review. It is best suited for experimental home lab use by experienced administrators who can monitor its interactions with sensitive network infrastructure.
- Comprehensive coverage of OPNsense firewall and NAT configuration tasks
- Provides direct system-level access via integrated SSH command execution
- Lightweight codebase with only 18 direct dependencies
- Active development cycle with commits within the last month
- High security risk rating requiring careful deployment evaluation
- Lack of official vendor maintenance or security auditing
- Critical security aspects like authentication and read-only modes are unreviewed
Setup
{
"mcpServers": {
"opnsensemcp": {
"args": [
"-y",
"opnsense-mcp-server"
],
"command": "npx"
}
}
}Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.
- No read-only mode — running this grants full read/write access.
- No built-in authentication — anyone with access to this config can invoke every tool it exposes.
Tools
| Tool | Description | Risk |
|---|---|---|
| firewall_list_rules | List all firewall rules | low |
| firewall_create_rule | Create a new rule | medium |
| firewall_update_rule | Update existing rule | medium |
| firewall_delete_rule | Delete a rule | high |
| firewall_apply_changes | Apply pending changes | medium |
| nat_list_outbound | List all outbound NAT rules | low |
| nat_set_mode | Set NAT mode | medium |
| nat_create_outbound_rule | Create NAT rule | medium |
| nat_fix_dmz | Fix DMZ NAT issues | medium |
| nat_analyze_config | Analyze NAT configuration | low |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| ChatGPT | ||||
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf |
Frequently asked questions
›What are the software requirements to run this server?
You need Node.js 18+ or Bun 1.0+ installed on your system.
›Which version of OPNsense is recommended?
The server is recommended for use with OPNsense version 24.7 or later.
›Is SSH access mandatory for using this server?
SSH access is optional but required if you want to use the server's advanced features, such as direct CLI execution and system-level operations.
›What information is needed in the environment configuration?
You must provide your OPNsense host URL, API key, and API secret. You may also configure SSH credentials, including username, password, or an SSH key path, for advanced features.
›Can this server run in both development and production environments?
Yes, if using Bun, you can use 'bun run dev:bun' for development with hot reload or 'bun run start:bun' for production environments.
Alternatives
Changelog
- Fixv0.11.0
2026-04-08
- Breakingv0.9.2 - Zod v4 & Drizzle ORM Upgrade
2025-12-07
- Securityv0.9.1 - Bun Support & Security Fixes
2025-12-07
- Security
- Security
- Securityv0.7.5 - Firewall Rule Persistence Fix
2025-08-20
- Fixv0.7.3 - NPX Compatibility Fix
2025-08-07
- Improvedv0.7.2
2025-08-07
- Newv0.7.1
2025-08-07
Badge
Maintain this server? Add the live badge to your README.