SuperAPIAI Directory

mcp-pfsense

github.com · AI developer platforms

Manage pfSense firewalls: rules, DHCP leases, DNS overrides, gateway monitoring, ARP table and services, with two-step confirmation for destructive actions.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsAPI

About this tool

mcp-pfsense is an MCP server that lets AI assistants such as Claude, ChatGPT, Copilot, and others operate a pfSense firewall. The prerequisite is that the pfSense instance has the pfrest package installed (which provides the REST API) and has an account with API access permissions (usually admin).

Purpose and capabilities: 20 tools in total, divided into 7 categories, including querying system status and the ARP table, listing LAN interface firewall rules, DHCP leases, creating firewall rules, adding DNS overrides, reserving IP static mappings, viewing gateway health and latency, reading recent firewall logs, and more.

Usage: Set environment variables (such as PFSENSE_PORT, PFSENSE_SCHEME, etc.), configure it in claude_desktop_config.json, then set the variables in the shell or .env; after connecting, you can ask questions in natural language, for example "show all firewall rules on the LAN interface", "add a DNS entry for nas.home.lan pointing to 10.10.10.50", "allow TCP port 8080 on the LAN".

Security mechanisms: Destructive operations such as deleting rules, deleting mappings, restarting services, and applying changes use two-step confirmation; the first call only returns a warning, and it must be called again with confirm=true to execute. Writes are staged by default rather than taking effect immediately; add_* and delete_* only store to the configuration and return applied: false; they need to be activated with apply_changes(subsystem, confirm=true), or apply=true can be passed at write time to take effect in one go. delete_dhcp_static_mapping requires both the interface (parent_id) and mapping_id.

Compatibility: Supports pfSense 2.7.x and 2.8.x; pfrest REST API v2 any v2.x version, but list_dhcp_static_mappings requires v2.7.0 or above. pfrest runs by default on nginx (port 80), which is different from the WebGUI (lighttpd, port 443).

Limitations and notes: If only get_system_status and get_arp_table are available while the rest return 400/404, it means the version is too old (0.1.1 and earlier called endpoints that do not exist in pfrest v2), and you need to upgrade to 0.2.0 or higher. 403 errors are usually because the API user lacks the corresponding permissions, and you need to grant api-v2-* permissions in System → User Manager. If you get ModuleNotFoundError: No module named 'mcp.server.fastmcp', you need to upgrade to 0.2.0 or above (which pins mcp<2), or use uvx --with "mcp<2" mcp-pfsense. If a write returns 200 but is not stored, it may be that pfrest's read_only setting is enabled.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools