Λογότυπο OPNsense MCP Server

OPNsense MCP Server

Κοινότητα
lucamarien

A secure MCP server for managing OPNsense firewalls through AI assistants. 62 tools across 10 domains with read-only default, savepoint rollback, and security auditing.

Εκδότηςlucamarien
Αποθετήριοopnsense-mcp-server
ΓλώσσαPython
Διακλαδώσεις
9
Αστέρια
21
Διαθέσιμα εργαλεία
0
Τύπος μεταφοράςstdio
Κατηγορίες
Άδεια χρήσηςMIT
Σύνδεσμοι
  • Συνδέστε εργαλεία σε ροές εργασίας AI

    Το OPNsense MCP Server παρέχει δυνατότητες MCP που μπορούν να χρησιμοποιηθούν από συμβατές εφαρμογές-πελάτες AI και συμβατούς πράκτορες AI.

  • Διαθέσιμα εργαλεία: 0

    Δείτε παρακάτω τις ενέργειες που μπορεί να καλέσει μια εφαρμογή-πελάτης, μαζί με τα ονόματα και τις περιγραφές τους, εφόσον τα παρέχει ο διακομιστής.

  • Ρυθμίσεις έτοιμες για αντιγραφή

    Χρησιμοποιήστε τα παραδείγματα διαμόρφωσης για να ρυθμίσετε αυτόν τον διακομιστή στην εφαρμογή-πελάτη MCP που προτιμάτε.

  • Δείκτες ενδιαφέροντος της κοινότητας για το έργο ανοιχτού κώδικα

    Στοιχεία του συνδεδεμένου αποθετηρίου: αστέρια (21) και διακλαδώσεις (9).

OPNsense MCP Server

A secure Model Context Protocol (MCP) server for managing OPNsense firewalls through AI assistants like Claude Code, Cursor, and other MCP-compatible tools.

81 tools across 10 domains: system, firewall, network, DNS, DHCP, VPN, HAProxy, services, diagnostics, and security.

Requirements

  • Python 3.11+
  • OPNsense 24.7 or newer — the MCP server relies on the MVC-based API endpoints introduced in OPNsense 24.7. Older versions use a different API structure that is not compatible. The server auto-detects the OPNsense version on first connect and selects the correct endpoint naming (camelCase for pre-25.7, snake_case for 25.7+). OPNsense 26.x is fully supported, including its changed firmware status response format.

Security Model

This MCP server is designed with security as the primary concern:

  • Read-only by default — write operations require explicit opt-in via OPNSENSE_ALLOW_WRITES=true
  • Savepoint/rollback (OPNsense < 26.7 only) — where OPNsense still offers the savepoint API, firewall modifications use its built-in 60-second auto-revert; changes must be explicitly confirmed or they roll back automatically. OPNsense 26.7 removed that API upstream — the server detects the missing endpoint at runtime and applies firewall changes immediately, with no automatic rollback
  • Endpoint blocklist — dangerous endpoints (halt, reboot, poweroff, firmware update/upgrade) are hard-blocked at the API client level and can never be called
  • API-only — no SSH access, no command execution, no direct config file manipulation
  • Local transport — STDIO only, no network-exposed HTTP/SSE endpoints
  • No credential exposure — API keys are never included in tool output, logs, or error messages
  • Input validation — hostname parameters are validated against shell metacharacter injection
  • Sensitive data stripping — config backup strips passwords and keys by default

Quick Start

1. Create an OPNsense API Key

  1. Log in to your OPNsense web interface
  2. Go to System > Access > Users
  3. Either edit an existing user or create a dedicated API user:
    • For production use, create a dedicated user (e.g., mcp-api) with only the privileges needed
    • For read-only access, assign the user to a group with read-only API access
  4. Scroll down to the API keys section and click the + button
  5. A key/secret pair will be generated and a file (apikey.txt) will be downloaded
  6. The file contains two lines — key=your-api-key-here and secret=your-api-secret-here
  7. Store these credentials securely — the secret cannot be retrieved again from OPNsense

Tip: For a read-only setup (recommended for getting started), you don't need to change any permissions — the default API access is sufficient for all read-only tools.

2. Install

bash
# Using pip
pip install opnsense-mcp-server

# Using uv (recommended for isolated environments)
uv pip install opnsense-mcp-server

# Using Docker
docker pull uhlenheide/opnsense-mcp-server

# From source
git clone https://github.com/lucamarien/opnsense-mcp-server
cd opnsense-mcp-server
pip install -e .

