opnsense-mcp
Provides tools to manage firewall rules, view network interfaces, manage DHCP leases, and monitor system status on an OPNsense firewall.
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., "@opnsense-mcpShow me the active DHCP leases"
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.
OPNsense MCP Server
A Model Context Protocol (MCP) server for interacting with OPNsense firewalls. This server provides tools to manage firewall rules, view network interfaces, manage DHCP leases, and monitor system status.
Features
This MCP server exposes the following tools:
Firewall
list_firewall_rules: List firewall filter rules.add_firewall_rule: Add a new firewall rule (pass/block/reject, tcp/udp/any).toggle_firewall_rule: Enable or disable a firewall rule by UUID.delete_firewall_rule: Delete a firewall rule by UUID.
Interfaces
list_interfaces: List network interfaces with status and statistics.get_arp_table: Get the ARP table (IP-to-MAC mappings).
DHCP
list_dhcp_leases: List active and static DHCP leases.
System
get_system_info: Get system information (hostname, uptime, CPU, memory usage).get_firmware_status: Check for available firmware and package updates.get_system_log: Fetch recent system log entries.reboot_system: Reboot the OPNsense firewall.
Related MCP server: coreyhines/opnsense-mcp
Configuration
The server requires the following environment variables to authenticate with your OPNsense API:
OPNSENSE_HOST: The base URL of your OPNsense firewall (e.g.,https://192.168.1.1).OPNSENSE_API_KEY: Your OPNsense API key.OPNSENSE_API_SECRET: Your OPNsense API secret.OPNSENSE_VERIFY_SSL(optional): Set totrueto verify SSL certificates (defaults tofalsefor self-signed certificates).
Usage
Using with MCP CLI
You can run this server using the MCP CLI:
# Set your environment variables
export OPNSENSE_HOST="https://192.168.1.1"
export OPNSENSE_API_KEY="your-api-key"
export OPNSENSE_API_SECRET="your-api-secret"
# Run the server
mcp run server.pyInstallation from Source
Clone the repository:
git clone https://github.com/yourusername/opnsense-mcp.git
cd opnsense-mcpInstall dependencies:
pip install .Run the server:
opnsense-mcpThis 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
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/aesaganda/opnsense-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server