OPNsense Guard
v0.1.1Safety-first OPNsense firewall MCP: read-only by default, planned and auto-reverting writes.
Values you need
| Variable | What it is | |
|---|---|---|
OPNSENSE_URL | required | Firewall base URL, e.g. https://firewall.example.internal |
OPNSENSE_API_KEY | required secret | API key of a least-privilege read user |
OPNSENSE_API_SECRET | required secret | API secret of the read user |
OPNSENSE_CA_BUNDLE | optional | CA file for a self-signed firewall certificate |
PyPI (uvx) discovery passed
Requires uv (https://docs.astral.sh/uv/)
Run in a terminal
claude mcp add opnsense-guard-mcp -e 'OPNSENSE_API_KEY=<OPNSENSE_API_KEY>' -e 'OPNSENSE_API_SECRET=<OPNSENSE_API_SECRET>' -e 'OPNSENSE_URL=<OPNSENSE_URL>' -- uvx opnsense-guard-mcp==0.1.1Add to
claude_desktop_config.json{
"mcpServers": {
"opnsense-guard-mcp": {
"args": [
"opnsense-guard-mcp==0.1.1"
],
"command": "uvx",
"env": {
"OPNSENSE_API_KEY": "<OPNSENSE_API_KEY>",
"OPNSENSE_API_SECRET": "<OPNSENSE_API_SECRET>",
"OPNSENSE_URL": "<OPNSENSE_URL>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"opnsense-guard-mcp": {
"args": [
"opnsense-guard-mcp==0.1.1"
],
"command": "uvx",
"env": {
"OPNSENSE_API_KEY": "<OPNSENSE_API_KEY>",
"OPNSENSE_API_SECRET": "<OPNSENSE_API_SECRET>",
"OPNSENSE_URL": "<OPNSENSE_URL>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "OPNSENSE_API_KEY",
"id": "opnsense-api-key",
"password": true,
"type": "promptString"
},
{
"description": "OPNSENSE_API_SECRET",
"id": "opnsense-api-secret",
"password": true,
"type": "promptString"
},
{
"description": "OPNSENSE_URL",
"id": "opnsense-url",
"password": true,
"type": "promptString"
}
],
"servers": {
"opnsense-guard-mcp": {
"args": [
"opnsense-guard-mcp==0.1.1"
],
"command": "uvx",
"env": {
"OPNSENSE_API_KEY": "${input:opnsense-api-key}",
"OPNSENSE_API_SECRET": "${input:opnsense-api-secret}",
"OPNSENSE_URL": "${input:opnsense-url}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.opnsense-guard-mcp]
command = "uvx"
args = ["opnsense-guard-mcp==0.1.1"]
env = { "OPNSENSE_API_KEY" = "<OPNSENSE_API_KEY>", "OPNSENSE_API_SECRET" = "<OPNSENSE_API_SECRET>", "OPNSENSE_URL" = "<OPNSENSE_URL>" }For AI agents
- Ask the user for: OPNSENSE_URL, OPNSENSE_API_KEY, OPNSENSE_API_SECRET. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: system_status, system_information, system_resources, service_list, posture_check, suricata_status, suricata_settings, suricata_alert_status, ….
- If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.
Machine-readable: install.md · manifest.json