Docker image: the official image is uhlenheide/opnsense-mcp-server, published from this repository by .github/workflows/publish-docker.yml on every v* tag. There is no lucamarien/opnsense-mcp-server image — earlier README versions named it by mistake.

3. Configure Your AI Assistant

Claude Code

Add to your project's .mcp.json:

json
{
  "mcpServers": {
    "opnsense": {
      "command": "opnsense-mcp",
      "env": {
        "OPNSENSE_URL": "https://192.168.1.1/api",
        "OPNSENSE_API_KEY": "your-api-key-here",
        "OPNSENSE_API_SECRET": "your-api-secret-here",
        "OPNSENSE_VERIFY_SSL": "false",
        "OPNSENSE_ALLOW_WRITES": "false"
      }
    }
  }
}

Alternative: Use "command": "python", "args": ["-m", "opnsense_mcp"] if the opnsense-mcp CLI is not on your PATH.

Or add it globally to ~/.claude/claude_code_config.json.

Claude Code (Docker)

json
{
  "mcpServers": {
    "opnsense": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "OPNSENSE_URL=https://192.168.1.1/api",
        "-e", "OPNSENSE_API_KEY=your-api-key-here",
        "-e", "OPNSENSE_API_SECRET=your-api-secret-here",
        "-e", "OPNSENSE_VERIFY_SSL=false",
        "-e", "OPNSENSE_ALLOW_WRITES=false",
        "uhlenheide/opnsense-mcp-server"
      ]
    }
  }
}

Cursor

Add to your Cursor MCP settings (Settings > MCP):

json
{
  "mcpServers": {
    "opnsense": {
      "command": "opnsense-mcp",
      "env": {
        "OPNSENSE_URL": "https://192.168.1.1/api",
        "OPNSENSE_API_KEY": "your-api-key-here",
        "OPNSENSE_API_SECRET": "your-api-secret-here",
        "OPNSENSE_VERIFY_SSL": "false"
      }
    }
  }
}

Configuration

Environment VariableDefaultDescription
OPNSENSE_URL(required)OPNsense API base URL (must end with /api)
OPNSENSE_API_KEY(required)API key from OPNsense user settings
OPNSENSE_API_SECRET(required)API secret from OPNsense user settings
OPNSENSE_VERIFY_SSLtrueVerify SSL certificate (false for self-signed certs)
OPNSENSE_ALLOW_WRITESfalseEnable write operations (firewall rules, service control)

Custom ports: If your OPNsense web GUI runs on a non-standard port (e.g., 10443), include it in the URL: https://192.168.1.1:10443/api

Available Tools (81)

System (7 tools)

ToolDescription
opn_system_statusSystem info including firmware version, product name, and architecture
opn_list_servicesList all services and their running status. Params: search, limit
opn_gateway_statusGateway availability, latency, and dpinger health checks
opn_download_configDownload config.xml backup with optional sensitive data stripping. Params: include_sensitive (default: false — passwords and keys are redacted)
opn_scan_configScan the full configuration, parse it into sections, and collect runtime inventory (firmware, plugins, DHCP, DNS, interfaces, services). Results are cached per session. Params: force
opn_get_config_sectionGet a specific config section as structured JSON. Params: section, include_sensitive
opn_mcp_infoMCP server version, write mode status, detected OPNsense version, API style, and whether firewall writes still get savepoint/rollback protection

Network (5 tools)

ToolDescription
opn_interface_statsPer-interface traffic statistics (bytes in/out, packets, errors)
opn_arp_tableARP table showing IP-to-MAC address mappings
opn_ndp_tableNDP (Neighbor Discovery Protocol) table showing IPv6-to-MAC address mappings
opn_ipv6_statusIPv6 configuration and address status for all interfaces (method, live addresses, summary)
opn_list_static_routesConfigured static routes. Params: search, limit

Firewall (21 tools)

