MikroTik MCP / Docs / API reference

API reference

Every tool the server exposes, grouped into 19 categories (170+ tools total). Each entry shows the name, what it does, its parameters (required vs optional), and a canonical example.

Naming convention. Most tools are prefixed with mikrotik_ followed by a verb — create, list, get, update, remove, plus category-specific verbs. Six categories are exceptions: Inventory, Interfaces, PoE, IPv6 Address, Queues, and Safe Mode tools are called without the prefix (e.g. list_interfaces, create_simple_queue, enable_safe_mode). The category headers below flag which convention applies. With a multi-device inventory configured, every device-scoped tool also accepts an optional device argument naming the inventory title to target.

Categories

Inventory — Multiple Devices

Manage a whole fleet from one server. Devices are declared in a YAML inventory; each entry has a unique title, and every device-scoped tool accepts an optional device argument naming the title to target. With no inventory configured the server behaves exactly as before — a single device built from MIKROTIK_HOST / MIKROTIK_USERNAME / …, and device can be omitted everywhere.

no mikrotik_ prefix on this category · read-only
1 tool
category 01
list list_devices

Lists the devices this server manages — title, host, port, username, tags, and region. Credentials are never returned. Use it to discover the fleet before targeting a device.

no paramsTakes no arguments
Fleet patternlist_devices() # discover the fleet list_interfaces(device="office-core") # target one device create_vlan_interface(device="branch-berlin", name="vlan100", vlan_id=100, interface="ether1")
configure Configuring the inventory

