Best for
- Administrators managing their own OPNsense firewall through MCP.
- Operators automating firewall, NAT, or network diagnostic tasks.
The README describes broad OPNsense management and states that the server can make immediate changes by default, with read-only and dry-run safety modes available. It requires firewall API credentials, with SSH needed for some features, and provides a Claude Desktop configuration example.
Strongest · Setup experience 12/20 Weakest · Security and permissions 5/20
Static review · not runReviewed 2026-11-30
Read the FMRS scoring method →Runtime:Node.js 18+ · Bun 1.1.39+
OPNSENSE_HOST
URL of the OPNsense management endpoint; get it from your OPNsense host address and port.
OPNSENSE_API_KEY
Required OPNsense API key; obtain it after enabling API access in OPNsense.
OPNSENSE_API_SECRET
Required secret paired with the OPNsense API key; obtain it after enabling API access in OPNsense.
OPNSENSE_SSH_PASSWORD
Password for SSH login to OPNsense.
OPNSENSE_VERIFY_SSL
Controls TLS certificate verification; set according to the certificate configuration of the OPNsense endpoint.
OPNSENSE_SSH_HOST
OPNsense hostname or address for SSH features.
OPNSENSE_SSH_USERNAME
Username for SSH login to OPNsense.
OPNSENSE_SSH_KEY_PATH
Path to the SSH private key file; omit if using an SSH password.
OPNSENSE_READ_ONLY
Set to true to reject changes and hide write-capable tools; useful for initial setup or production.
OPNSENSE_DRY_RUN
Set to true to simulate changes without sending requests to the router.
Requires Node.js 18+, an OPNsense firewall, and API credentials; SSH is optional for advanced features. Install the npm package with npm install -g opnsense-mcp-server. Add the README's JSON configuration to Claude Desktop and provide the OPNsense host, API key, and secret. Before connecting to a live device, the README recommends setting OPNSENSE_READ_ONLY=true; OPNSENSE_DRY_RUN=true can simulate write operations.
{
"mcpServers": {
"opnsense": {
"command": "npx",
"args": [
"opnsense-mcp-server"
],
"env": {
"OPNSENSE_HOST": "https://your-opnsense-host:port",
"OPNSENSE_API_KEY": "your-api-key",
"OPNSENSE_API_SECRET": "your-api-secret",
"OPNSENSE_VERIFY_SSL": "false"
}
}
}
}
Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.
{
"servers": {
"opnsense": {
"command": "npx",
"args": [
"opnsense-mcp-server"
],
"env": {
"OPNSENSE_HOST": "https://your-opnsense-host:port",
"OPNSENSE_API_KEY": "your-api-key",
"OPNSENSE_API_SECRET": "your-api-secret",
"OPNSENSE_VERIFY_SSL": "false"
}
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
[mcp_servers.opnsense] command = "npx" args = ["opnsense-mcp-server"] [mcp_servers.opnsense.env] OPNSENSE_HOST = "https://your-opnsense-host:port" OPNSENSE_API_KEY = "your-api-key" OPNSENSE_API_SECRET = "your-api-secret" OPNSENSE_VERIFY_SSL = "false"
Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).
claude mcp add opnsense -e OPNSENSE_HOST=https://your-opnsense-host:port -e OPNSENSE_API_KEY=your-api-key -e OPNSENSE_API_SECRET=your-api-secret -e OPNSENSE_VERIFY_SSL=false -- npx opnsense-mcp-server
Run it in a terminal; replace any <…> placeholders with your own values first.
Confirm `firewall_list_rules` and `routing_diagnostics` appear in the client's MCP tool list. Call `firewall_list_rules` and check that it returns firewall rules to verify the connection.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
OPNsense MCP Server is an MCP server for managing OPNsense firewalls. It lets AI assistants manage firewall rules and NAT, diagnose network issues, and perform system operations. The README lists 50+ tools covering firewall, routing, VLAN, DHCP, DNS blocklists, HAProxy, backups, and SSH/CLI.
Manage UniFi Network controllers through MCP.
Manage UniFi networks and devices through MCP.
Ask your affiliate networks in plain English from your AI workspace.
Run 119 Horosa astrology and metaphysics techniques locally.
Source revision c2313b49076a Data synced 2026-12-05 Read the FMRS scoring method Markdown