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
Five PRs landed recently. See docs/FEATURES_UPDATE.md for full details and usage examples.
stdio, sse, and streamable-http (MCP spec 2025-03-26). Deployed via deploy/install.sh.mk_dhcp_host and move_dhcp_host accept an optional DUID for stateful DHCPv6 matching.pyproject.toml version + git short SHA (1.0.0-dev.a1b2c3d) or release tags (1.0.0).:latest is rejected.readonly clash between install.sh and lib.sh resolved.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.
Run in your terminal:
claude mcp add coreyhines-opnsense-mcp -- npx Yes, Coreyhines/Opnsense MCP is free — one-click install via Unyly at no cost.
No, Coreyhines/Opnsense runs without API keys or environment variables.
Self-hosted: the server runs locally on your machine via the install command above.
Open Coreyhines/Opnsense on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
CSA PROJECT - FZCO © 2026 IFZA Business Park, DDP, Premises Number 31174 - 001
Security
Low riskAutomated heuristic from public metadata — not a security guarantee.