Examples
Two ways to drive the server: type structured tool calls yourself, or just ask an AI client in
plain English. The examples below use mcp-cli so every argument is explicit — but the
same JSON arguments are what Claude Desktop or an MCPO REST call would send.
The mcp-cli pattern
Every command on this page follows the same shape. --server mikrotik is the server name
from your mcp-cli config, --tool is any tool from the
API reference, and --tool-args is a JSON object of that
tool's parameters.
$ uvx mcp-cli cmd --server mikrotik \ --tool <tool_name> \ --tool-args '{ "param": "value" }'
--tool-args JSON is portable. Paste the same object into the MCP Inspector's
argument form, or POST it to /<server>/<tool> through MCPO — see
Integrations.
Basic operations
Single-tool calls grouped by category. Copy any block and swap in your own names, addresses, and IDs.
# List the devices this server manages (titles, hosts, tags — never credentials) $ uvx mcp-cli cmd --server mikrotik --tool list_devices --tool-args '{}' # With an inventory configured, every tool takes an optional "device" (the inventory title) $ uvx mcp-cli cmd --server mikrotik --tool list_interfaces --tool-args '{"device": "office-core"}' $ uvx mcp-cli cmd --server mikrotik --tool create_vlan_interface \ --tool-args '{"device": "branch-berlin", "name": "vlan100", "vlan_id": 100, "interface": "ether1"}' # Single-device setups need no change — omit "device" and the one device is used
# Create a VLAN interface $ uvx mcp-cli cmd --server mikrotik --tool create_vlan_interface \ --tool-args '{"name": "vlan100", "vlan_id": 100, "interface": "ether1", "comment": "Production VLAN"}' # List all VLANs $ uvx mcp-cli cmd --server mikrotik --tool list_vlan_interfaces --tool-args '{}' # Get one VLAN's details $ uvx mcp-cli cmd --server mikrotik --tool get_vlan_interface --tool-args '{"name": "vlan100"}' # Update, then remove $ uvx mcp-cli cmd --server mikrotik --tool update_vlan_interface \ --tool-args '{"name": "vlan100", "comment": "Updated Production VLAN"}' $ uvx mcp-cli cmd --server mikrotik --tool remove_vlan_interface --tool-args '{"name": "vlan100"}'
# Real-time PoE-out telemetry (voltage, current, power) for one or more ports $ uvx mcp-cli cmd --server mikrotik --tool get_poe_monitor --tool-args '{"interfaces": "ether1"}' # List PoE-capable interfaces (PoE-out mode, priority) $ uvx mcp-cli cmd --server mikrotik --tool list_poe --tool-args '{"interface_filter": "ether"}' # Detailed PoE-out settings for a specific port $ uvx mcp-cli cmd --server mikrotik --tool get_poe_settings --tool-args '{"name": "ether1"}'
# Ping from the router (1 to 20 packets) $ uvx mcp-cli cmd --server mikrotik --tool ping --tool-args '{"address": "1.1.1.1", "count": 4}' # Probe the path MTU: a 1500-byte packet that must not be fragmented $ uvx mcp-cli cmd --server mikrotik --tool ping \n --tool-args '{"address": "203.0.113.10", "size": 1500, "do_not_fragment": true}' # Trace the route, at most 12 hops $ uvx mcp-cli cmd --server mikrotik --tool traceroute --tool-args '{"address": "8.8.8.8", "max_hops": 12}' # Which flows cross ether1 right now: 5 seconds, TCP port 443 only $ uvx mcp-cli cmd --server mikrotik --tool torch \n --tool-args '{"interface": "ether1", "duration": 5, "ip_protocol": "tcp", "port": "443"}' # Capture DNS packet headers for 5 seconds (nothing is stored on the router) $ uvx mcp-cli cmd --server mikrotik --tool sniff_packets \n --tool-args '{"interface": "ether1", "port": "53", "duration": 5}' # Which RouterOS processes are using the CPU $ uvx mcp-cli cmd --server mikrotik --tool profile_cpu --tool-args '{"duration": 5}'
# Version, uptime, CPU and memory load $ uvx mcp-cli cmd --server mikrotik --tool get_system_resource --tool-args '{}' # Board temperature and voltage (reports nothing on boards without sensors) $ uvx mcp-cli cmd --server mikrotik --tool get_system_health --tool-args '{}' # Installed RouterOS against the latest on its update channel (reads the last check) $ uvx mcp-cli cmd --server mikrotik --tool get_system_package_update --tool-args '{}' # IPsec: the peers with a live session, then the child SAs towards one of them $ uvx mcp-cli cmd --server mikrotik --tool get_ipsec_active_peers --tool-args '{"state_filter": "established"}' $ uvx mcp-cli cmd --server mikrotik --tool get_ipsec_installed_sa --tool-args '{"dst_address_filter": "198.51.100.2"}' # Netwatch: which monitored hosts are down right now $ uvx mcp-cli cmd --server mikrotik --tool list_netwatch --tool-args '{"status_filter": "down"}' # Management services that are enabled, and where each accepts connections from $ uvx mcp-cli cmd --server mikrotik --tool list_ip_services --tool-args '{"enabled_only": true}' # Scheduled tasks by name (script bodies are withheld unless include_source is true) $ uvx mcp-cli cmd --server mikrotik --tool list_schedulers --tool-args '{"name_filter": "backup"}'
# Add an address to an interface $ uvx mcp-cli cmd --server mikrotik --tool add_ip_address \ --tool-args '{"address": "192.168.100.1/24", "interface": "vlan100", "comment": "Gateway address"}' # List (filtered) and remove by record ID $ uvx mcp-cli cmd --server mikrotik --tool list_ip_addresses --tool-args '{"interface_filter": "vlan100"}' $ uvx mcp-cli cmd --server mikrotik --tool remove_ip_address --tool-args '{"address_id": "*1"}'
# Add an IPv6 address, advertising the prefix in Router Advertisements $ uvx mcp-cli cmd --server mikrotik --tool add_ipv6_address \ --tool-args '{"address": "2001:db8:1::1/64", "interface": "bridge", "advertise": true}' # Take the prefix from a delegated IPv6 pool (host part only) $ uvx mcp-cli cmd --server mikrotik --tool add_ipv6_address \ --tool-args '{"address": "::1/64", "interface": "bridge", "from_pool": "isp-pd"}' # List only routable (global) addresses, then only link-local $ uvx mcp-cli cmd --server mikrotik --tool list_ipv6_addresses --tool-args '{"global_only": true}' $ uvx mcp-cli cmd --server mikrotik --tool list_ipv6_addresses --tool-args '{"link_local_only": true}' # Get / remove by id (*1) or by the address value itself $ uvx mcp-cli cmd --server mikrotik --tool get_ipv6_address --tool-args '{"address_id": "2001:db8:1::1/64"}' $ uvx mcp-cli cmd --server mikrotik --tool remove_ipv6_address --tool-args '{"address_id": "*1"}'
$ uvx mcp-cli cmd --server mikrotik --tool create_dhcp_pool \ --tool-args '{"name": "pool-vlan100", "ranges": "192.168.100.10-192.168.100.200"}' $ uvx mcp-cli cmd --server mikrotik --tool create_dhcp_network \ --tool-args '{"network": "192.168.100.0/24", "gateway": "192.168.100.1", "dns_servers": ["8.8.8.8", "8.8.4.4"]}' $ uvx mcp-cli cmd --server mikrotik --tool create_dhcp_server \ --tool-args '{"name": "dhcp-vlan100", "interface": "vlan100", "address_pool": "pool-vlan100"}'
# Active IPv4 leases seen in the last 24 hours $ uvx mcp-cli cmd --server mikrotik --tool list_dhcp_leases \ --tool-args '{"status_filter": "bound", "last_seen_within": "24h"}' # DHCPv6 bindings, then the ARP and IPv6 ND tables for one interface $ uvx mcp-cli cmd --server mikrotik --tool list_dhcpv6_bindings --tool-args '{"status_filter": "bound"}' $ uvx mcp-cli cmd --server mikrotik --tool list_arp_entries --tool-args '{"interface_filter": "bridge", "status_filter": "reachable"}' $ uvx mcp-cli cmd --server mikrotik --tool list_ipv6_neighbors --tool-args '{"address_filter": "fe80", "interface_filter": "bridge"}'
# Masquerade (outbound internet) $ uvx mcp-cli cmd --server mikrotik --tool create_nat_rule \ --tool-args '{"chain": "srcnat", "action": "masquerade", "out_interface": "ether1", "comment": "Internet access"}' # Port-forward HTTP to an internal host $ uvx mcp-cli cmd --server mikrotik --tool create_nat_rule \ --tool-args '{"chain": "dstnat", "action": "dst-nat", "dst_port": "80", "protocol": "tcp", "to_addresses": "192.168.100.10", "to_ports": "80", "comment": "Web server"}' # Reorder / toggle / remove $ uvx mcp-cli cmd --server mikrotik --tool move_nat_rule --tool-args '{"rule_id": "*1", "destination": 0}' $ uvx mcp-cli cmd --server mikrotik --tool remove_nat_rule --tool-args '{"rule_id": "*1"}'
$ uvx mcp-cli cmd --server mikrotik --tool create_ip_pool \ --tool-args '{"name": "main-pool", "ranges": "192.168.1.100-192.168.1.200"}' # List with live usage, then expand without disruption $ uvx mcp-cli cmd --server mikrotik --tool list_ip_pools --tool-args '{"include_used": true}' $ uvx mcp-cli cmd --server mikrotik --tool expand_ip_pool \ --tool-args '{"name": "main-pool", "additional_ranges": "192.168.1.201-192.168.1.250"}'
# Accept ICMPv6 — required for IPv6 to work at all $ uvx mcp-cli cmd --server mikrotik --tool create_ipv6_filter_rule \ --tool-args '{"chain": "input", "action": "accept", "protocol": "icmpv6"}' # Allow SSH from a trusted prefix $ uvx mcp-cli cmd --server mikrotik --tool create_ipv6_filter_rule \ --tool-args '{"chain": "input", "action": "accept", "protocol": "tcp", "dst_port": "22", "src_address": "2001:db8::/64"}' # NDP router solicitation, hop-limit 255 $ uvx mcp-cli cmd --server mikrotik --tool create_ipv6_filter_rule \ --tool-args '{"chain": "input", "action": "accept", "protocol": "icmpv6", "icmp_options": "133:0", "hop_limit": "equal:255"}' # List, then reorder / toggle by internal id (*N — not the positional number) $ uvx mcp-cli cmd --server mikrotik --tool list_ipv6_filter_rules --tool-args '{"chain_filter": "input"}' $ uvx mcp-cli cmd --server mikrotik --tool move_ipv6_filter_rule --tool-args '{"rule_id": "*3", "destination": 0}' $ uvx mcp-cli cmd --server mikrotik --tool disable_ipv6_filter_rule --tool-args '{"rule_id": "*3"}'
# Accept established/related, drop invalid, allow ICMP $ uvx mcp-cli cmd --server mikrotik --tool create_filter_rule \ --tool-args '{"chain": "input", "action": "accept", "connection_state": "established,related", "comment": "Accept established"}' $ uvx mcp-cli cmd --server mikrotik --tool create_filter_rule \ --tool-args '{"chain": "input", "action": "drop", "connection_state": "invalid", "comment": "Drop invalid"}' # Or scaffold a sensible baseline in one call $ uvx mcp-cli cmd --server mikrotik --tool create_basic_firewall_setup --tool-args '{}'
$ uvx mcp-cli cmd --server mikrotik --tool add_route \ --tool-args '{"dst_address": "10.0.0.0/8", "gateway": "192.168.1.1", "comment": "Corporate network"}' $ uvx mcp-cli cmd --server mikrotik --tool add_default_route --tool-args '{"gateway": "192.168.1.1", "distance": 1}' $ uvx mcp-cli cmd --server mikrotik --tool check_route_path --tool-args '{"destination": "8.8.8.8"}'
$ uvx mcp-cli cmd --server mikrotik --tool set_dns_servers \ --tool-args '{"servers": ["8.8.8.8", "8.8.4.4"], "allow_remote_requests": true}' $ uvx mcp-cli cmd --server mikrotik --tool add_dns_static \ --tool-args '{"name": "router.local", "address": "192.168.1.1", "comment": "Local router"}' # Regex ad-block, then a live test query $ uvx mcp-cli cmd --server mikrotik --tool add_dns_regexp \ --tool-args '{"regexp": ".*\\.ads\\..*", "address": "0.0.0.0", "comment": "Block ads"}' $ uvx mcp-cli cmd --server mikrotik --tool test_dns_query --tool-args '{"name": "google.com"}'
$ uvx mcp-cli cmd --server mikrotik --tool add_user \ --tool-args '{"name": "newuser", "password": "SecurePass123", "group": "write", "comment": "New operator"}' $ uvx mcp-cli cmd --server mikrotik --tool add_user_group \ --tool-args '{"name": "operators", "policy": ["read", "write", "test"], "comment": "Operator group"}' $ uvx mcp-cli cmd --server mikrotik --tool get_active_users --tool-args '{}'
# Binary backup + declarative export $ uvx mcp-cli cmd --server mikrotik --tool create_backup \ --tool-args '{"name": "full_backup", "include_password": true}' $ uvx mcp-cli cmd --server mikrotik --tool create_export \ --tool-args '{"name": "config_export", "file_format": "rsc", "export_type": "full"}' # Read logs by topic; search for failed logins $ uvx mcp-cli cmd --server mikrotik --tool get_logs --tool-args '{"topics": "firewall", "limit": 100}' $ uvx mcp-cli cmd --server mikrotik --tool search_logs \ --tool-args '{"search_term": "login failed", "case_sensitive": false}'
Wireless configuration
RouterOS 7 replaced /interface wireless with /interface wifi. The interface tools detect which menu the device has and translate automatically; run check_wireless_support first to see which one applies. The security-profile and access-list tools, and master_interface, configuration and configuration_manager, are RouterOS 7 only; radio_name, mode, frequency, band and channel_width are legacy only, and RouterOS 7 refuses them with an error.
# Create a virtual AP on the radio wifi1 (master_interface is required on RouterOS 7) $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_interface \ --tool-args '{"name": "guest", "ssid": "Guest", "master_interface": "wifi1", "comment": "Guest network"}' # List the running interfaces, or show one $ uvx mcp-cli cmd --server mikrotik --tool list_wireless_interfaces --tool-args '{"running_only": true}' $ uvx mcp-cli cmd --server mikrotik --tool get_wireless_interface --tool-args '{"name": "wifi1"}' # Rename the SSID of a radio, then disable and enable it $ uvx mcp-cli cmd --server mikrotik --tool update_wireless_interface --tool-args '{"name": "wifi1", "ssid": "HomeNetwork"}' $ uvx mcp-cli cmd --server mikrotik --tool disable_wireless_interface --tool-args '{"name": "wifi1"}' $ uvx mcp-cli cmd --server mikrotik --tool enable_wireless_interface --tool-args '{"name": "wifi1"}' # Remove the virtual AP $ uvx mcp-cli cmd --server mikrotik --tool remove_wireless_interface --tool-args '{"name": "guest"}'
Passphrases are never printed by these tools, and on the legacy menu the security-profile and access-list tools answer with an error and change nothing.
# Inline: set the passphrase on the interface itself $ uvx mcp-cli cmd --server mikrotik --tool set_wireless_passphrase \ --tool-args '{"name": "wifi1", "passphrase": "change-me-please", "authentication_types": "wpa2-psk,wpa3-psk"}' # Or a named profile, shared by any number of interfaces $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_security_profile \ --tool-args '{"name": "home-sec", "authentication_types": ["wpa2-psk", "wpa3-psk"], "passphrase": "change-me-please"}' $ uvx mcp-cli cmd --server mikrotik --tool set_wireless_security_profile --tool-args '{"interface_name": "wifi2", "security_profile": "home-sec"}' # Access list: reject one client $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_access_list \ --tool-args '{"mac_address": "AA:BB:CC:DD:EE:FF", "action": "reject", "comment": "blocked laptop"}' $ uvx mcp-cli cmd --server mikrotik --tool list_wireless_access_list --tool-args '{}'
# Scan for available networks (10 seconds) $ uvx mcp-cli cmd --server mikrotik --tool scan_wireless_networks --tool-args '{"interface": "wlan1", "duration": 10}' # One snapshot of status, frequency, CCQ, noise floor and client count $ uvx mcp-cli cmd --server mikrotik --tool monitor_wireless_interface --tool-args '{"interface": "wlan1"}' # Legacy only: channel usage and noise floor (briefly interrupts the clients of that radio) $ uvx mcp-cli cmd --server mikrotik --tool monitor_wireless_frequency --tool-args '{"interface": "wlan1", "duration": 5}' # Connected clients: all interfaces, or one $ uvx mcp-cli cmd --server mikrotik --tool get_wireless_registration_table --tool-args '{}' $ uvx mcp-cli cmd --server mikrotik --tool get_wireless_registration_table --tool-args '{"interface": "wlan1"}'
# radio_name is required on the legacy menu; the security profile must already exist there $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_interface \ --tool-args '{"name": "wlan-5g", "radio_name": "wlan1", "mode": "ap-bridge", "ssid": "MyNetwork-5G", "frequency": "5180", "band": "5ghz-a/n/ac", "channel_width": "80mhz", "security_profile": "default"}'
Complete workflows
These chain several tool calls into a single repeatable procedure. Run them top to bottom — each step assumes the previous one succeeded. Wrapping the whole sequence in safe mode means a lost connection rolls every change back automatically.
Setting up a new network segment
A self-contained guest VLAN (vlan200) with its own subnet, DHCP, and
masqueraded internet access.
# 1. Create the VLAN on the trunk port $ uvx mcp-cli cmd --server mikrotik --tool create_vlan_interface \ --tool-args '{"name": "vlan200", "vlan_id": 200, "interface": "ether1", "comment": "Guest Network"}' # 2. Give the VLAN a gateway address $ uvx mcp-cli cmd --server mikrotik --tool add_ip_address \ --tool-args '{"address": "192.168.200.1/24", "interface": "vlan200"}' # 3. Create the DHCP address pool $ uvx mcp-cli cmd --server mikrotik --tool create_dhcp_pool \ --tool-args '{"name": "pool-200", "ranges": "192.168.200.10-192.168.200.100"}' # 4. Define the DHCP network (gateway + DNS) $ uvx mcp-cli cmd --server mikrotik --tool create_dhcp_network \ --tool-args '{"network": "192.168.200.0/24", "gateway": "192.168.200.1", "dns_servers": ["8.8.8.8", "8.8.4.4"]}' # 5. Bind a DHCP server to the VLAN + pool $ uvx mcp-cli cmd --server mikrotik --tool create_dhcp_server \ --tool-args '{"name": "dhcp-200", "interface": "vlan200", "address_pool": "pool-200"}' # 6. Masquerade the segment out to the internet $ uvx mcp-cli cmd --server mikrotik --tool create_nat_rule \ --tool-args '{"chain": "srcnat", "action": "masquerade", "out_interface": "ether1", "comment": "Internet access for VLAN 200"}'
Port forwarding setup
Expose internal services by mapping public ports on 203.0.113.1 to a host at
192.168.100.10 with dst-nat rules.
# Forward HTTP (80 → 80) $ uvx mcp-cli cmd --server mikrotik --tool create_nat_rule \ --tool-args '{"chain": "dstnat", "action": "dst-nat", "dst_address": "203.0.113.1", "dst_port": "80", "protocol": "tcp", "to_addresses": "192.168.100.10", "to_ports": "80", "comment": "Web server"}' # Forward HTTPS (443 → 443) $ uvx mcp-cli cmd --server mikrotik --tool create_nat_rule \ --tool-args '{"chain": "dstnat", "action": "dst-nat", "dst_address": "203.0.113.1", "dst_port": "443", "protocol": "tcp", "to_addresses": "192.168.100.10", "to_ports": "443", "comment": "HTTPS server"}' # Remap an external SSH port (2222 → 22) $ uvx mcp-cli cmd --server mikrotik --tool create_nat_rule \ --tool-args '{"chain": "dstnat", "action": "dst-nat", "dst_address": "203.0.113.1", "dst_port": "2222", "protocol": "tcp", "to_addresses": "192.168.100.10", "to_ports": "22", "comment": "SSH server"}'
Backup and restore process
Capture a binary backup plus human-readable exports you can diff and store in version control. Section exports let you snapshot just the firewall or NAT tables.
# 1. Create a dedicated read-only backup account $ uvx mcp-cli cmd --server mikrotik --tool add_user \ --tool-args '{"name": "backup_user", "password": "BackupPass123", "group": "read", "comment": "Backup account"}' # 2. Full binary backup (restorable on the same device) $ uvx mcp-cli cmd --server mikrotik --tool create_backup \ --tool-args '{"name": "daily_backup", "include_password": true}' # 3. Full text export (.rsc) — portable + diff-able $ uvx mcp-cli cmd --server mikrotik --tool create_export \ --tool-args '{"name": "config_export", "file_format": "rsc", "export_type": "full"}' # 4. Export just the firewall filter table $ uvx mcp-cli cmd --server mikrotik --tool export_section \ --tool-args '{"section": "ip firewall filter"}' # 5. Export just the NAT table $ uvx mcp-cli cmd --server mikrotik --tool export_section \ --tool-args '{"section": "ip firewall nat"}'
WiFi network setups
Four RouterOS 7 recipes (/interface wifi, where the radios are wifi1 and wifi2) and one for a legacy point-to-point link. Run check_wireless_support first to see which wireless menu the device has.
Home network on the built-in radio
# 1. Name the network on the radio $ uvx mcp-cli cmd --server mikrotik --tool update_wireless_interface --tool-args '{"name": "wifi1", "ssid": "HomeNetwork", "comment": "Main home network"}' # 2. Set the passphrase $ uvx mcp-cli cmd --server mikrotik --tool set_wireless_passphrase \ --tool-args '{"name": "wifi1", "passphrase": "change-me-please", "authentication_types": "wpa2-psk,wpa3-psk"}' # 3. Enable the radio $ uvx mcp-cli cmd --server mikrotik --tool enable_wireless_interface --tool-args '{"name": "wifi1"}'
Guest network as a virtual AP
# 1. A security profile for the guests $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_security_profile \ --tool-args '{"name": "guest-sec", "authentication_types": ["wpa2-psk", "wpa3-psk"], "passphrase": "guest-pass-2026"}' # 2. A virtual AP on wifi1 that uses it $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_interface \ --tool-args '{"name": "guest", "ssid": "GuestNetwork", "master_interface": "wifi1", "security_profile": "guest-sec"}'
Dual-band (2.4GHz + 5GHz)
# 1. One security profile $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_security_profile \ --tool-args '{"name": "home-sec", "authentication_types": ["wpa2-psk", "wpa3-psk"], "passphrase": "change-me-please"}' # 2. The same SSID on both radios $ uvx mcp-cli cmd --server mikrotik --tool update_wireless_interface --tool-args '{"name": "wifi1", "ssid": "MyNetwork"}' $ uvx mcp-cli cmd --server mikrotik --tool update_wireless_interface --tool-args '{"name": "wifi2", "ssid": "MyNetwork"}' # 3. The profile on both radios $ uvx mcp-cli cmd --server mikrotik --tool set_wireless_security_profile --tool-args '{"interface_name": "wifi1", "security_profile": "home-sec"}' $ uvx mcp-cli cmd --server mikrotik --tool set_wireless_security_profile --tool-args '{"interface_name": "wifi2", "security_profile": "home-sec"}'
CAPsMAN: one controller, many access points
RouterOS 7.13 and later. A radio takes its settings from the controller only when its configuration_manager says so. See CAPsMAN for every parameter.
# On the controller: security, configuration profile, provisioning rule, CAPsMAN on $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_security_profile \ --tool-args '{"name": "sec-home", "authentication_types": ["wpa2-psk", "wpa3-psk"], "passphrase": "change-me-please"}' $ uvx mcp-cli cmd --server mikrotik --tool create_wifi_configuration \ --tool-args '{"name": "cfg-home", "ssid": "Home", "country": "Netherlands", "security": "sec-home", "datapath_bridge": "bridge1"}' $ uvx mcp-cli cmd --server mikrotik --tool create_wifi_provisioning_rule \ --tool-args '{"action": "create-dynamic-enabled", "master_configuration": "cfg-home", "supported_bands": ["5ghz-ax"]}' $ uvx mcp-cli cmd --server mikrotik --tool set_wifi_capsman \ --tool-args '{"enabled": true, "interfaces": ["bridge1"], "ca_certificate": "auto", "certificate": "auto"}' # On each access point: become a CAP and let the controller configure the radios $ uvx mcp-cli cmd --server mikrotik --tool set_wifi_cap --tool-args '{"enabled": true, "discovery_interfaces": ["bridge1"]}' $ uvx mcp-cli cmd --server mikrotik --tool update_wireless_interface --tool-args '{"name": "wifi1", "configuration_manager": "capsman-or-local"}' $ uvx mcp-cli cmd --server mikrotik --tool update_wireless_interface --tool-args '{"name": "wifi2", "configuration_manager": "capsman-or-local"}' # Back on the controller: the access points that registered $ uvx mcp-cli cmd --server mikrotik --tool list_wifi_remote_caps --tool-args '{}'
Point-to-point link (legacy wireless)
On the legacy menu the passphrase lives in a security profile that these tools cannot create, so both ends name an existing profile (p2p here).
# Device A: station end $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_interface \ --tool-args '{"name": "p2p-station", "radio_name": "wlan1", "mode": "station", "ssid": "P2P-Link", "frequency": "5180", "band": "5ghz-a/n", "security_profile": "p2p"}' # Device B: AP end $ uvx mcp-cli cmd --server mikrotik --tool create_wireless_interface \ --tool-args '{"name": "p2p-ap", "radio_name": "wlan1", "mode": "ap-bridge", "ssid": "P2P-Link", "frequency": "5180", "band": "5ghz-a/n", "security_profile": "p2p"}'
Natural language
Because every tool ships a description and typed schema, an MCP-aware assistant can turn a plain-English request into the right sequence of calls. Below are real prompts and the actual tools each one drives — see the API reference for parameters.
Create a new VLAN 200 for the guest network on ether1, assign IP 192.168.200.1/24, set up DHCP from .10 to .250, and add a masquerade NAT rule for internet access.
What the assistant does
- Creates VLAN 200 on
ether1asvlan200-guest - Assigns
192.168.200.1/24to the VLAN interface - Creates an IP pool for the
.10–.250range - Configures the DHCP network (gateway + DNS), then creates the DHCP server
- Adds a
srcnatmasquerade rule outether1
create_vlan_interface
add_ip_address
create_ip_pool
create_dhcp_network
create_dhcp_server
create_nat_rule
Configure port forwarding to redirect incoming HTTP (port 80) and HTTPS (port 443) traffic from ether1 to my internal web server at 192.168.1.100. Also add firewall rules to allow this forwarded traffic.
What the assistant does
- Creates a
dst-natrule forwarding port 80 to192.168.1.100 - Creates a
dst-natrule forwarding port 443 to the same host - Adds a
forward-chain filter rule accepting traffic to the web server
create_nat_rule
create_filter_rule
Set up basic firewall security rules for my router. Accept established and related connections, drop invalid packets, allow ICMP ping, allow SSH access from WAN on port 22, and drop all other incoming WAN traffic. Also configure similar rules for forwarded traffic.
What the assistant does
- Adds an
inputrule accepting established/related connections - Drops invalid connection states
- Allows ICMP, then allows TCP/22 from the WAN interface
- Adds a default drop for all other WAN input
- Mirrors established/related + invalid handling on the
forwardchain
create_filter_rule
Limit bandwidth for my guest network (192.168.200.0/24) to prevent abuse. Set maximum download speed to 10 Mbps and upload speed to 5 Mbps using queue rules, and ensure guest traffic is allowed through the firewall.
What the assistant does
- Creates a simple queue capping download at 10M for the guest subnet
- Creates a second simple queue capping upload at 5M
- Adds a
forward-chain rule accepting guest traffic
create_simple_queue
create_filter_rule
Configure wlan1 as an access point with SSID "MyNetwork" using WPA2-PSK security. Set the password to "YourStrongPassword123" and enable the interface.
What the assistant does
- Sets the SSID on
wlan1 - Sets the WPA2-PSK passphrase on the interface (on RouterOS 7; a named security profile works too)
- Enables the wireless interface
update_wireless_interface
set_wireless_passphrase
enable_wireless_interface