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

372 dangerous tools20 tools66TypeScriptMIT

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

Claude Desktop
{
  "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

ToolDescriptionRisk
firewall_list_rulesList all firewall ruleslow
firewall_create_ruleCreate a new rulemedium
firewall_update_ruleUpdate existing rulemedium
firewall_delete_ruleDelete a rulehigh
firewall_apply_changesApply pending changesmedium
nat_list_outboundList all outbound NAT ruleslow
nat_set_modeSet NAT modemedium
nat_create_outbound_ruleCreate NAT rulemedium
nat_fix_dmzFix DMZ NAT issuesmedium
nat_analyze_configAnalyze NAT configurationlow

Compatibility

ClientLocalDockerRemoteRead-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

Badge

Opnsense MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.