ToolDescriptionWrites
opn_list_firewall_rulesList MVC firewall filter rules. Params: search, limitNo
opn_list_firewall_aliasesList alias definitions (IP lists, port groups, GeoIP, URLs). Params: search, limitNo
opn_list_nat_rulesList NAT port forwarding (DNAT) rules. Params: search, limitNo
opn_list_firewall_categoriesList firewall rule categories and their UUIDs. Params: search, limitNo
opn_firewall_logRecent firewall log entries with client-side filtering. Params: source_ip, destination_ip, action, interface, limitNo
opn_confirm_changesConfirm pending changes, cancelling 60-second auto-rollback (OPNsense < 26.7; a no-op returning not_applicable on 26.7+). Params: revisionYes
opn_toggle_firewall_ruleToggle a rule's enabled/disabled state with savepoint (OPNsense < 26.7). Params: uuidYes
opn_add_firewall_ruleCreate a new filter rule with savepoint (OPNsense < 26.7). Params: action, direction, interface, ip_protocol, protocol, source_net, destination_net, destination_port, descriptionYes
opn_delete_firewall_ruleDelete a filter rule by UUID with savepoint (OPNsense < 26.7). Params: uuidYes
opn_add_aliasCreate a new alias. Params: name, alias_type, content, descriptionYes
opn_add_nat_ruleCreate a NAT port forwarding rule with savepoint (OPNsense < 26.7). Params: destination_port, target_ip, interface, protocol, target_port, descriptionYes
opn_add_firewall_categoryCreate a new firewall rule category. Params: name, colorYes
opn_delete_firewall_categoryDelete a firewall rule category by UUID with savepoint (OPNsense < 26.7). Params: uuidYes
opn_set_rule_categoriesAssign categories to a firewall rule with savepoint (OPNsense < 26.7). Params: uuid, categoriesYes
opn_add_icmpv6_rulesCreate essential ICMPv6 rules required for IPv6 operation (NDP, RA, ping6) per RFC 4890. Params: interfaceYes
opn_update_aliasUpdate an existing alias (name, content, type, description). Read-modify-write. Params: uuid, name, content, description, alias_type, enabledYes
opn_delete_aliasDelete an alias by UUID. Check rule references first. Params: uuidYes
opn_toggle_aliasToggle alias enabled/disabled state. Params: uuidYes
opn_update_firewall_ruleUpdate filter rule fields with savepoint (OPNsense < 26.7). Params: uuid, action, direction, interface, ip_protocol, protocol, source_net, source_not, source_port, destination_net, destination_not, destination_port, gateway, log, quick, sequence, categories, description, enabledYes
opn_update_nat_ruleUpdate NAT port forwarding rule with savepoint (OPNsense < 26.7). Params: uuid, interface, protocol, destination_port, target_ip, target_port, description, enabledYes
opn_delete_nat_ruleDelete a NAT port forwarding rule by UUID with savepoint (OPNsense < 26.7). Params: uuidYes

Note: Savepoint protection only exists on OPNsense < 26.7. On 26.7+ these tools apply changes immediately and permanently — see Write Operations and Savepoints.

DNS (13 tools)

ToolDescriptionWrites
opn_list_dns_overridesUnbound host overrides (local DNS records). Params: search, limitNo
opn_list_dns_forwardsDNS forward zones (domain-specific servers). Params: search, limitNo
opn_dns_statsUnbound resolver statistics (queries, cache hits, uptime)No
opn_reconfigure_unboundApply pending DNS resolver configuration changesYes
opn_add_dns_overrideAdd an Unbound DNS host override (A/AAAA record) and apply immediately. Params: hostname, domain, server, descriptionYes
opn_list_dnsblList DNSBL blocklist configurations with providers and status. Params: search, limitNo
opn_get_dnsblGet full DNSBL configuration by UUID (providers, allowlists, settings). Params: uuidNo
opn_set_dnsblUpdate DNSBL settings (read-modify-write). Params: uuid, enabled, providers, allowlists, blocklists, wildcards, etc.Yes
opn_add_dnsbl_allowlistAdd domains to DNSBL allowlist without overwriting. Params: uuid, domainsYes
opn_remove_dnsbl_allowlistRemove domains from DNSBL allowlist. Params: uuid, domainsYes
opn_update_dnsblReload DNSBL blocklist files and restart Unbound (no config change, recovery tool)Yes
opn_update_dns_overrideUpdate an Unbound DNS host override and apply immediately. Params: uuid, hostname, domain, server, description, enabledYes
opn_delete_dns_overrideDelete an Unbound DNS host override and apply immediately. Params: uuidYes

DHCP (8 tools)

