Opnsense MCP Server

Modular MCP server for OPNsense firewall management - 88 tools providing access to 2000+ methods

Local serverstdioTypeScript

What is the Opnsense MCP server?

Opnsense becomes available to MCP clients through the opnsense mcp server. Modular MCP server for OPNsense firewall management - 88 tools providing access to 2000+ methods.

What Opnsense does

A modular Model Context Protocol (MCP) server that provides 88 module-based tools giving access to over 2000 OPNsense firewall management methods through a type-safe TypeScript interface.

Key capabilities

  • Modular Architecture — - 88 logical tools (one per module) instead of 2000+ individual tools
  • Complete API Coverage — - Access to 752 core methods and 1271 plugin methods
  • Type-Safe — - Full TypeScript support with @richard-stovall/opnsense-typescript-client v0.5.3
  • Plugin Support — - Optional support for 64 plugin modules
  • Smart Organization — - Related operations grouped by module for easier discovery

Tools it exposes

Once connected, the assistant can call these 14 tools directly:

  • Built — in error handling and retries
  • core_manage — Core system functions
  • firewall_manage — Firewall rules & aliases
  • interfaces_manage — Network interfaces
  • diagnostics_manage — System diagnostics
  • auth_manage — Authentication
  • firmware_manage — Firmware updates
  • openvpn_manage — OpenVPN
  • ipsec_manage — IPsec VPN
  • wireguard_manage — WireGuard VPN
  • unbound_manage — DNS resolver
  • dhcpv4_manage — DHCP server
  • plugin_nginx_manage — Nginx web server
  • plugin_haproxy_manage — HAProxy load balancer

Installing the opnsense mcp server

The server is distributed via npm as @richard-stovall/opnsense-mcp-server, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 5 environment variables: OPNSENSE_URL, OPNSENSE_API_KEY, OPNSENSE_API_SECRET, OPNSENSE_VERIFY_SSL, INCLUDE_PLUGINS. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

  • Node.js 18 or higher - An OPNsense firewall with API access enabled - API key and secret from your OPNsense installation

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Opnsense sits in that group, and the shape of its toolset — Built, core_manage, firewall_manage among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • With 14 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use Opnsense.
  • Maintained by Pixelworlds, written in TypeScript.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the opnsense mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
Builtin error handling and retries
core_manageCore system functions
firewall_manageFirewall rules & aliases
interfaces_manageNetwork interfaces
diagnostics_manageSystem diagnostics
auth_manageAuthentication
firmware_manageFirmware updates
openvpn_manageOpenVPN
ipsec_manageIPsec VPN
wireguard_manageWireGuard VPN
unbound_manageDNS resolver
dhcpv4_manageDHCP server
plugin_nginx_manageNginx web server
plugin_haproxy_manageHAProxy load balancer

How to install the Opnsense MCP server

{
  "mcpServers": {
    "opnsense": {
      "command": "npx",
      "args": ["-y", "@richard-stovall/opnsense-mcp-server"],
      "env": {
        "OPNSENSE_URL": "https://192.168.1.1",
        "OPNSENSE_API_KEY": "your-api-key",
        "OPNSENSE_API_SECRET": "your-api-secret",
        "OPNSENSE_VERIFY_SSL": "false"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 18 or higher - An OPNsense firewall with API access enabled - API key and secret from your OPNsense installation
VariableDescriptionRequired
OPNSENSE_URLEndpoint or connection string the server talks to.Yes
OPNSENSE_API_KEYCredential the server authenticates with.Yes
OPNSENSE_API_SECRETCredential the server authenticates with.Yes
OPNSENSE_VERIFY_SSLConfiguration value read at startup.Optional
INCLUDE_PLUGINSConfiguration value read at startup.Optional

Example prompts to try

  • Use Opnsense to Built.
  • Use Opnsense to core manage.
  • Use Opnsense to firewall manage.

Frequently asked questions

It connects Opnsense to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Built, core_manage, firewall_manage, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Opnsense directly.