Pfsense MCP Server

Managing a pfSense firewall means clicking through web UI tabs, remembering field names, and hoping you don't fat-finger a rule that locks you out.

Local serverstdioPython

What is the Pfsense MCP server?

Connect Pfsense to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Managing a pfSense firewall means clicking through web UI tabs, remembering field names, and hoping you don't fat-finger a rule that locks you out. With this MCP server, you describe what you want in plain English and the AI handles the. The pfsense mcp server is what makes that connection.

What the server does

  • Every destructive operation requires explicit confirmation and shows you exactly what will happen
  • Automatic config backup before every delete/reboot — with a one-line rollback command
  • Rate limiting prevents runaway AI loops from flooding your firewall with rules
  • Input sanitization blocks command injection, path traversal, and XSS in every parameter

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • tvlc — WebGUI port type-mismatch report (#7)
  • Domain — Tools
  • Aliases — 5
  • NAT — 16
  • VPN — 51
  • Routing — 16
  • DNS — 24
  • DHCP — 17
  • Certificates — 15
  • Users — 12
  • Interfaces — 14
  • System — 44

Credentials and setup notes

Configuration is passed through the environment: PFSENSE_URL, AUTH_METHOD, PFSENSE_USERNAME, PFSENSE_PASSWORD, PFSENSE_VERSION, VERIFY_SSL, PFSENSE_API_KEY, MCP_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Where it fits

This sits in the monitoring and observability group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Pfsense's toolset — tvlc, Domain, Aliases and 11 more — is a fair guide to whether it matches your workflow. It is maintained by gensecaihq; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Pfsense's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Pfsense.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
tvlcWebGUI port type-mismatch report (#7)
DomainTools
Aliases5
NAT16
VPN51
Routing16
DNS24
DHCP17
Certificates15
Users12
Interfaces14
System44
Services14
Logs3

How to install the Pfsense MCP server

{
  "mcpServers": {
    "pfsense": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/gensecaihq/pfsense-mcp-server", "pfsense-mcp-server"],
      "env": {
        "PFSENSE_URL": "https://192.168.1.1",
        "AUTH_METHOD": "basic",
        "PFSENSE_USERNAME": "admin",
        "PFSENSE_PASSWORD": "your-password",
        "PFSENSE_VERSION": "CE_2_8_0",
        "VERIFY_SSL": "false"
      }
    }
  }
}

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

Configuration

VariableDescriptionRequired
PFSENSE_URLEndpoint or connection string the server talks to.Yes
AUTH_METHODConfiguration value read at startup.Optional
PFSENSE_USERNAMEConfiguration value read at startup.Optional
PFSENSE_PASSWORDConfiguration value read at startup.Optional
PFSENSE_VERSIONConfiguration value read at startup.Optional
VERIFY_SSLConfiguration value read at startup.Optional
PFSENSE_API_KEYCredential the server authenticates with.Yes
MCP_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Pfsense to tvlc.
  • Use Pfsense to Domain.
  • Use Pfsense to Aliases.

Frequently asked questions

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