ToolDescriptionWrites
opn_list_dhcp_leasesActive DHCPv4 leases from the ISC DHCP serverNo
opn_list_kea_leasesDHCPv4 leases from the Kea DHCP server. Params: search, limitNo
opn_list_dnsmasq_leasesDHCPv4 and DHCPv6 leases from the dnsmasq DNS/DHCP server. Params: search, limitNo
opn_list_dnsmasq_rangesConfigured DHCP address ranges (both DHCPv4 and DHCPv6 with RA config). Params: search, limitNo
opn_add_dnsmasq_rangeCreate a new DHCP range (IPv4 or IPv6 with Router Advertisement configuration). Params: interface, start_addr, end_addr, prefix_len, ra_mode, lease_time, descriptionYes
opn_reconfigure_dnsmasqApply pending dnsmasq DNS/DHCP configuration changesYes
opn_update_dnsmasq_rangeUpdate a DHCP range (addresses, lease time, RA config) and apply. Params: uuid, interface, start_addr, end_addr, prefix_len, ra_mode, lease_time, description, enabledYes
opn_delete_dnsmasq_rangeDelete a DHCP range by UUID and apply. Params: uuidYes

VPN (3 tools)

ToolDescription
opn_wireguard_statusWireGuard tunnel and peer status (requires os-wireguard plugin)
opn_ipsec_statusIPsec VPN tunnel status — IKE (Phase 1) and ESP/AH (Phase 2) sessions
opn_openvpn_statusOpenVPN connection status — instances, sessions, and routes

HAProxy (8 tools)

Full configuration management for the HAProxy load balancer (requires os-haproxy plugin).

ToolDescriptionWrites
opn_haproxy_statusHAProxy service status and backend healthNo
opn_haproxy_searchSearch HAProxy resources by type. Params: resource_type (frontends/backends/servers/actions/acls/healthchecks/errorfiles/resolvers/mailers), search, limitNo
opn_haproxy_getGet detailed configuration for a specific resource. Params: resource_type, uuidNo
opn_haproxy_configtestValidate HAProxy configuration syntax before applyingNo
opn_haproxy_addCreate a new HAProxy resource. Params: resource_type, config (dict of field values)Yes
opn_haproxy_updateUpdate an existing HAProxy resource (partial updates). Params: resource_type, uuid, configYes
opn_haproxy_deleteDelete a HAProxy resource by UUID. Params: resource_type, uuidYes
opn_reconfigure_haproxyApply pending HAProxy configuration changesYes

Note: HAProxy changes do NOT use savepoint protection — they apply immediately on reconfigure. Always call opn_haproxy_configtest before opn_reconfigure_haproxy.

Services (11 tools)

ToolDescriptionWrites
opn_list_acme_certsACME/Let's Encrypt certificates and their status. Params: search, limitNo
opn_list_cron_jobsScheduled cron jobs. Params: search, limitNo
opn_crowdsec_statusCrowdSec security engine status and active decisionsNo
opn_crowdsec_alertsCrowdSec security alerts (detected threats). Params: search, limitNo
opn_list_ddns_accountsDynamic DNS accounts and their update status. Params: search, limitNo
opn_add_ddns_accountCreate a new Dynamic DNS account. Params: service, hostname, username, password, checkip, interface, descriptionYes
opn_reconfigure_ddclientApply pending Dynamic DNS configuration changesYes
opn_update_ddns_accountUpdate a Dynamic DNS account (password is write-only). Params: uuid, service, hostname, username, password, checkip, interface, description, enabledYes
opn_delete_ddns_accountDelete a Dynamic DNS account by UUID. Params: uuidYes
opn_mdns_repeater_statusmDNS Repeater status and configuration (enabled, interfaces, blocklist). Requires os-mdns-repeater pluginNo
opn_configure_mdns_repeaterConfigure mDNS Repeater for cross-VLAN device discovery (HomeKit, Chromecast, AirPlay). Params: enabled, interfacesYes

Diagnostics (4 tools)

ToolDescription
opn_pingPing a host from the firewall to test connectivity. Params: host, count (1-10, default 3)
opn_tracerouteTrace network path to a destination. Params: host, protocol (ICMP/UDP/TCP), ip_version (4/6)
opn_dns_lookupDNS lookup from the firewall. Params: hostname, server (optional custom DNS server)
opn_pf_statesQuery active PF state table. Params: search, limit (max 1000)

Security (1 tool)

ToolDescription
opn_security_auditComprehensive 11-area security audit: firmware, firewall rules (MVC + legacy, port grouping, insecure protocols), NAT forwarding, DNS security (DNSSEC, DoT), system hardening (SSH, HTTPS, syslog), services, certificates (ACME + system + CAs), VPN (WireGuard config, IPsec, OpenVPN), HAProxy (headers, health checks), gateways. Findings tagged with PCI DSS v4.0, BSI IT-Grundschutz, NIST 800-41, CIS compliance references.

