loading…
Search for a command to run...
loading…
OPNsense firewall operations via API & mcp. Query ARP, DHCP, firewall rules, logs, interfaces, system status, and packet capture via STDIO or SSE.
OPNsense firewall operations via API & mcp. Query ARP, DHCP, firewall rules, logs, interfaces, system status, and packet capture via STDIO or SSE.
opnsense-mcp MCP server opnsense-mcp MCP server
MCP server for OPNsense firewall operations (ARP, DHCP, logs, rules, interfaces, system status, packet capture).
Use one of two deployment modes:
STDIO (local): best for Cursor/Claude Code/Continue running the server process directly.SSE (centralized): best for shared, long-lived service over HTTPS.Query your firewall with Claude Code CLI. Live example with real network data:

Built this because SSH'ing into the firewall to check logs or grab ARP data got old fast. Now you can ask Claude:
Claude handles the firewall query via MCP and gives you analysis + context in one shot. Works on homelab or business deployments equally well.
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
cp examples/.env.example ~/.env
Edit ~/.env:
OPNSENSE_API_KEY=your_api_key
OPNSENSE_API_SECRET=your_api_secret
OPNSENSE_FIREWALL_HOST=your.firewall.host
MCP_SECRET_KEY=replace_me
STDIO (local IDE/client)Configure your MCP client to launch mcp_start.sh:
{
"mcpServers": {
"opnsense-mcp": {
"command": "/bin/bash",
"args": ["/absolute/path/to/opnsense-mcp/mcp_start.sh"],
"cwd": "/absolute/path/to/opnsense-mcp"
}
}
}
See full guide: docs/GETTING_STARTED.md.
SSE (centralized service)Run the Linux installer (Podman + quadlet + Caddy TLS):
sudo bash deploy/install.sh
Clients connect to:
https://<your-hostname>/sse
See deployment docs:
Primary tools:
arp, dhcp, lldpsystem, get_logs, packet_capturefw_rules, mkfw_rule, rmfw_rule, ssh_fw_ruleinterface_listFull reference: docs/REFERENCE/FUNCTION_REFERENCE.md
First 10 users get feedback incorporated into the tool. If you find bugs or have ideas, file an issue or discussion.
This project is released under the MIT License.
Выполни в терминале:
claude mcp add coreyhines-opnsense-mcp -- npx