mcp-opnsense
Provides tools for managing OPNsense firewall including system status, services, DHCP leases, DNS overrides, firewall rules, and NAT port forwards via the OPNsense REST API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-opnsenseshow me the current firewall rules"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-opnsense
MCP server for OPNsense firewall management. Exposes 16 tools for system status, services, DHCP, DNS overrides, firewall rules, and NAT port forwards via the OPNsense REST API.
Quick Start
With uvx (recommended):
OPNSENSE_HOST=https://192.168.1.1 \
OPNSENSE_API_KEY=yourkey \
OPNSENSE_API_SECRET=yoursecret \
uvx mcp-opnsenseWith Docker:
docker run -i \
-e OPNSENSE_HOST=https://10.0.0.1 \
-e OPNSENSE_API_KEY=yourkey \
-e OPNSENSE_API_SECRET=yoursecret \
ghcr.io/aaronckj/mcp-opnsense:latestAdd to Claude Code:
claude mcp add opnsense -s user \
-e OPNSENSE_HOST=https://10.0.0.1 \
-e OPNSENSE_API_KEY=yourkey \
-- uvx mcp-opnsenseThen set OPNSENSE_API_SECRET in your Claude Code MCP settings.
Related MCP server: OPNsense MCP Server
Creating API Credentials
In OPNsense: System → User Manager → Users → edit a user → API keys → Add key. Copy the key and secret (the secret is only shown once).
Configuration
Variable | Required | Default | Description |
| Yes | — | API key from OPNsense user manager |
| Yes | — | API secret from OPNsense user manager |
| No |
| OPNsense host URL |
| No |
| HTTP timeout in seconds |
| No |
| Set to |
Tools
Tool | Description |
| CPU, memory, uptime, firmware version |
| WAN gateway status and packet loss |
| All interfaces with IPs and link state |
| All services and running status |
| Restart a named service |
| Apply pending firewall changes |
| Active and static DHCP leases |
| Add a static DHCP mapping |
| Unbound host overrides |
| Add a host override (auto-reconfigures) |
| Remove a host override by UUID (auto-reconfigures) |
| All firewall filter rules |
| Add a rule (auto-applies) |
| Delete a rule by UUID (auto-applies) |
| NAT port forward rules |
| Add a port forward (auto-applies) |
Development
git clone https://github.com/aaronckj/mcp-opnsense
cd mcp-opnsense
uv sync --extra dev
uv run pytest -vThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aaronckj/mcp-opnsense'
If you have feedback or need assistance with the MCP directory API, please join our Discord server