Write Operations and Savepoints

Write operations require OPNSENSE_ALLOW_WRITES=true. On OPNsense < 26.7, firewall changes additionally go through OPNsense's savepoint mechanism:

  1. Before any firewall change, a savepoint is created automatically
  2. The change is applied (rule toggle, add, or delete)
  3. A 60-second countdown starts — if not confirmed, OPNsense automatically reverts the change
  4. Use opn_confirm_changes with the returned revision to make changes permanent

On those versions, if an AI assistant makes a bad firewall change that locks you out, the change reverts automatically within 60 seconds.

OPNsense 26.7 removed the savepoint/rollback API upstream, so there is no auto-revert on 26.7+. The server does not hardcode a version cut-off: it probes for the savepoint endpoint on the first firewall write and, if OPNsense answers that the endpoint does not exist, degrades to direct apply for the rest of the session. Check opn_mcp_info — its savepoint_support field reports true, false, or null if no write has probed yet. Write tools then return an empty revision, opn_confirm_changes answers with status: "not_applicable", and every firewall change is immediate and permanent.

Warning: On OPNsense 26.7+ take a config backup (opn_download_config, or System > Configuration > Backups) before enabling writes, and keep out-of-band access to the box — a rule that locks you out will not revert itself.

Note: opn_reconfigure_unbound, opn_reconfigure_haproxy, opn_reconfigure_ddclient, opn_reconfigure_dnsmasq, and opn_configure_mdns_repeater require writes but don't use savepoints — they apply service configuration changes and are not automatically revertible.

IPv6 Support

Fully Automated via MCP

  • IPv6 Firewall Rules — Create rules with ip_protocol="inet6" (savepoint-protected on OPNsense < 26.7)
  • HAProxy IPv6 Bindings — Frontends with [::]:443 or [2001:db8::1]:443 bind addresses
  • HAProxy IPv6 Backends — Servers with IPv6 addresses, resolvePrefer: ipv6 on backends
  • Dynamic DNS with IPv6 — DDNS accounts with IPv6-capable checkip methods
  • DHCPv6 Ranges (dnsmasq) — IPv6 DHCP ranges with Router Advertisement configuration
  • DNS AAAA Records — Unbound host overrides with IPv6 addresses
  • IPv6 Diagnostics — Traceroute with ip_version="6", ping via hostname

Requires Manual GUI Configuration

These settings lack MVC API support in OPNsense and must be configured via the web GUI:

  • WAN IPv6 setup — PPPoE with DHCPv6 prefix delegation, static IPv6, SLAAC
  • LAN IPv6 addressing — Track Interface mode, static /64 assignment, prefix ID
  • Interface assignment — Assigning physical ports to WAN/LAN/OPT roles
  • 6to4/6rd tunnels — Transition tunnel mechanisms

Known Limitations

  • ISC DHCP / Kea DHCPv6: Not implemented. Only dnsmasq (the modern default) is supported for DHCPv6 ranges and Router Advertisements. ISC DHCP is deprecated; Kea DHCPv6 lease visibility is limited in the API.
  • radvd: Not implemented as a separate tool set. Dnsmasq handles Router Advertisements natively via range configuration. Only one RA daemon should run per interface.
  • Dual-stack firewall rules: inet46 (dual-stack) works correctly in MVC API rules (opn_add_firewall_rule). However, inet46 in legacy XML filter rules (GUI) silently produces no PF output — this is a known OPNsense bug that only affects legacy rules.
  • Legacy GUI rules: Firewall rules created via the traditional OPNsense GUI are not accessible through the MVC API. Use opn_get_config_section("filter") for read-only access.

Recommended IPv6 Migration Workflow

  1. Manual (GUI): Configure WAN IPv6 (DHCPv6-PD from ISP or static)
  2. Manual (GUI): Configure LAN interfaces (Track Interface mode for prefix delegation)
  3. MCP: Configure Router Advertisements via opn_add_dnsmasq_range with RA flags
  4. MCP: Create IPv6 firewall rules (ICMPv6 must be allowed for NDP/RA/PMTUD)
  5. MCP: Add IPv6 DNS records via opn_add_dns_override
  6. MCP: Configure Dynamic DNS with IPv6 checkip method
  7. MCP: Add IPv6 bind addresses to HAProxy frontends
  8. MCP: Verify with opn_ping, opn_traceroute (ip_version="6"), opn_gateway_status

