Feedback

Opnsense Mcp

@coreyhines Claim

Basic information

Runtime
Python
Category
License
MIT
Transports
stdio
Author
coreyhines
Submitted by
Community
Quality
25
Stars
11

About Opnsense Mcp Server

The OPNsense MCP Server provides comprehensive network management capabilities through the Model Context Protocol (MCP), enabling natural language interaction with your OPNsense firewall. Manage devices, monitor traffic, configure firewall rules, and troubleshoot network issues u

Opnsense Mcp is a MCP server in the Other category listed in the AddMCP.net directory, published by coreyhines. Supported transport: stdio. Runtime: Python. License: MIT. The repository has 11 GitHub stars. Source code is hosted on github.com. Related topics: ai-assistant, network-management, opnsense.

Setup

{
    "mcpServers": {
        "opnsense-mcp": {
            "name": "OPNsense MCP",
            "version": "1.0.0",
            "command": "/bin/bash",
            "args": [
                "/path/to//opnsense-mcp/mcp_start.sh"
            ],
            "cwd": "/path/to//opnsense-mcp",
            "env": {
                "PYTHONUNBUFFERED": "1",
                "PYTHONIOENCODING": "utf-8",
                "DEBUG": "1"
            },
            "transport": {
                "type": "stdio",
                "encoding": "utf-8"
            }
        }
    }
}

Opnsense Mcp config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "opnsense-mcp": {
            "name": "OPNsense MCP",
            "version": "1.0.0",
            "command": "/bin/bash",
            "args": [
                "/path/to//opnsense-mcp/mcp_start.sh"
            ],
            "cwd": "/path/to//opnsense-mcp",
            "env": {
                "PYTHONUNBUFFERED": "1",
                "PYTHONIOENCODING": "utf-8",
                "DEBUG": "1"
            },
            "transport": {
                "type": "stdio",
                "encoding": "utf-8"
            }
        }
    }
}

Opnsense Mcp tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Opnsense Mcp?

The OPNsense MCP Server provides comprehensive network management capabilities through the Model Context Protocol (MCP), enabling natural language interaction with your OPNsense firewall. It is designed for managing devices, monitoring traffic, configuring firewall rules, and troubleshooting network issues using AI chat interfaces.

How to use Opnsense Mcp?

Install dependencies (uv, virtual environment, requirements.txt), copy and configure the example environment file (~/.opnsense-env) with your API key, secret, firewall host, and JWT secret key, then start the server with uv run python main.py. Integrate with tools like Cursor IDE, LM Studio, or Continue by adding a JSON-RPC over stdio MCP server configuration pointing to the provided mcp_start.sh script.

Key features of Opnsense Mcp

  • Network discovery via ARP, DHCP, and LLDP tables
  • System monitoring for CPU, memory, disk, and health
  • Firewall rule creation, inspection, and deletion
  • Live packet capture and traffic analysis
  • JWT-based authentication and environment-based secrets

Use cases of Opnsense Mcp

  • Find and identify all devices on the network
  • Perform security analysis for suspicious traffic
  • Troubleshoot why a device cannot connect to a service
  • Create or block firewall rules with natural language

Frequently asked questions

1 What authentication method does the server use?

The server uses JWT-based authentication for internal operations and stores all credentials in the ~/.opnsense-env environment file. No secrets are hardcoded.

2 What runtime and dependencies are required?

The server requires Python, uv (fast package installer), and the packages listed in requirements.txt. It communicates via JSON-RPC over stdio, not HTTP endpoints.

3 How do I resolve authentication failures?

Verify your ~/.opnsense-env file contains the correct API key, API secret, firewall host, and MCP secret key. Ensure the file is properly sourced before starting the server.

4 Where can I find detailed API documentation?

Refer to the [Function Reference](docs/REFERENCE/FUNCTION_REFERENCE.md) for a complete list of all supported functions and parameters.

5 What are common troubleshooting steps for import or port conflicts?

Ensure all dependencies are installed with uv pip install -r requirements.txt. For port conflicts, change the port in your configuration or launch arguments.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