# mcp-pfsense

Control pfSense firewalls via AI assistants to inspect logs, edit filter rules, and handle DHCP reservations.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: antonio-mello-ai
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/antonio-mello-ai/mcp-pfsense
- Updated: 2026-09-21
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-pfsense

## What it does

This server connects coding assistants directly to pfSense network appliances through the `pfrest` REST API. It provides 20 tools covering system vitals, gateway latency, ARP entries, firewall rules, and Unbound DNS overrides. Network administrators can inspect incoming traffic logs or update host mappings straight from the conversation.

Destructive changes do not run blindly. Operations that drop rules or restart daemons require an explicit confirmation parameter. Most configuration edits stay staged until committed, matching how the pfSense WebGUI works. Nothing touches the live packet filter without deliberate activation via `apply_changes` or an explicit apply flag.

The integration requires the `pfrest` package on pfSense and Python 3.11 or newer. If the API user lacks `api-v2-*` privileges in User Manager, requests will fail with 403 errors.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-pfsense -- uvx mcp-pfsense
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-pfsense <command>

### Codex

**Platform CLI**
```bash
codex mcp add mcp-pfsense -- uvx mcp-pfsense
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-pfsense <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-pfsense": {
            "command": "uvx",
            "args": [
                "mcp-pfsense"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-pfsense <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-pfsense": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "mcp-pfsense"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-pfsense <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-pfsense uvx mcp-pfsense
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-pfsense <command>

## When to use it
- Inspect gateway latency and system resource metrics
- Add or delete packet filtering rules on a chosen interface
- Reserve a static IP for a specific MAC address in DHCP
- Review active DHCP leases and current ARP table entries
- Restart unresponsive firewall services remotely

## Example prompts
- Show gateway health and packet latency on pfSense
- Create a firewall rule allowing TCP traffic on port 8080 for LAN
- Show the 50 most recent firewall log entries

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23654
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17191
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12110

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