Version Compatibility

OPNsense VersionStatus
24.7 (Thriving Tiger)Supported
25.1 (Ultimate Unicorn)Supported
25.7 (Visionary Viper)Supported (auto-detects snake_case API)
26.1+Supported

The server automatically detects the OPNsense version on first connection and selects the correct API endpoint naming convention (camelCase for pre-25.7, snake_case for 25.7+).

Note on firewall rules: opn_list_firewall_rules shows rules managed via the MVC/automation API. Rules configured through the OPNsense GUI use a legacy format not accessible via this API. This is a known OPNsense limitation.

Troubleshooting

Connection Issues

"Connection refused" or timeout errors

  • Verify OPNSENSE_URL ends with /api (e.g., https://192.168.1.1/api)
  • If using a non-standard port, include it: https://192.168.1.1:10443/api
  • Ensure the OPNsense web GUI is accessible from the machine running the MCP server

SSL certificate errors

  • For self-signed certificates (default OPNsense setup), set OPNSENSE_VERIFY_SSL=false
  • For production, install a proper certificate on OPNsense and keep OPNSENSE_VERIFY_SSL=true

Authentication Issues

401 Unauthorized

  • Verify OPNSENSE_API_KEY and OPNSENSE_API_SECRET are correct
  • API keys are case-sensitive — copy them exactly from the downloaded apikey.txt
  • Check that the API user is not disabled in OPNsense
  • Verify the API user has sufficient privileges for the operations you're attempting

403 Forbidden

  • The API user may lack permissions for the requested endpoint
  • For write operations, ensure OPNSENSE_ALLOW_WRITES=true is set

Tool-Specific Issues

opn_list_firewall_rules returns empty results

  • This tool only shows MVC/automation rules, not legacy GUI rules
  • Create rules via the automation API or opn_add_firewall_rule to see them

opn_ping times out

  • The firewall may not have a route to the target host
  • Check gateway status with opn_gateway_status
  • Default timeout is 30 seconds (30 poll cycles)

opn_download_config shows [REDACTED] values

  • This is the default behavior for security. Pass include_sensitive=true to include passwords and keys (use with caution in AI conversations)

Write operations fail with "writes not enabled"

  • Set OPNSENSE_ALLOW_WRITES=true in your MCP server configuration
  • This is intentionally disabled by default for safety

Savepoint confirmation fails

  • The revision parameter must match exactly what was returned by the write operation
  • Confirmations must happen within 60 seconds or the change auto-reverts
  • On OPNsense 26.7+ there is no savepoint API: write tools return an empty revision and opn_confirm_changes returns status: "not_applicable". That is expected, not a failure — the change already applied permanently

Diagnostic Commands

If you need to debug the MCP server:

bash
# Test API connectivity directly
curl -k -u "your-key:your-secret" https://your-opnsense-ip/api/core/firmware/status

# Run the server directly
python -m opnsense_mcp

# Run tests to verify installation
pytest -v

Development

bash
# Clone and install dev dependencies
git clone https://github.com/lucamarien/opnsense-mcp-server
cd opnsense-mcp-server
pip install -e ".[dev]"

# Run all tests (no real OPNsense needed — all tests use mocked API)
pytest -v

# Full CI pipeline (lint, format, type check, security scan, tests)
make validate

# Individual checks
ruff check src/ tests/          # Lint (includes bandit security checks)
ruff format src/ tests/          # Format
mypy src/ --strict               # Type checking

Best Practices

Domain-specific guides for common firewall configuration tasks:

These guides show real-world MCP tool usage patterns and explain the security considerations behind each approach.

Contributing

See CONTRIBUTING.md for detailed guidelines. Key points:

  1. All tests must use mocked API responses — never connect to a real OPNsense
  2. No overlapping tools — each tool must have a distinct purpose
  3. Write clear docstrings — they're the AI's only guide to tool selection
  4. Return structured data (dicts), not formatted strings
  5. Run make validate before submitting

License

MIT

Χρησιμοποιήστε το MCP OPNsense MCP Server με πολλά μοντέλα AI

Το TypingMind συνδέει τα εργαλεία MCP σε επίπεδο χώρου εργασίας. Έτσι, μόλις συνδεθεί το OPNsense MCP Server, μπορείτε να το χρησιμοποιείτε με διαφορετικά μοντέλα AI στο TypingMind, αντί να το ρυθμίζετε ξεχωριστά για κάθε μοντέλο. Αυτή η ενσωμάτωση MCP εκτελείται τοπικά στη συσκευή σας μέσω του συνδέσμου MCP του TypingMind.

Οδηγός ρύθμισης για τη χρήση του τοπικού συνδέσμου

Επιλέξτε αυτή τη μέθοδο όταν ο διακομιστής MCP χρειάζεται πρόσβαση σε τοπικά αρχεία, εφαρμογές ή ιδιωτικούς πόρους στον υπολογιστή σας.

1

Ανοίξτε τις ρυθμίσεις MCP

Στο TypingMind, μεταβείτε στις «Ρυθμίσεις», έπειτα στις «Σύνθετες ρυθμίσεις» και στο «Model Context Protocol» και επιλέξτε «Ρύθμιση συνδέσμου».

  1. Ανοίξτε το TypingMind στο πρόγραμμα περιήγησής σας.
  2. Κάντε κλικ στο εικονίδιο «Ρυθμίσεις».
  3. Μεταβείτε στις «Σύνθετες ρυθμίσεις».
  4. Ανοίξτε την ενότητα Model Context Protocol.
  5. Κάντε κλικ στην επιλογή «Ρύθμιση συνδέσμου» και επιλέξτε «Αυτή η συσκευή».
Οθόνη ρύθμισης του συνδέσμου MCP του TypingMind με επιλεγμένη τη ρύθμιση «Αυτή η συσκευή»
2

Εκτελέστε την εντολή του συνδέσμου

Επιλέξτε «Αυτή η συσκευή», αντιγράψτε την εντολή από το TypingMind και εκτελέστε την στο Τερματικό. Διατηρήστε τη διεργασία σε λειτουργία όσο χρησιμοποιείτε το MCP.

  1. Αντιγράψτε την εντολή ρύθμισης που εμφανίζεται στο TypingMind.
  2. Ανοίξτε το Τερματικό στο macOS ή το Windows Terminal στα Windows.
  3. Επικολλήστε και εκτελέστε την εντολή.
  4. Εγκρίνετε την εγκατάσταση του πακέτου, αν το Τερματικό σάς ζητήσει επιβεβαίωση για να συνεχίσει.
  5. Διατηρήστε ανοιχτό το παράθυρο του Τερματικού και τη διεργασία σε λειτουργία όσο χρησιμοποιείτε εργαλεία MCP.
3

Προσθέστε το OPNsense MCP Server ως διακομιστή

Όταν η κατάσταση του συνδέσμου είναι «Έτοιμος», κάντε κλικ στην επιλογή «Επεξεργασία διακομιστών» και επικολλήστε τις ρυθμίσεις του διακομιστή MCP.

  1. Περιμένετε μέχρι η κατάσταση του συνδέσμου να εμφανιστεί ως «Έτοιμος».
  2. Κάντε κλικ στην επιλογή «Επεξεργασία διακομιστών».
  3. Επικολλήστε τις ρυθμίσεις του διακομιστή MCP OPNsense MCP Server.
  4. Αποθηκεύστε τη λίστα διακομιστών.
  5. Κάντε ανανέωση αν θέλετε να επιβεβαιώσετε ότι ο σύνδεσμος παραμένει έτοιμος για χρήση.
Ρυθμίσεις MCP του TypingMind με ενεργό διακομιστή και το κουμπί «Επεξεργασία διακομιστών»
{
  "mcpServers": {
    "lucamarien-opnsense-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Χρησιμοποιήστε τη σύνδεση με διαφορετικά μοντέλα

Αποθηκεύστε τη λίστα διακομιστών, ανοίξτε τα «Πρόσθετα», ενεργοποιήστε τα εργαλεία MCP του OPNsense MCP Server και έπειτα επιλέξτε οποιοδήποτε υποστηριζόμενο μοντέλο AI στο TypingMind. Χρησιμοποιήστε τα εργαλεία στη συνομιλία ή αναθέστε τα σε έναν πράκτορα AI.

  1. Ανοίξτε τη σελίδα «Πρόσθετα» στο TypingMind.
  2. Ενεργοποιήστε τα εργαλεία MCP του OPNsense MCP Server.
  3. Ξεκινήστε μια συνομιλία και επιλέξτε το μοντέλο AI που θέλετε να χρησιμοποιήσετε.
  4. Χρησιμοποιήστε τα εργαλεία MCP στη συνομιλία ή αντιστοιχίστε τα σε έναν πράκτορα AI.
  5. Μεταβείτε σε άλλο μοντέλο AI όποτε χρειάζεται, χωρίς να συνδέσετε ξανά το MCP.
Συνομιλία στο TypingMind με ενεργοποιημένα εργαλεία MCP και επιλεγμένο μοντέλο AI
Μπορείτε να με βοηθήσετε με αυτή την εργασία χρησιμοποιώντας το OPNsense MCP Server;
OPNsense MCP Server
Βεβαίως. Το διάβασα.
Δείτε τι βρήκα μέσω του OPNsense MCP Server.

Συχνές ερωτήσεις

Σε τι χρησιμεύει ο διακομιστής MCP OPNsense MCP Server;

Το OPNsense MCP Server είναι ένας διακομιστής MCP που επιτρέπει σε συμβατές εφαρμογές AI να συνδέονται με εξωτερικά εργαλεία και να λαμβάνουν πληροφορίες που παρέχουν το απαραίτητο πλαίσιο. Στο TypingMind, μπορείτε να προσθέσετε αυτόν τον διακομιστή MCP μία φορά και να κάνετε τα εργαλεία του διαθέσιμα στον χώρο εργασίας σας για AI.

Μπορώ να χρησιμοποιήσω τον διακομιστή MCP OPNsense MCP Server με πολλά μοντέλα AI στο TypingMind;

Ναι. Το TypingMind συνδέει τα εργαλεία MCP σε επίπεδο χώρου εργασίας, ώστε να μπορείτε να χρησιμοποιείτε το OPNsense MCP Server με διαφορετικά μοντέλα AI, όπως τα Claude, ChatGPT, Gemini ή άλλα μοντέλα που έχετε ρυθμίσει στο TypingMind, χωρίς να ρυθμίζετε τον διακομιστή MCP ξεχωριστά για κάθε μοντέλο.

Γιατί να χρησιμοποιήσετε τον σύνδεσμο MCP OPNsense MCP Server με το TypingMind;

Το TypingMind είναι ένα από τα καλύτερα περιβάλλοντα συνομιλίας με μεγάλα γλωσσικά μοντέλα, καθώς συγκεντρώνει πολλά μοντέλα AI, προτροπές, πρόσθετα, πράκτορες AI, κλειδιά API και εργαλεία MCP σε έναν χώρο εργασίας. Συνδέοντας το OPNsense MCP Server, μπορείτε να χρησιμοποιείτε τα εργαλεία MCP του με τα μοντέλα που προτιμάτε, διατηρώντας οργανωμένη τη ροή εργασίας των συνομιλιών σας στο TypingMind.

Πώς συνδέω τον διακομιστή MCP OPNsense MCP Server στο TypingMind;

Το OPNsense MCP Server λειτουργεί μέσω του τοπικού συνδέσμου MCP του TypingMind. Αυτή είναι η καλύτερη επιλογή όταν ο διακομιστής MCP χρειάζεται πρόσβαση σε τοπικά αρχεία, εφαρμογές υπολογιστή, εργαλεία γραμμής εντολών ή ιδιωτικούς πόρους στον υπολογιστή σας.

Ποια εργαλεία παρέχει ο διακομιστής MCP OPNsense MCP Server στο TypingMind;

Το OPNsense MCP Server διαθέτει δυνατότητες MCP που μπορείτε να ενεργοποιήσετε από τη σελίδα Πρόσθετα του TypingMind και να χρησιμοποιήσετε σε συνομιλίες ή να αναθέσετε σε πράκτορες AI.

Χρειάζεται να κοινοποιήσω τα κλειδιά API μου στο TypingMind για να χρησιμοποιήσω τον διακομιστή MCP OPNsense MCP Server;

Όχι. Το TypingMind δίνει προτεραιότητα στην τοπική λειτουργία και σας επιτρέπει να διατηρείτε τον έλεγχο των παρόχων μοντέλων, των κλειδιών API, των προτροπών και των ρυθμίσεων MCP σας. Αν το OPNsense MCP Server απαιτεί έλεγχο ταυτότητας, προσθέστε τις απαιτούμενες κεφαλίδες, τις ρυθμίσεις OAuth ή τις τοπικές ρυθμίσεις για τον συγκεκριμένο διακομιστή MCP κατά τη δημιουργία της σύνδεσης.

Σχετικοί διακομιστές MCP

Προβολή όλων

Δημιουργήστε τώρα τον δικό σας χώρο εργασίας AI

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