The inventory is YAML, from one of two sources — MIKROTIK_INVENTORY_FILE (path to a YAML file, recommended) or MIKROTIK_INVENTORY (the inventory written inline; YAML flow syntax needs no escaped quotes, and plain JSON works too since it's a YAML subset). When both are set, the inline value wins. A broken inventory (missing file, bad YAML, invalid entry) stops the server at startup with one clear message. A ready-to-copy template ships at the repository root as inventory.example.yml.

inventory.yaml- title: office-core host: 192.168.88.1 port: 22 username: admin password: change-me tags: [office, core] region: NL - title: branch-berlin host: 10.20.0.1 username: admin key_filename: /config/keys/id_ed25519 tags: [branch] region: DE
titlerequiredUnique identifier passed as device — matching is case-insensitive
hostrequiredIP or hostname
port · usernameoptionalDefaults: 22, admin
password · key_filenameoptionalPrefer an SSH key over a password; omit password when using a key
tags · regionoptionalFree-form labels — [branch, eu], NL — great targets for "every device tagged office" prompts
select Selecting a device

Every device-scoped tool takes an optional device argument. One device configured — omit it; that device is used automatically. More than one — pass the title. Omitting it, or passing an unknown title, returns an error that lists the valid titles, so an AI caller corrects itself on the next call instead of quietly running the command on the wrong router.

DOCKER
In the container, the inventory file must be mounted as a volume — the image ships /config as the mount point: -v "$PWD/inventory.yaml:/config/inventory.yaml:ro" -e MIKROTIK_INVENTORY_FILE=/config/inventory.yaml. Two traps the entrypoint catches with an explicit error: the container runs as uid 1000, so the file must be readable by that uid (chmod 644 is usually enough); and if the host file doesn't exist at start, Docker silently creates a directory in its place — create the YAML first. The entrypoint also accepts --inventory '<yaml>' / --inventory-file <path>. When an inventory is configured it wins, and MIKROTIK_HOST / MIKROTIK_USERNAME / MIKROTIK_PASSWORD / MIKROTIK_PORT are ignored. See Installation.
BEHAVIOR
Connections are per command — every command opens its own SSH connection and closes it when done, so parallel client sessions can't disturb each other; the trade-off is one SSH handshake per command. Safe mode is per device — each device holds its own persistent session, so enable_safe_mode(device="office-core") leaves every other device untouched. The inventory is a secret — it holds fleet credentials, so prefer key_filename, restrict file permissions, and remember env values show in docker inspect. Validation errors never echo inventory contents, so a typo can't leak a password into a log. For a local two-device lab, routeros-docker/docker-compose.yml starts routeros-a (SSH 127.0.0.1:2222) and routeros-b (:2223).

Interfaces — All Interface Types

List and manage every interface on the device — ethernet, bridge, WireGuard, PPPoE, VLAN, WiFi, SFP, LTE, loopback. The equivalent of /interface print in RouterOS. For type-specific create/remove, use the dedicated categories (VLAN, WireGuard, Wireless).

no mikrotik_ prefix on this category
4 tools
category 02
list list_interfaces

Lists all interfaces, with optional filtering by type, name, or running/disabled state.

type_filteroptionalFilter by type — ether, bridge, vlan, wg, pppoe-out, wifi, lte, loopback, …
name_filteroptionalPartial name match — "ether" matches ether1, ether2
running_onlyoptionalOnly currently-running interfaces
disabled_onlyoptionalOnly disabled interfaces
Exampleslist_interfaces() list_interfaces(type_filter="ether") list_interfaces(running_only=true)
get get_interface

Returns detailed information about a single interface by exact name.

namerequiredExact interface name — "ether1", "bridge", "pppoe-out1", "wg0"
Exampleget_interface(name="ether1-wan")
enable · disable enable_interface · disable_interface

Bring an interface up or take it down without removing it.

namerequiredExact interface name
Examplesdisable_interface(name="ether4") enable_interface(name="ether4")

PoE — Power over Ethernet

Read-only monitoring of Power-over-Ethernet status and per-port configuration on PoE-capable devices, under /interface ethernet poe. On hardware without PoE-out ports (e.g. CHR / virtual routers) these tools report that no PoE data is available.

no mikrotik_ prefix on this category · read-only
3 tools
category 03
monitor get_poe_monitor

Reads real-time PoE-out telemetry — status, voltage, current, and power — for one or more ethernet interfaces. Runs /interface ethernet poe monitor … once.

interfacesrequiredComma-separated ethernet interface name(s)
Examplesget_poe_monitor(interfaces="ether1") get_poe_monitor(interfaces="ether9-ap,ether10-ap,ether11-ap")
list list_poe

Lists the PoE-out configuration (PoE-out mode, priority) of PoE-capable ethernet interfaces. Runs /interface ethernet poe print.

interface_filteroptionalPartial name match — "ether" matches ether1, ether2
Exampleslist_poe() list_poe(interface_filter="ether")
get get_poe_settings

Gets the detailed PoE-out settings of a specific ethernet interface — mode, priority, voltage, and low/high thresholds. Runs /interface ethernet poe print detail where name=….

namerequiredExact ethernet interface name — "ether1"
Exampleget_poe_settings(name="ether1")

VLAN — Tagged Interfaces

Create, list, inspect, update, and remove tagged 802.1Q interfaces. Parent interfaces can be any physical port or bridge.

5 tools
category 04
create mikrotik_create_vlan_interface

Creates a VLAN interface on a parent port.

namerequiredVLAN interface name
vlan_idrequiredVLAN ID (1–4094)
interfacerequiredParent interface
commentoptionalDescription
disabledoptionalCreate in disabled state
mtuoptionalMTU size
use_service_tagoptional802.1ad service tag
arpoptionalARP mode
arp_timeoutoptionalARP timeout
Examplemikrotik_create_vlan_interface(name="vlan100", vlan_id=100, interface="ether1")
list mikrotik_list_vlan_interfaces

Lists VLAN interfaces, optionally filtered.

name_filteroptionalFilter by name
vlan_id_filteroptionalFilter by VLAN ID
interface_filteroptionalFilter by parent interface
disabled_onlyoptionalShow only disabled interfaces
Examplemikrotik_list_vlan_interfaces(vlan_id_filter=100)
get mikrotik_get_vlan_interface

Returns full details for a specific VLAN interface.

namerequiredVLAN interface name
Examplemikrotik_get_vlan_interface(name="vlan100")
update mikrotik_update_vlan_interface

Updates an existing VLAN interface in place. Pass only the fields you want to change.

namerequiredCurrent name
new_nameoptionalRename to
vlan_idoptionalNew VLAN ID
interfaceoptionalNew parent interface
commentoptionalNew description
disabledoptionalEnable / disable
mtuoptionalNew MTU
arpoptionalARP mode
use_service_tagoptional802.1ad service tag
arp_timeoutoptionalARP timeout
Examplemikrotik_update_vlan_interface(name="vlan100", comment="Production VLAN")
remove mikrotik_remove_vlan_interface

Removes a VLAN interface. Dependent IP addresses, DHCP servers, and firewall rules that reference the interface will be orphaned — clean them up first.

namerequiredVLAN interface name
Examplemikrotik_remove_vlan_interface(name="vlan100")

IP Address — IPv4 Interface Bindings

Assign and remove IPv4 addresses on physical, bridge, or VLAN interfaces. For IPv6, see IPv6 Address.

4 tools
category 05
addmikrotik_add_ip_address

Bind an address to an interface.

addressrequiredCIDR, e.g. 192.168.100.1/24
interfacerequiredInterface name
commentoptionalDescription
network · broadcastoptionalManual network / broadcast overrides
disabledoptionalAdd in a disabled state
Examplemikrotik_add_ip_address(address="192.168.100.1/24", interface="vlan100")
list · getmikrotik_list_ip_addresses · mikrotik_get_ip_address

Inspect bindings — list takes optional filters (by interface, address, network, dynamic flag, or disabled-only); get returns one address record by ID.

removemikrotik_remove_ip_address
address_idrequiredRouterOS address record ID

IPv6 Address — Interface Bindings

Assign and inspect IPv6 addresses on interfaces, under the RouterOS /ipv6 address tree. IPv6 lives in a separate command tree from IPv4 (/ipv6 … vs /ip …) — this is the IPv6 counterpart of the IP Address category. These tools cover IPv6 addressing; IPv6 routing, firewall, DHCPv6/ND, and pools are separate areas.

no mikrotik_ prefix on this category
4 tools
category 06
add add_ipv6_address

Adds an IPv6 address to an interface. Runs /ipv6 address add ….

addressrequiredIPv6 address with prefix length — 2001:db8::1/64, fe80::1/64. With from_pool, supply the host part only (e.g. ::1/64).
interfacerequiredInterface name — ether1, bridge
advertiseoptionalInclude this prefix in Router Advertisements
eui_64optionalDerive the host part from the interface MAC
from_pooloptionalName of an IPv6 pool to take the prefix from
no_dadoptionalSkip Duplicate Address Detection
comment · disabledoptionalDescription; add in a disabled state
Examplesadd_ipv6_address(address="2001:db8:1::1/64", interface="bridge") add_ipv6_address(address="2001:db8:1::1/64", interface="bridge", advertise=true) add_ipv6_address(address="::1/64", interface="bridge", from_pool="isp-pd")
list list_ipv6_addresses

Lists IPv6 addresses, with optional filtering. Runs /ipv6 address print.

interface_filteroptionalFilter by interface
address_filteroptionalPartial match on the address — "2001:db8", "fe80"
disabled_only · dynamic_onlyoptionalOnly disabled / only dynamically-assigned addresses
global_only · link_local_onlyoptionalOnly routable addresses / only fe80::/10
Exampleslist_ipv6_addresses() list_ipv6_addresses(interface_filter="bridge") list_ipv6_addresses(global_only=true) # routable addresses only list_ipv6_addresses(link_local_only=true) # fe80::/10 only
get get_ipv6_address

Gets details for a single IPv6 address, by RouterOS id or by address value. Runs /ipv6 address print detail where ….

address_idrequiredInternal id (e.g. *1) or the address value (e.g. 2001:db8::1/64)
Exampleget_ipv6_address(address_id="2001:db8:1::1/64")
remove remove_ipv6_address

Removes an IPv6 address by id or address value. Runs /ipv6 address remove [find …].

address_idrequiredInternal id (e.g. *1) or the address value
Exampleremove_ipv6_address(address_id="2001:db8:1::1/64")

IP Pool — Named Address Pools

Named ranges used by DHCP, hotspot, PPP, and VPN servers. Pools can be inspected, updated, and expanded without disruption.

7 tools
category 07
createmikrotik_create_ip_pool
namerequiredPool name
rangesrequirede.g. "192.168.1.100-192.168.1.200"
next_pooloptionalChain to another pool when exhausted
commentoptionalDescription
Examplemikrotik_create_ip_pool(name="dhcp-pool", ranges="192.168.1.100-192.168.1.200")
list · get · usedmikrotik_list_ip_pools · mikrotik_get_ip_pool · mikrotik_list_ip_pool_used

Inspect pool definitions, fetch a single pool by name, plus the live used-address table (which addresses are currently leased from a pool). list_ip_pools accepts name_filter / ranges_filter / include_used; list_ip_pool_used filters by pool_name, address_filter, mac_filter, and info_filter.

update · expandmikrotik_update_ip_pool · mikrotik_expand_ip_pool

update edits a pool's name (rename via new_name), ranges, or next-pool chain; expand appends additional ranges without disrupting existing leases.

Examplemikrotik_expand_ip_pool(name="dhcp-pool", additional_ranges="192.168.1.201-192.168.1.250")
removemikrotik_remove_ip_pool

Remove a pool. Servers using it will refuse new leases.

DHCP — Pools, Networks, Servers

Three-piece model: a pool defines the address range, a network defines gateway and DNS, and a server binds them to an interface.

6 tools
category 08
create mikrotik_create_dhcp_pool · mikrotik_create_dhcp_network · mikrotik_create_dhcp_server

Build a DHCP service for a subnet in three steps. create_dhcp_server takes name + interface (plus optional lease_time defaulting to "1d", address_pool, authoritative, …).

Example — Guest VLAN DHCPmikrotik_create_dhcp_pool(name="pool-vlan100", ranges="192.168.100.10-192.168.100.200") mikrotik_create_dhcp_network(network="192.168.100.0/24", gateway="192.168.100.1", dns_servers=["8.8.8.8", "8.8.4.4"]) mikrotik_create_dhcp_server(name="dhcp-vlan100", interface="vlan100", address_pool="pool-vlan100")
list · getmikrotik_list_dhcp_servers · mikrotik_get_dhcp_server

List all DHCP servers or fetch one by name.

removemikrotik_remove_dhcp_server

Removes a DHCP server. The underlying pool and network records survive.

DNS — Resolution & Static Records

Set upstream servers (with optional DNS-over-HTTPS), manage static A/CNAME/MX/SRV/TXT records, regex blocklists, and inspect or flush the cache. Run live test queries with mikrotik_test_dns_query.

15 tools
category 09
createmikrotik_set_dns_servers · mikrotik_add_dns_static · mikrotik_add_dns_regexp

Configure upstream resolvers, add static records, and define regex-based blocklists. set_dns_servers also accepts allow_remote_requests, cache tuning (cache_size, cache_max_ttl, max_udp_packet_size, max_concurrent_queries), and DoH options (use_doh, doh_server, verify_doh_cert). add_dns_static takes the record-type fields cname, mx_preference/mx_exchange, text, srv_priority/weight/port/target, plus ttl and regexp.

Examplemikrotik_set_dns_servers(servers=["8.8.8.8", "1.1.1.1"], allow_remote_requests=true) mikrotik_add_dns_static(name="router.local", address="192.168.1.1")
read · testmikrotik_get_dns_settings · mikrotik_list_dns_static · mikrotik_get_dns_static · mikrotik_get_dns_cache · mikrotik_get_dns_cache_statistics · mikrotik_test_dns_query

Inspect resolver settings, list or fetch static records, dump the cache and its statistics, and run a live test query.

Examplemikrotik_test_dns_query(name="example.com", server="8.8.8.8", type="A")
update · toggle · flush · exportmikrotik_update_dns_static · mikrotik_enable_dns_static · mikrotik_disable_dns_static · mikrotik_flush_dns_cache · mikrotik_export_dns_config

Edit a static record, enable/disable it without deleting, clear the resolver cache, or dump the full DNS configuration to a file.

removemikrotik_remove_dns_static
entry_idrequiredStatic record ID

Routes — Routing Table

Add static, default, and blackhole routes. Inspect active routes, check the path to a destination, dump routing tables, and read the route cache and statistics.

14 tools
category 10
createmikrotik_add_route · mikrotik_add_default_route · mikrotik_add_blackhole_route

Three flavors of route creation. add_route takes dst_address + gateway (plus optional distance, scope, routing_mark, pref_src, check_gateway, …).

Examplesmikrotik_add_default_route(gateway="192.168.1.1", distance=1) mikrotik_add_route(dst_address="10.0.0.0/8", gateway="192.168.1.254")
readmikrotik_list_routes · mikrotik_get_route · mikrotik_check_route_path · mikrotik_get_routing_table · mikrotik_get_route_cache · mikrotik_get_route_statistics

Inspect the routing table from several angles: list all, single route, traceroute-style path check, full table dump (table_name defaults to "main"), the kernel route cache, and aggregate statistics.

Examplemikrotik_check_route_path(destination="8.8.8.8")
update · toggle · flushmikrotik_update_route · mikrotik_enable_route · mikrotik_disable_route · mikrotik_flush_route_cache

Edit a route in place, toggle individual routes by ID, or flush the route cache.

removemikrotik_remove_route
route_idrequiredRouterOS route ID

Firewall — Filter Rules

Manage filter rules across the input, forward, and output chains. Includes rule ordering, enable/disable, and basic firewall scaffolding.

9 tools
category 11
create mikrotik_create_filter_rule

Creates a new firewall filter rule. Most match parameters are optional — combine them to build whatever predicate you need.

chainrequiredChain — input, forward, or output
actionrequiredaccept, drop, reject, log, jump, …
src_addressoptionalSource address / CIDR
dst_addressoptionalDestination address / CIDR
src_port · dst_portoptionalSource / destination port
protocoloptionaltcp, udp, icmp, …
in_interface · out_interfaceoptionalMatch by interface
connection_stateoptionale.g. "established,related"
src_address_list · dst_address_listoptionalNamed source / destination address lists
connection_nat_stateoptionalConnection NAT state match
tcp_flags · limitoptionalTCP flag matches; rate limit
comment · disabledoptionalDescription; create disabled
log · log_prefixoptionalEnable logging; log prefix string
place_beforeoptionalInsert before this rule ID
Example — allow SSH from LANmikrotik_create_filter_rule( chain="input", action="accept", protocol="tcp", dst_port="22", src_address="192.168.1.0/24" )
list · getmikrotik_list_filter_rules · mikrotik_get_filter_rule

List rules with optional filters (chain, action, addresses, protocol, interface, disabled/invalid/dynamic), or fetch a single rule by ID.

Examplemikrotik_list_filter_rules(chain_filter="input")
update · move · togglemikrotik_update_filter_rule · mikrotik_move_filter_rule · mikrotik_enable_filter_rule · mikrotik_disable_filter_rule

Edit a rule in place, reorder it within its chain (critical for ordered evaluation), or toggle it on/off without removing it.

Example — move rule to topmikrotik_move_filter_rule(rule_id="*1", destination=0)
removemikrotik_remove_filter_rule
rule_idrequiredRule ID
scaffoldmikrotik_create_basic_firewall_setup

Creates a sensible baseline: accept established/related, drop invalid, accept ICMP, drop everything else on input. Useful for fresh routers.

no paramsTakes no arguments
Examplemikrotik_create_basic_firewall_setup()

NAT — Translation Rules

Source-NAT (masquerade) for outbound, destination-NAT (port forwarding) for inbound, plus rule ordering and toggle.

8 tools
category 12
create mikrotik_create_nat_rule

Creates a NAT rule on the srcnat or dstnat chain.

chainrequiredsrcnat or dstnat
actionrequiredmasquerade, dst-nat, src-nat, redirect, …
to_addressesoptionalTarget address for dst-nat
to_portsoptionalTarget port(s)
protocol · dst_port · …optionalSame predicate set as firewall rules
Example — port-forward HTTPmikrotik_create_nat_rule( chain="dstnat", action="dst-nat", dst_port="80", protocol="tcp", to_addresses="192.168.100.10", to_ports="80", comment="Web server" )
list · getmikrotik_list_nat_rules · mikrotik_get_nat_rule

Inspect NAT rules — optionally filtered by chain. get returns one rule's full record.

Examplesmikrotik_list_nat_rules(chain_filter="srcnat") mikrotik_get_nat_rule(rule_id="*1")
update · move · togglemikrotik_update_nat_rule · mikrotik_move_nat_rule · mikrotik_enable_nat_rule · mikrotik_disable_nat_rule

Same edit / reorder / toggle surface as the firewall counterparts.

removemikrotik_remove_nat_rule
rule_idrequiredRule ID

WireGuard — Tunnels & Peers

Create WireGuard interfaces, add peers with allowed-IPs and endpoints, and generate ready-to-paste client configs. The interface's public key is returned by get_wireguard_interface — hand it to clients. WireGuard requires RouterOS v7+.

15 tools
category 13
createmikrotik_create_wireguard_interface

Stands up a WireGuard interface. If no private key is supplied, one is generated; read the matching public key back via get_wireguard_interface.

namerequiredInterface name, e.g. "wg0"
listen_portoptionalUDP listen port (default 13231)
private_keyoptionalAuto-generated if omitted
mtuoptionalMTU (default 1420)
comment · disabledoptionalDescription; create disabled
Examplemikrotik_create_wireguard_interface(name="wg0", listen_port=13231)
interface readmikrotik_list_wireguard_interfaces · mikrotik_get_wireguard_interface

List all WireGuard interfaces or fetch one — the latter includes the device's public key for clients to use.

interface update · toggle · removemikrotik_update_wireguard_interface · mikrotik_enable_wireguard_interface · mikrotik_disable_wireguard_interface · mikrotik_remove_wireguard_interface

Edit, toggle, or remove an interface. Removing an interface also deletes all of its peers.

peer addmikrotik_add_wireguard_peer

Attaches a peer to an interface.

interfacerequiredWireGuard interface name
public_keyrequiredPeer's public key
allowed_addressrequiredAllowed IPs for this peer
endpoint_address · endpoint_portoptionalRemote endpoint
preshared_key · persistent_keepaliveoptionalExtra security; keepalive interval
Examplemikrotik_add_wireguard_peer(interface="wg0", public_key="<peer-pubkey>", allowed_address="10.0.0.2/32")
peer readmikrotik_list_wireguard_peers · mikrotik_get_wireguard_peer

Inspect peers and their handshake state.

peer update · toggle · removemikrotik_update_wireguard_peer · mikrotik_enable_wireguard_peer · mikrotik_disable_wireguard_peer · mikrotik_remove_wireguard_peer

Edit, toggle, or remove peers. Identifiers are RouterOS peer IDs.

generatemikrotik_generate_wireguard_client_config

Produces a complete client .conf (the [Interface] / [Peer] blocks) ready to paste into a WireGuard client. This tool only formats text locally — it does not contact the router, so first use get_wireguard_interface for the server's public key and add_wireguard_peer to register the client.

client_private_keyrequiredClient's private key
client_addressrequiredClient tunnel address
server_public_keyrequiredServer's public key
server_endpointrequiredServer host / IP
server_port · allowed_ips · dns · persistent_keepaliveoptionalDefaults: 51820, 0.0.0.0/0, keepalive 25. Use allowed_ips="0.0.0.0/0, ::/0" for a full tunnel, or a specific subnet for split-tunnel.
walkthrough Setting up a WireGuard server

The single-purpose tools above compose into a full VPN server. Run them in order — steps 2–4 reach into other categories (IP address, firewall, NAT):

Ordered sequence# 1. Create the interface mikrotik_create_wireguard_interface(name="wg0", listen_port=51820) # 2. Give it a tunnel address mikrotik_add_ip_address(address="10.0.0.1/24", interface="wg0") # 3. Allow inbound WireGuard UDP mikrotik_create_filter_rule(chain="input", action="accept", protocol="udp", dst_port="51820") # 4. (optional) Masquerade clients out to the internet mikrotik_create_nat_rule(chain="srcnat", action="masquerade", out_interface="ether1") # 5. Read the server public key for clients mikrotik_get_wireguard_interface(name="wg0") # 6. Register each client as a peer mikrotik_add_wireguard_peer(interface="wg0", public_key="<client-pubkey>", allowed_address="10.0.0.2/32") # 7. Generate the client .conf mikrotik_generate_wireguard_client_config(client_private_key="<client-privkey>", client_address="10.0.0.2/24", server_public_key="<server-pubkey>", server_endpoint="203.0.113.1")

Wireless — WiFi Interfaces & Security

Manage wireless interfaces, security profiles, access lists, and scanning. Call check_wireless_support first — wireless tooling depends on the device's RouterOS wireless package.

18 tools
category 14
interface createmikrotik_create_wireless_interface

Creates / configures a wireless interface (SSID, band, channel, mode, and an attached security profile).

Examplemikrotik_create_wireless_interface(name="wlan1", ssid="HomeNet", band="2ghz-b/g/n")
interface readmikrotik_list_wireless_interfaces · mikrotik_get_wireless_interface

List wireless interfaces or fetch one's full configuration.

interface update · toggle · removemikrotik_update_wireless_interface · mikrotik_enable_wireless_interface · mikrotik_disable_wireless_interface · mikrotik_remove_wireless_interface

Edit, toggle, or remove a wireless interface.

security profilesmikrotik_create_wireless_security_profile · mikrotik_list_wireless_security_profiles · mikrotik_get_wireless_security_profile · mikrotik_set_wireless_security_profile · mikrotik_remove_wireless_security_profile

Full lifecycle for security profiles — WPA/WPA2/WPA3 modes, passphrases, encryption. set attaches a profile to an interface.

Examplemikrotik_create_wireless_security_profile(name="wpa2-home", mode="dynamic-keys", authentication_types="wpa2-psk", wpa2_pre_shared_key="SecurePass123")
scan · registrationmikrotik_scan_wireless_networks · mikrotik_get_wireless_registration_table

Scan for nearby networks (optional duration) and list currently-associated clients with signal data.

access listmikrotik_create_wireless_access_list · mikrotik_list_wireless_access_list · mikrotik_remove_wireless_access_list_entry

MAC-based allow/deny entries with optional signal-range and time constraints.

Examplemikrotik_create_wireless_access_list(interface="wlan1", mac_address="AA:BB:CC:DD:EE:FF", action="accept")
supportmikrotik_check_wireless_support

Reports whether the device's RouterOS build supports the wireless tooling. Call this first.

no paramsTakes no arguments

Queues — Traffic Shaping

Simple queues for per-target rate limits, queue trees for hierarchical policies, and queue types for the underlying discipline (CAKE, fq-codel, SFQ, RED, PCQ, …).

no mikrotik_ prefix on this category
19 tools
category 15
simple queuecreate_simple_queue · list_simple_queues · get_simple_queue · update_simple_queue · remove_simple_queue · enable_simple_queue · disable_simple_queue

Per-target rate limits — the simplest way to throttle a host or subnet. max_limit takes an upload/download pair like "10M/20M".

Example — limit a host to 10M/20Mcreate_simple_queue(name="limit-guest", target="192.168.100.0/24", max_limit="10M/20M")
queue treecreate_queue_tree · list_queue_trees · get_queue_tree · update_queue_tree · remove_queue_tree · enable_queue_tree · disable_queue_tree

Hierarchical HTB shaping. Attach to a parent, match traffic by packet_mark, set max_limit / limit_at / burst, and priority (1–8).

queue typecreate_queue_type · list_queue_types · get_queue_type · update_queue_type · remove_queue_type

Define reusable queue disciplines. kind (default cake) is one of cake, fq-codel, sfq, red, pcq, pfifo, bfifo, … each with its own tuning parameters (e.g. cake_flowmode/cake_nat/cake_overhead for CAKE, pcq_rate/pcq_classifier for PCQ, sfq_perturb for SFQ, red_* thresholds for RED). Built-in types (default, default-small, …) can't be modified or removed.

Users — Accounts, Groups & SSH Keys

Local users, groups, policies, active sessions, and SSH key management. Used to provision scoped accounts for tooling rather than sharing admin.

18 tools
category 16
createmikrotik_add_user · mikrotik_add_user_group

Create users and permission groups. Groups take a policy list (e.g. read,write,ssh).

Examplemikrotik_add_user(name="automation", password="SecurePass123", group="write")
readmikrotik_list_users · mikrotik_get_user · mikrotik_list_user_groups · mikrotik_get_user_group · mikrotik_get_active_users

Inspect users, groups, and currently-connected sessions.

update · togglemikrotik_update_user · mikrotik_enable_user · mikrotik_disable_user · mikrotik_update_user_group · mikrotik_disconnect_user

Edit users / groups, toggle accounts, or forcibly disconnect an active session.

ssh keysmikrotik_set_user_ssh_keys · mikrotik_list_user_ssh_keys · mikrotik_remove_user_ssh_key

Import a user's SSH public key (key-based auth), list installed keys, or remove one by ID.

Examplemikrotik_set_user_ssh_keys(username="automation", key_file="id_ed25519.pub")
exportmikrotik_export_user_config

Dumps the full user / group configuration to a file.

removemikrotik_remove_user · mikrotik_remove_user_group

Remove a user or a group.

Backup & Export — Configuration State

Binary backups, RouterOS .rsc exports, section dumps, file transfer, restore, and import.

10 tools
category 17
createmikrotik_create_backup · mikrotik_create_export · mikrotik_export_section

Three formats: a binary .backup (full snapshot), a .rsc export (declarative, choose rsc/json/xml and full/compact/verbose), or a single-section dump.

Examplemikrotik_create_backup(name="pre-change") mikrotik_export_section(section="/ip/firewall/filter")
readmikrotik_list_backups · mikrotik_backup_info · mikrotik_download_file

List backup files, inspect a backup's metadata, and download files off the device. download_file pulls the raw bytes over SFTP and returns them base64-encoded, so binary .backup files survive the round-trip intact alongside text .rsc exports.

restore · import · uploadmikrotik_restore_backup · mikrotik_import_configuration · mikrotik_upload_file

Restore a binary backup (pass password for an encrypted backup), import a .rsc config, or upload an arbitrary file to the device — upload_file takes base64 content and writes the decoded bytes over SFTP.

removemikrotik_remove_file

Removes any file from the device's filesystem.

Logs — System Events

Stream and analyze RouterOS logs by topic, severity, or free-text search. Pull system events and security logs, aggregate statistics, live-tail, and export to CSV.

10 tools
category 18
readmikrotik_get_logs · mikrotik_get_logs_by_severity · mikrotik_get_logs_by_topic · mikrotik_search_logs · mikrotik_get_system_events · mikrotik_get_security_logs · mikrotik_get_log_statistics

Seven lenses on the log buffer — by topic, by severity (debug/info/warning/error/critical), free-text search, system events, the security topic, or aggregate stats.

Examplesmikrotik_get_logs(topics="firewall", limit=100) mikrotik_search_logs(search_term="login failure", case_sensitive=false)
stream · exportmikrotik_monitor_logs · mikrotik_export_logs

Live-tail logs for a duration, or dump them to plain / csv.

clearmikrotik_clear_logs

Clears the in-memory log buffer. Doesn't affect file-backed logs.

Safe Mode — Atomic Sessions

RouterOS safe-mode wraps a sequence of changes; if the management session drops before you commit, every change auto-reverts. Highly recommended when editing firewall or connectivity rules remotely.

no mikrotik_ prefix on this category · no parameters
4 tools
category 19
HOW IT WORKS
enable_safe_mode opens a persistent SSH shell and sends a Ctrl+X to the router. While active, every subsequent MCP tool call is routed through that same session automatically (the connector detects it — no per-command connections). commit_safe_mode sends a second Ctrl+X, writing the pending changes to flash/NVRAM and closing the session; rollback_safe_mode simply drops the session (no Ctrl+X), so RouterOS reverts everything. Pending changes live in memory only — a router reboot, not just a dropped connection, also reverts them. Concurrent calls are serialised through an internal lock, so parallel requests are safe. With an inventory, safe mode is tracked per device — enabling it on one router leaves the others untouched.
enableenable_safe_mode

Starts a safe-mode session; afterwards every tool call runs inside the one persistent shell until you commit or roll back. Returns an Error: … string if the SSH connection fails or the router doesn't confirm the <SAFE> prompt.

no paramsTakes no arguments
commit · rollbackcommit_safe_mode · rollback_safe_mode

Persist the journaled changes, or revert them immediately. Both are no-ops when safe mode isn't active — they return "Safe mode is not active. Nothing to commit / roll back."

statussafe_mode_status

Reports whether a safe-mode session is currently active — e.g. "Safe mode is ACTIVE. Changes are pending — NOT yet persisted…" versus "Safe mode is NOT active…".

Pattern — risky firewall edit under safe modeenable_safe_mode() mikrotik_create_filter_rule(chain="input", action="drop", src_address="0.0.0.0/0") # test reachability from another window; if you're locked out, just # disconnect and the rule auto-reverts. If still reachable: commit_safe_mode()
REMEMBER
Every tool returns structured JSON. Models that don't natively support function calling can still invoke them via JSON-mode prompts — the schemas are introspectable through the MCP handshake. See the Examples page for end-to-end workflows.