~/alokemajumder.com▌

❯ git clone https://github.com/gensecaihq/pfsense-mcp-server.git ▌

pfSense MCP Server: Manage your pfSense firewall in plain English from Claude or any MCP client

View on GitHub118 stars24 forksPython · MIT licence · by Aloke Majumder

pfSense MCP Server is a Model Context Protocol server for pfSense firewall management. Instead of clicking through web UI tabs and remembering field names, you describe what you want in plain English, and the AI handles the pfSense REST API calls.

It is built for safety first: destructive operations need explicit confirmation, the configuration revision is captured before every high-risk change so it can be restored, and rate limits stop a runaway AI loop from flooding your firewall.

What pfSense MCP Server Does

Firewall, VPN, DNS, DHCP and more

Control firewall rules, VPNs, DNS, DHCP and diagnostics through hundreds of tools covering the pfSense REST API.

Confirmation on destructive changes

Every destructive operation requires explicit confirmation and shows exactly what will happen.

Backup and rollback

The config revision is captured before every high-risk change, with the revision ID returned so you can restore it.

Rate limits and validation

Rate limits on every configuration-changing tool, strict IP/port/MAC/CIDR validation, and secrets redacted from logs and errors.

Wire-format verified

A contract-test layer verifies tools against the pfSense REST API schema, so each call sends exactly what the API expects.

Claude Desktop, Claude Code and more

Works with Claude Desktop, Claude Code or any MCP client.

Quick Start

uvx --from git+https://github.com/gensecaihq/pfsense-mcp-server pfsense-mcp-server

Requires Python 3.11+ and the pfSense REST API v2 package. The project is not published on PyPI; an unrelated package uses the same name there, so install from Git or the release assets.

Full setup and configuration are in the README on GitHub.

Who It's For

  • Network and security engineers running pfSense
  • MSPs managing many pfSense firewalls
  • Home-lab and SMB admins who want safer, faster firewall changes
  • Teams exploring AI-assisted network operations

pfSense MCP Server: FAQs

❯

What is the pfSense MCP Server?

An open-source Model Context Protocol server that lets Claude or any MCP client manage a pfSense firewall in plain English, covering firewall rules, VPNs, DNS, DHCP and diagnostics through the pfSense REST API.

❯

Is it safe to let an AI change my firewall?

The server is designed around guardrails: destructive operations require explicit confirmation, the config revision is captured before high-risk changes so you can roll back, configuration tools are rate-limited, and all input is validated.

❯

What do I need to run it?

Python 3.11 or later and pfSense with the REST API v2 package installed. You can run it with uvx straight from Git or clone the repository.

❯

Can I install it with pip?

No. The project is not published on PyPI, and a different, unrelated project uses the name pfsense-mcp-server there. Install from Git or the GitHub release assets.

❯

Is the pfSense MCP Server free?

Yes, it is open source under the MIT licence.

Need help putting it into production?

I built and maintain pfSense MCP Server. If you want help deploying it, building an AI-assisted SOC around it, or training your team, see AI & security consulting and hands-on training, or get in touch.

// related projects

❯ all open-source projects →
❯