MikroMCP
v1.18.0MikroTik MCP server for RouterOS and SwOS: typed tools, dry-run, RBAC, audit logs, rollback.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_system_status Get System Status
Retrieve system status information from a MikroTik router including resource usage, identity, license, routerboard details, health sensors, and clock.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
sections | array | Which system information sections to include |
get_system_clock Get System Clock
Read the current date, time, and timezone from a MikroTik router. Focused single-purpose alternative to the clock section in get_system_status.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
set_system_clock Set System Clock
Set the system date, time, and/or timezone on a MikroTik router. Idempotent: returns already_set if the values already match. Supports dry-run.
| Parameter | Type | Description |
|---|---|---|
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
date | string | Date in RouterOS format: mon/dd/yyyy (e.g. jan/02/2006) |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
time | string | Time in RouterOS format: hh:mm:ss (e.g. 15:04:05) |
timeZoneName | string | IANA timezone name (e.g. Europe/London, UTC) |
reboot Reboot
Trigger a controlled router reboot with an optional delay. delay=0 reboots immediately; delay>0 adds a one-shot "mikromcp-reboot" scheduler entry on the router (calling again replaces it; remove it to cancel). Supports dry-run. Use this tool instead of run_command for reboots — run_command's deny list blocks /system reboot*.
| Parameter | Type | Description |
|---|---|---|
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
delay | integer | Seconds before rebooting (0–3600) |
dryRun | boolean | Preview the reboot without executing |
routerId | string | Router ID; omit to use the default router. |
run_command Run Command
Execute an arbitrary RouterOS console command via SSH. Guarded by an allow/deny policy (built-in deny list blocks destructive commands; tighten via cmdAllow in routers.yaml or MIKROMCP_CMD_ALLOW). Prefer dedicated tools (reboot, etc.) where available. Output capped at 4000 characters. dryRun checks the allow/deny policy only (the result says validated: policy, syntaxChecked: false): it does not check the syntax or what the command refers to, so a passing dry run does not show the command will work. Journaled for audit like every write (see list_journal), but never snapshotted: arbitrary comman…
| Parameter | Type | Description |
|---|---|---|
command * | string | RouterOS console command to execute |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview the command without executing. Checks the allow/deny policy only: not the syntax, not the names it refers to, not what a [find ...] would match |
routerId | string | Router ID; omit to use the default router. |
list_packages List Packages
List installed RouterOS packages with version and enabled status.
| Parameter | Type | Description |
|---|---|---|
name | string | Filter by package name (exact match) |
routerId | string | Router ID; omit to use the default router. |
manage_package Manage Package
Enable or disable a RouterOS package. Changes take effect only after a router reboot — use the reboot tool to apply. Idempotent: no-op if already in the target state.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Package name |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
get_upgrade_status Get Upgrade Status
Read the current RouterOS package upgrade status and routerboard firmware versions. Shows installed version, latest available version, update channel, and firmware upgrade availability.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
manage_upgrade Manage Upgrade
Trigger a RouterOS package update check or install. 'check' queries the update server for new packages. 'install' downloads and applies the update — the router will reboot automatically. Supports dry-run.
| Parameter | Type | Description |
|---|---|---|
action * | string | check — trigger a check for available updates; install — download and install the latest update (triggers reboot) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview the action without executing |
routerId | string | Router ID; omit to use the default router. |
create_backup Create Backup
Create a binary configuration backup on a MikroTik router. The backup is saved as <name>.backup on the router's filesystem. To encrypt it, prefer passwordSecret (a MIKROMCP_SECRET_<NAME> bound to the router in routers.yaml — the password never reaches the conversation) over a literal password. Dry run checks that the secret resolves.
| Parameter | Type | Description |
|---|---|---|
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview the backup without creating it |
name | string | Backup file name (without extension) |
password | string | Literal password to encrypt the backup. It stays in the conversation history; prefer passwordSecret |
passwordSecret | string | Encrypt with the server's MIKROMCP_SECRET_<NAME> value, bound to this router by its secrets list in routers.yaml. The value never reaches the conversation |
routerId | string | Router ID; omit to use the default router. |
export_config Export Config
Export the router configuration as a RouterOS script. When no file is specified, returns the script text inline. When a file is specified, saves it as <file>.rsc on the router's filesystem. Supports compact mode to show only non-default values.
| Parameter | Type | Description |
|---|---|---|
compact | boolean | Export only non-default settings (compact format) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
file | string | Save the export to a file on the router (without extension); omit to return inline |
routerId | string | Router ID; omit to use the default router. |
reload_config Reload Configuration
Re-read routers.yaml and identities.yaml without restarting the server (the same as sending it SIGHUP) and report which routers and identities were added, removed or changed, by id and field name. Both files are checked first: if either is missing or invalid, nothing changes and the error names the problem. Pooled connections and circuit breakers of changed or removed routers are dropped, so the next call connects with the new settings. Cached identity tokens are cleared, so a revoked token stops working. In HTTP mode a file with readonly or operator identities is refused unless MIKROMCP_CONFI…
| Parameter | Type | Description |
|---|---|---|
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Check both files and report what would change, without changing the running server |
list_scripts List Scripts
List RouterOS scripts on a MikroTik router. Supports optional name filter.
| Parameter | Type | Description |
|---|---|---|
name | string | Filter by script name (substring match) |
routerId | string | Router ID; omit to use the default router. |
manage_script Manage Script
Add, update, or remove a RouterOS script. Idempotent by name. add throws CONFLICT if the name already exists; update throws NOT_FOUND if it does not. Supports dry-run.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Script name — idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dontRequirePermissions | boolean | Allow script to run without elevated permissions |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
source | string | Script body (required for add and update) |
run_script Run Script
Execute a named RouterOS script. Fire-and-forget — the script runs asynchronously and its output is written to the router system log. Use get_log after calling this tool to see results.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the script to execute |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
routerId | string | Router ID; omit to use the default router. |
list_scheduled_jobs List Scheduled Jobs
List RouterOS scheduler entries on a MikroTik router with next-run time, interval, and disabled state.
| Parameter | Type | Description |
|---|---|---|
name | string | Filter by job name (exact match) |
routerId | string | Router ID; omit to use the default router. |
manage_scheduled_job Manage Scheduled Job
Add, update, remove, enable, or disable a RouterOS scheduler entry. onEvent is arbitrary RouterOS script run with the router user's policies, so this tool is destructive. Idempotent by name. add throws CONFLICT if name exists; update throws NOT_FOUND if it does not. Supports dry-run.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Job name — idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
interval | string | Run interval (e.g. 00:05:00 for every 5 minutes) |
onEvent | string | Script name or inline command to run (required on add) |
routerId | string | Router ID; omit to use the default router. |
startDate | string | Start date (e.g. jan/01/2000) |
startTime | string | Start time (e.g. 00:00:00) |
list_files List Files
List files on a MikroTik router filesystem. Supports filtering by name and type.
| Parameter | Type | Description |
|---|---|---|
name | string | Filter by file name (substring match) |
routerId | string | Router ID; omit to use the default router. |
type | string | Filter by file type (e.g. script, backup, package) |
get_file_content Get File Content
Read a text file's contents from a MikroTik router. Only suitable for text files — binary files will return garbled content.
| Parameter | Type | Description |
|---|---|---|
name * | string | Exact file name on the router (e.g. flash/script.rsc) |
routerId | string | Router ID; omit to use the default router. |
upload_file Upload File
Upload a text file to a router, overwriting any existing file of the same name. Prefers SFTP (encrypted, over SSH) and falls back to plaintext FTP if SFTP is unavailable. Requires SSH (or FTP) access for the router user. RouterOS runs a file named *.auto.rsc as a script when it arrives over FTP. Dry-run tests connectivity only.
| Parameter | Type | Description |
|---|---|---|
content * | string | File content to upload (text) |
name * | string | Target filename on the router (e.g. flash/my-script.rsc) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Validate SFTP or FTP connectivity without writing the target file |
routerId | string | Router ID; omit to use the default router. |
delete_file Delete File
Delete a file from the router filesystem by name. Idempotent: returns not_found gracefully if the file does not exist.
| Parameter | Type | Description |
|---|---|---|
name * | string | Exact file name on the router (e.g. flash/backup.backup) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview deletion without removing the file |
routerId | string | Router ID; omit to use the default router. |
list_containers List Containers
List RouterOS container instances with status, image, and network information.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
manage_container Manage Container
Create, start, stop, or remove a RouterOS container. create needs a pre-configured veth interface; start/stop are no-ops when already in the target state; remove throws NOT_FOUND when absent. Supports dry-run.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Container name — idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
envlist | string | RouterOS environment list name for container env vars |
interface | string | veth interface name to attach the container to (required on create — must be pre-configured in RouterOS) |
remoteImage | string | Docker image to pull (required on create, e.g. alpine:latest) |
rootDir | string | Root directory for container files |
routerId | string | Router ID; omit to use the default router. |
get_container_config Get Container Config
Read global container configuration: registry URL, RAM high-water mark, and veth interface.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
manage_container_config Manage Container Config
Update global container settings. Idempotent: returns no_change if nothing differs.
| Parameter | Type | Description |
|---|---|---|
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
ramHighMb | integer | RAM high-water mark in MB |
registryUrl | string | Container registry URL |
routerId | string | Router ID; omit to use the default router. |
vethInterface | string | Veth interface name for container networking |
list_container_envs List Container Envs
List container environment variable entries, optionally filtered by container name.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
name | string | Filter by container name (exact match) |
routerId | string | Router ID; omit to use the default router. |
manage_container_env Manage Container Env
Add or remove a container environment variable. Idempotent by name+key. add returns already_exists if the entry exists with the same value; throws CONFLICT if the value differs.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
key * | string | Environment variable name — part of idempotency key |
name * | string | Container name |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
value | string | Environment variable value (required for add) |
list_container_mounts List Container Mounts
List container volume mount definitions with source path, destination path, and mount name.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
name | string | Filter by mount name (exact match) |
routerId | string | Router ID; omit to use the default router. |
manage_container_mount Manage Container Mount
Add or remove a container volume mount. Idempotent by name: add returns already_exists if the mount exists with matching src/dst; throws CONFLICT if name exists with different paths.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Mount name — idempotency key |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
dst | string | Container destination path (required for add) |
routerId | string | Router ID; omit to use the default router. |
src | string | Host source path (required for add) |
list_interfaces List Interfaces
List network interfaces on a MikroTik router with optional filtering by type and status. Supports pagination and optional traffic counters.
| Parameter | Type | Description |
|---|---|---|
includeCounters | boolean | Include traffic counters (tx-byte, rx-byte, etc.) |
limit | integer | Max results to return. |
macAddress | string | Filter by MAC address (case-insensitive exact match on mac-address field) |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
status | string | Filter by running status |
type | string | Filter by interface type |
list_bridges List Bridges
List bridge interfaces and their port members on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
manage_bridge Manage Bridge Interface
Create, update, or remove a bridge interface on a MikroTik router. Idempotent: create returns already_exists if a bridge with the same name (and the requested vlanFiltering) exists, update returns no_change when nothing differs. update sets vlanFiltering, comment, disabled. Enabling vlanFiltering is the classic lock-out: before turning it on, verify the management VLAN, that the bridge itself is listed as tagged in list_bridge_vlans for every VLAN interface on the bridge, and that port PVIDs (list_bridge_ports) put the management port in the VLAN that reaches the router's address. Configure th…
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Bridge interface name, taken verbatim for update/remove; create accepts letters, digits, dot, hyphen, underscore, up to 64 chars |
comment | string | Optional comment (create/update) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
disabled | boolean | Whether the bridge is disabled (create: defaults to false; update: unchanged when omitted) |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
vlanFiltering | boolean | Turn bridge VLAN filtering on or off (create/update). Enabling it on a bridge that carries the management address can lock you out; see the tool description. |
manage_bridge_port Manage Bridge Port
Add, update, or remove an interface as a bridge port on a MikroTik router, and set its VLAN-filtering port settings (pvid, frameTypes, ingressFiltering) on add or update. Idempotent: add returns already_exists if the port exists with the requested settings (CONFLICT if they differ; use update), update returns no_change when nothing differs and NOT_FOUND when the interface is not a port of that bridge. Results warn when the bridge has vlan-filtering off (the settings have no effect yet) or on (a PVID change on the management port can cut the session).
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
bridge * | string | Bridge interface name |
interface * | string | Interface to add, update or remove as a bridge port |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
frameTypes | string | Which frames the port admits on ingress (add/update) |
ingressFiltering | boolean | Drop ingress frames for VLANs the port is not a member of (add/update) |
pvid | integer | Port VLAN ID for untagged ingress traffic, 1-4094 (add/update) |
routerId | string | Router ID; omit to use the default router. |
list_bridge_ports List Bridge Ports
List bridge port entries (interface membership, PVID, STP role and status) on a MikroTik router. Supports filtering by bridge and interface, with pagination.
| Parameter | Type | Description |
|---|---|---|
bridge | string | Only ports of this bridge |
interface | string | Only the port entry for this interface |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
list_bridge_vlans List Bridge VLANs
List the bridge VLAN table (interface/bridge/vlan) on a MikroTik router: per entry the bridge, vlan-ids, configured tagged/untagged ports, the current-tagged/current-untagged ports RouterOS actually applies, and whether it is dynamic. Filter by bridge and by a VLAN id (matched inside ranges and lists), with pagination.
| Parameter | Type | Description |
|---|---|---|
bridge | string | Only entries of this bridge |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
vlanId | integer | Only entries whose vlan-ids include this VLAN (ranges and lists are expanded) |
manage_bridge_vlan Manage Bridge VLAN
Add, update, or remove a bridge VLAN table entry (interface/bridge/vlan): which ports carry which VLANs tagged or untagged. Idempotent by bridge + vlanIds, compared as a set of ids (10,20 equals 20,10; 100-102 equals 100,101,102) with port lists compared order-insensitively: add returns already_exists when an equal entry exists and CONFLICT when it exists with different ports or overlaps another entry's VLANs; update returns no_change when nothing differs; update and remove return NOT_FOUND when no static entry has exactly those VLANs. Dynamic entries (created by RouterOS from PVIDs) are refus…
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
bridge * | string | Bridge interface name |
vlanIds * | VLAN id (1-4094), range (100-110) or comma list (10,20,100-110). With bridge, the idempotency key; order and format do not matter (20,10 equals 10,20) | |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
disabled | boolean | Whether the entry is disabled (unchanged on update when omitted) |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
tagged | array | Interfaces that carry these VLANs tagged (trunks). Include the bridge itself when the router has a VLAN interface on it. On update, replaces the list; [] clears it |
untagged | array | Interfaces that carry these VLANs untagged (access ports; set their PVID to match with manage_bridge_port). On update, replaces the list; [] clears it |
manage_vlan Manage VLAN Interface
Add, remove, enable, or disable a VLAN interface. Idempotent by name: add returns already_exists when a VLAN with matching name, vlan-id, and parent interface exists. Supports dry-run mode.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | VLAN interface name — idempotency key, taken verbatim for remove/enable/disable; add accepts letters, digits, dot, hyphen, underscore, up to 64 chars |
comment | string | Optional comment (add only) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
disabled | boolean | Whether to create the VLAN disabled (add only) |
dryRun | boolean | Preview changes without applying. |
mtu | integer | MTU size (add only) |
parentInterface | string | Parent interface name (e.g., ether1, bridge1; required for add) |
routerId | string | Router ID; omit to use the default router. |
vlanId | integer | VLAN ID (1-4094; required for add) |
list_interface_lists List Interface Lists
List all interface lists defined on the router.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
manage_interface_list Manage Interface List
Add or remove an interface list. Idempotent by name. Removing a list that has members is blocked by RouterOS — the error is surfaced as-is.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Interface list name — idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
manage_interface_list_member Manage Interface List Member
Add or remove an interface from an interface list. Idempotent by list+interface composite key. add returns already_exists if the membership exists. remove returns not_found gracefully.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
interface * | string | Interface name to add/remove — part of composite idempotency key |
list * | string | Interface list name — part of composite idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
list_interface_list_members List Interface List Members
List interface list memberships (which interface belongs to which list, e.g. WAN/LAN) on a MikroTik router. Supports filtering by list and interface, with pagination.
| Parameter | Type | Description |
|---|---|---|
interface | string | Only memberships of this interface |
limit | integer | Max results to return. |
list | string | Only members of this interface list |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
list_wifi_interfaces List WiFi Interfaces
List WiFi/wireless interfaces on a MikroTik router. Uses /interface/wifi on ROS 7.x, /interface/wireless on older versions.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
list_wifi_clients List WiFi Clients
List currently connected WiFi clients (stations) with signal strength and transfer rates.
| Parameter | Type | Description |
|---|---|---|
interface | string | Filter by WiFi interface name |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
manage_wifi_interface Manage WiFi Interface
Enable, disable, or update SSID settings on a WiFi interface. At least one of disabled or ssid must be provided.
| Parameter | Type | Description |
|---|---|---|
name * | string | WiFi interface name (e.g. wifi1, wlan1) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
disabled | boolean | Set to true to disable, false to enable |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
ssid | string | New SSID to set |
list_ip_addresses List IP Addresses
List IPv4 addresses assigned to interfaces on a MikroTik router, including dynamic ones (DHCP client, PPP). Supports filtering by interface and disabled state, with pagination.
| Parameter | Type | Description |
|---|---|---|
disabled | string | Filter by disabled state: true, false, or all |
interface | string | Only addresses on this interface |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
manage_ip_address Manage IP Address
Add, update, or remove an IP address on a MikroTik router interface. Performs idempotency checks for add operations and supports dry-run mode for all actions.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform: add, update, or remove an IP address |
address * | string | IP address with optional prefix length in CIDR notation (e.g., 192.168.1.1/24). Defaults to /32 if prefix is omitted. |
interface * | string | Interface to assign the IP address to |
comment | string | Optional comment for the IP address entry |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
disabled | boolean | Whether the IP address should be disabled |
dryRun | boolean | If true, validate and return planned changes without applying |
network | string | Network address (auto-calculated from address if omitted) |
routerId | string | Router ID; omit to use the default router. |
list_ipv6_addresses List IPv6 Addresses
List IPv6 addresses on a MikroTik router, including dynamic ones (link-local, SLAAC, DHCPv6). Shows EUI-64, router-advertisement and DHCPv6-PD pool settings. Supports filtering by interface and disabled state, with pagination.
| Parameter | Type | Description |
|---|---|---|
disabled | string | Filter by disabled state: true, false, or all |
interface | string | Only addresses on this interface |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
manage_ipv6_address Manage IPv6 Address
Add, update, or remove a static IPv6 address on a MikroTik router interface, including EUI-64 and DHCPv6-PD pool (fromPool) addresses. Idempotent by address and interface: an identical add returns already_exists, an update with nothing to change returns no_change. Addresses are compared in canonical form. Dynamic addresses are refused. Supports dry-run for all actions.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform: add, update, or remove an IPv6 address |
address * | string | IPv6 address with prefix length, e.g. 2001:db8::1/64. With eui64, a prefix such as 2001:db8:1::/64 (the interface ID is generated). With fromPool, the interface-ID suffix such as ::1/64 (the prefix co… |
interface * | string | Interface the address is assigned to |
advertise | boolean | Advertise this prefix in router advertisements (SLAAC); omit to keep RouterOS's default |
comment | string | Optional comment for the address entry |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
disabled | boolean | Whether the address should be disabled |
dryRun | boolean | If true, validate and return planned changes without applying |
eui64 | boolean | Generate the last 64 bits from the interface MAC (EUI-64); the prefix length must be 64 or shorter |
fromPool | string | IPv6 pool (e.g. one filled by DHCPv6 prefix delegation) that supplies the prefix; address then gives only the suffix |
noDad | boolean | Skip duplicate address detection; omit to keep RouterOS's default (DAD on) |
routerId | string | Router ID; omit to use the default router. |
list_ipv6_neighbors List IPv6 Neighbors
List the IPv6 neighbor table (the IPv6 counterpart of ARP) on a MikroTik router: address, MAC, interface, reachability state, and whether the neighbor is a router. Supports filtering by interface and status, with pagination.
| Parameter | Type | Description |
|---|---|---|
interface | string | Only neighbors on this interface |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
status | string | Only neighbors in this state, e.g. reachable, stale, delay, probe, failed, noarp |
list_dhcpv6_clients List DHCPv6 Clients
List DHCPv6 clients on a MikroTik router: what each requests (address and/or prefix), its status, the delegated prefix and the pool it fills, and whether it adds a default route or uses the peer's DNS. Supports filtering by interface and status, with pagination.
| Parameter | Type | Description |
|---|---|---|
interface | string | Only the client on this interface |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
status | string | Only clients in this state, e.g. bound, searching, requesting, stopped |
list_ip_pools List IP Pools
List IP address pools on a MikroTik router. Supports filtering by name and pagination.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
name | string | Filter by pool name (substring match) |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
manage_ip_pool Manage IP Pool
Add or remove an IP address pool. Idempotent by name: add returns already_exists if a pool with the same name and ranges already exists.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Pool name — idempotency key |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
nextPool | string | Next pool name for overflow |
ranges | string | IP range (e.g. '192.168.1.100-192.168.1.200'; required for add) |
routerId | string | Router ID; omit to use the default router. |
list_ip_services List IP Services
List IP services on a MikroTik router (api, api-ssl, ssh, telnet, www, www-ssl, winbox, ftp) with their port numbers and enabled/disabled status.
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | When true, return only enabled services; when false, only disabled services |
name | string | Filter by service name (api, api-ssl, ssh, telnet, www, www-ssl, winbox, ftp) |
routerId | string | Router ID; omit to use the default router. |
manage_ip_service Manage IP Service
Enable or disable a RouterOS IP service (api, api-ssl, ssh, telnet, www, www-ssl, winbox, ftp). Port number changes are intentionally not supported to prevent accidental lockout. MikroMCP reaches RouterOS through the REST API on www-ssl (or www for plaintext): disabling the service its connection uses cuts MikroMCP off from the router, including any later call to re-enable it.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform — only enable/disable to prevent accidental lockout from changing ports |
name * | string | Service name to manage (api, api-ssl, ssh, telnet, www, www-ssl, winbox, ftp) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
list_dns_entries List DNS Entries
List static DNS entries on a MikroTik router with optional filtering by name and type.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
name | string | Filter by hostname (partial match) |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
type | string | Filter by record type |
manage_dns_entry Manage DNS Entry
Add or remove a static DNS entry, found by name (case-insensitive) and type. add returns already_exists if such a record already has the requested value and disabled state (and ttl/comment, when given), and throws CONFLICT if it differs; add never creates a second record with the same name and type. remove deletes the one matching record; when several share the name (round-robin), pass address/cname/text to pick one.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Hostname for the DNS record (e.g. server.example.com); matched case-insensitively |
address | string | IP address (required for A records; on remove, picks the record when several share the name) |
cname | string | Target hostname (required for CNAME records; on remove, picks the record when several share the name) |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
disabled | boolean | Whether the entry should be disabled |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
text | string | Text value (required for TXT records; on remove, picks the record when several share the name) |
ttl | string | TTL value (e.g. 1d, 00:05:00) |
type | string | DNS record type |
get_dns_settings Get DNS Settings
Read DNS resolver configuration: upstream servers, cache size, cache TTL, and whether remote DNS requests are allowed.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
manage_dns_settings Manage DNS Settings
Update DNS resolver settings (upstream servers, cache size, cache TTL, allow-remote-requests). Idempotent: returns no_change if nothing differs.
| Parameter | Type | Description |
|---|---|---|
allowRemoteRequests | boolean | Allow router to answer DNS queries from the network |
cacheMaxTtl | string | Maximum cache TTL (e.g. '1d', '00:30:00') |
cacheSize | integer | DNS cache size in KiB |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
maxUdpPacketSize | integer | Maximum UDP packet size in bytes |
routerId | string | Router ID; omit to use the default router. |
servers | string | Comma-separated upstream DNS server IPs (e.g. '8.8.8.8,1.1.1.1') |
list_dhcp_leases List DHCP Leases
List DHCP leases on a MikroTik router with optional filtering by server, status, lease type (dynamic/static), and MAC address. Supports pagination.
| Parameter | Type | Description |
|---|---|---|
leaseType | string | Filter by lease type (dynamic or static) |
limit | integer | Max results to return. |
macAddress | string | Filter by MAC address (exact match, case-insensitive) |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
server | string | Filter by DHCP server name |
status | string | Filter by lease status |
manage_dhcp_lease Manage DHCP Lease
Convert a dynamic DHCP lease to static (make-static) or remove a lease. Idempotent by MAC address.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform: make-static converts a dynamic lease to static; remove deletes the lease |
macAddress * | string | MAC address of the lease — idempotency key (case-insensitive) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
list_dhcp_servers List DHCP Servers
List DHCP servers on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
interface | string | Filter by interface name (exact match) |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
manage_dhcp_server Manage DHCP Server
Add, remove, enable, or disable a DHCP server. Idempotent by name: add returns already_exists if a server with the same name, interface, and address pool already exists.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Server name — idempotency key |
addressPool | string | IP pool name (required for add) |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
interface | string | Interface to serve DHCP on (required for add) |
leaseTime | string | Lease duration (e.g. '1d', '12h') |
routerId | string | Router ID; omit to use the default router. |
list_dhcp_clients List DHCP Clients
List DHCP client configurations on a MikroTik router. Shows which interfaces obtain their IP via DHCP, current status, and assigned address.
| Parameter | Type | Description |
|---|---|---|
interface | string | Filter by interface or display name (exact match) |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
status | string | Filter by DHCP client status |
manage_dhcp_client Manage DHCP Client
Add, remove, enable, or disable a DHCP client on an interface. Idempotent by interface name: add returns already_exists if a DHCP client is already configured on the same interface.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
interface * | string | Interface name — idempotency key (e.g. ether1); for remove/enable/disable a client's display name also matches |
addDefaultRoute | boolean | Add default route from DHCP (add only) |
comment | string | Optional comment (add only) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
usePeerDns | boolean | Use DNS servers provided by DHCP server (add only) |
usePeerNtp | boolean | Use NTP servers provided by DHCP server (add only) |
list_routes List Static Routes
List routes on a MikroTik router (IPv4 by default, IPv6 with family=ipv6) with optional filtering by active status and dynamic status. Supports pagination.
| Parameter | Type | Description |
|---|---|---|
activeOnly | boolean | Return only active routes |
family | string | Address family: ip (IPv4, /ip/route) or ipv6 (/ipv6/route) |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
staticOnly | boolean | Return only non-dynamic routes |
manage_route Manage Static Route
Add or remove a static route on a MikroTik router, IPv4 by default or IPv6 with family=ipv6 (link-local gateways as fe80::1%ether1). Performs idempotency checks for add operations and supports dry-run mode for all actions.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform: add or remove a route |
dstAddress * | string | Destination in CIDR notation, or a plain address (auto-converted to /32 or /128), e.g. 10.0.0.0/8 or 2001:db8::/32. Must match family. |
gateway * | string | Gateway address or interface. For ipv6: a global address, a link-local address with its interface (fe80::1%ether1), or an interface name |
comment | string | Optional comment for the route |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
disabled | boolean | Whether the route should be disabled |
distance | integer | Route distance/metric (1-255) |
dryRun | boolean | If true, validate and return planned changes without applying |
family | string | Address family: ip (IPv4, /ip/route) or ipv6 (/ipv6/route) |
routerId | string | Router ID; omit to use the default router. |
routingTable | string | Routing table name (default: main). Use for policy routing with separate tables. |
list_routing_rules List Routing Rules
List policy routing rules on a MikroTik router in evaluation order. Supports filtering by table and disabled state.
| Parameter | Type | Description |
|---|---|---|
disabled | boolean | Filter by disabled state |
routerId | string | Router ID; omit to use the default router. |
table | string | Filter by routing table name |
manage_routing_rule Manage Routing Rule
Add, remove, enable, or disable a policy routing rule. Idempotent by srcAddress+dstAddress+interface+table composite key; a repeated add with an explicit, different ruleAction is a CONFLICT. Supports dry-run mode.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
table * | string | Routing table name — part of the composite idempotency key; required for all actions |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
dstAddress | string | Destination CIDR to match |
interface | string | Incoming interface to match |
priority | integer | Unsupported: RouterOS 7 /routing/rule has no priority (rules apply in list order); add rejects it |
routerId | string | Router ID; omit to use the default router. |
ruleAction | string | Rule action, add only: lookup (default; when the table has no route, later rules and main still apply) or lookup-only-in-table (no fallback) |
srcAddress | string | Source CIDR to match |
list_routing_tables List Routing Tables
List custom routing tables on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
manage_routing_table Manage Routing Table
Create or remove a custom routing table. Idempotent by table name. Supports dry-run mode.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Routing table name (idempotency key) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
fib | boolean | Whether to sync this table with the FIB |
routerId | string | Router ID; omit to use the default router. |
list_bgp_peers List BGP Peers
List BGP sessions on a MikroTik router (RouterOS 7+). Returns state, remote AS, prefix counts, and uptime.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
state | string | Filter by session state (e.g. established, active, idle) |
list_ospf_neighbors List OSPF Neighbors
List OSPF neighbors on a MikroTik router (RouterOS 7+). Returns neighbor state, interface, DR/BDR, and uptime.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
state | string | Filter by neighbor state (e.g. full, 2-way, init) |
list_vrrp_instances List VRRP Instances
List VRRP instances on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
interface | string | Filter by master interface name (exact match) |
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
manage_vrrp_instance Manage VRRP Instance
Add, remove, enable, or disable a VRRP instance. Idempotent by name: add returns already_exists if an instance with the same name, interface, and VRID already exists.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | VRRP interface name — idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
interface | string | Master interface (required for add) |
interval | integer | Advertisement interval in seconds |
priority | integer | Router priority (1–254) |
routerId | string | Router ID; omit to use the default router. |
version | string | VRRP protocol version |
vrid | integer | Virtual router ID (required for add) |
list_firewall_rules List Firewall Rules
List firewall rules from the filter, nat or raw table on a MikroTik router, IPv4 (family ip, the default) or IPv6 (family ipv6), in evaluation order. Supports filtering by chain and disabled state, with pagination.
| Parameter | Type | Description |
|---|---|---|
chain | string | Filter rules by chain name (e.g. forward, input, srcnat, prerouting) |
disabled | string | Filter by disabled state: true, false, or all |
family | string | Address family: ip (IPv4, /ip firewall) or ipv6 (/ipv6 firewall) |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
table | string | Firewall table to query: filter, nat or raw |
manage_firewall_rule Manage Firewall Rule
Add, remove, disable, enable, or move a firewall rule on a MikroTik router, in the filter, nat or raw table, IPv4 (family ip, the default) or IPv6 (family ipv6). Matches addresses, ports, protocol, interfaces, interface lists, and connection/NAT state; nat rules take toAddresses/toPorts (e.g. a dst-nat port forward), jump rules need jumpTarget, reject rules may set rejectWith. Uses comment as idempotency key for deduplication and identification: a repeated add returns already_exists only when the match, NAT targets, jump target, reject reply, and disabled state agree, otherwise CONFLICT (use e…
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform: add, remove, disable, or enable a rule (found by comment), or move a rule (by ruleId) before another |
autoRevertSeconds | integer | Dead-man switch: before the write, arm a RouterOS scheduler job that undoes it after this many seconds; it is removed once the router answers a new REST connection after the change. 0 turns it off. De… |
chain | string | Firewall chain, required except for move (e.g. input, forward, output, srcnat, dstnat; raw: prerouting, output) |
comment | string | Comment to identify the rule (used as idempotency key); omit for none |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
connectionNatState | string | Connection NAT state to match, e.g. dstnat or !dstnat |
connectionState | string | Connection-tracking states, comma-separated, optionally negated: established,related or !invalid |
destination | Where to move the rule: the .id of the rule to place it before, or end for the bottom of the table; move only | |
disabled | boolean | Whether the rule should be disabled |
dryRun | boolean | If true, validate and return planned changes without applying |
dstAddress | string | Destination address or network |
dstPort | string | Destination port or range |
family | string | Address family: ip (IPv4, /ip firewall) or ipv6 (/ipv6 firewall) |
inInterface | string | Incoming interface |
inInterfaceList | string | Incoming interface list, e.g. WAN or !LAN |
jumpTarget | string | Chain to jump to; required with ruleAction jump and rejected otherwise |
outInterface | string | Outgoing interface |
outInterfaceList | string | Outgoing interface list, e.g. WAN or !LAN |
placeBefore | string | Place the new rule before this rule ID |
protocol | string | Protocol to match; ICMP is icmp for family ip and icmpv6 for family ipv6 |
rejectWith | string | ICMP or TCP reply for ruleAction reject only. ip: icmp-network-unreachable (default), icmp-host-unreachable, icmp-port-unreachable, icmp-protocol-unreachable, icmp-network-prohibited, icmp-host-prohib… |
routerId | string | Router ID; omit to use the default router. |
ruleAction | string | RouterOS rule action, required except for move (e.g. accept, drop, reject, jump, masquerade; raw also notrack) |
ruleId | string | Rule to move, by its RouterOS .id (e.g. *1A, from the list tool); move only |
srcAddress | string | Source address or network |
srcPort | string | Source port or range |
table | string | Firewall table to manage: filter, nat or raw |
toAddresses | string | NAT target address or range (nat table only, e.g. dst-nat) |
toPorts | string | NAT target port or range (nat table only) |
list_mangle_rules List Mangle Rules
List firewall mangle rules on a MikroTik router in evaluation order, IPv4 (family ip, the default) or IPv6 (family ipv6). Supports filtering by chain, action, and disabled state.
| Parameter | Type | Description |
|---|---|---|
action | string | Filter by mangle action (e.g. mark-routing, mark-connection) |
chain | string | Filter by chain name (e.g. prerouting, forward, postrouting) |
disabled | boolean | Filter by disabled state |
family | string | Address family: ip (IPv4, /ip firewall) or ipv6 (/ipv6 firewall) |
routerId | string | Router ID; omit to use the default router. |
manage_mangle_rule Manage Mangle Rule
Add, remove, enable, disable, or move a firewall mangle rule, IPv4 (family ip, the default) or IPv6 (family ipv6). ruleAction sets the action; when it is omitted, a new* value implies its own (newRoutingMark → mark-routing), otherwise accept. Each new* value is accepted only under its action. Uses comment as idempotency key: a repeated add returns already_exists only when the chain, match fields, marks, DSCP, MSS, passthrough, and the given or implied action agree, otherwise CONFLICT. move takes ruleId and destination (a rule .id to place it before, or end) instead of comment, and returns no…
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform: add, remove, enable, or disable a rule (found by comment), or move a rule (by ruleId) before another |
chain | string | Mangle chain (required on add): prerouting, input, forward, output, postrouting |
comment | string | Idempotency key — uniquely identifies this mangle rule; required except for move |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
destination | Where to move the rule: the .id of the rule to place it before, or end for the bottom of the table; move only | |
dryRun | boolean | Preview changes without applying. |
dstAddress | string | Destination IP/CIDR to match |
dstAddressList | string | Destination address list name to match |
dstPort | string | Destination port or range |
family | string | Address family: ip (IPv4, /ip firewall) or ipv6 (/ipv6 firewall) |
inInterface | string | Incoming interface to match |
newConnectionMark | string | Connection mark to set (ruleAction mark-connection) |
newDscpValue | integer | DSCP value to set, 0–63 (ruleAction change-dscp) |
newMss | MSS to set: a number or clamp-to-pmtu (ruleAction change-mss, with protocol tcp and tcpFlags syn) | |
newPacketMark | string | Packet mark to set (ruleAction mark-packet) |
newRoutingMark | string | Routing mark to set (ruleAction mark-routing, chain prerouting or output) |
outInterface | string | Outgoing interface to match |
passthrough | boolean | Whether to continue matching subsequent rules |
protocol | string | Protocol to match (e.g. tcp, udp) |
routerId | string | Router ID; omit to use the default router. |
ruleAction | string | Mangle action, add only. Omitted: the action of the new* value given (newRoutingMark → mark-routing, newConnectionMark → mark-connection, newPacketMark → mark-packet, newDscpValue → change-dsc… |
ruleId | string | Rule to move, by its RouterOS .id (e.g. *1A, from the list tool); move only |
srcAddress | string | Source IP/CIDR to match |
srcAddressList | string | Source address list name to match |
srcPort | string | Source port or range |
tcpFlags | string | TCP flags to match, comma-separated, ! negates one (e.g. "syn"); needs protocol tcp |
list_address_list_entries List Address List Entries
List firewall address list entries on a MikroTik router, IPv4 (family ip, the default) or IPv6 (family ipv6). Supports filtering by list name and address.
| Parameter | Type | Description |
|---|---|---|
address | string | Filter by address (IP or CIDR) |
family | string | Address family: ip (IPv4, /ip firewall) or ipv6 (/ipv6 firewall) |
list | string | Filter by address list name |
routerId | string | Router ID; omit to use the default router. |
manage_address_list_entry Manage Address List Entry
Add or remove a firewall address list entry, IPv4 (family ip, the default) or IPv6 (family ipv6). Idempotent by list name + address. Supports dry-run mode.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
address * | string | IP address or CIDR to add/remove (an IPv6 address or prefix for family ipv6) |
list * | string | Address list name |
comment | string | Optional comment for the entry |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
family | string | Address family: ip (IPv4, /ip firewall) or ipv6 (/ipv6 firewall) |
routerId | string | Router ID; omit to use the default router. |
timeout | string | Expiry timeout (e.g. 1d, 2h30m) — omit for permanent |
list_wireguard_interfaces List WireGuard Interfaces
List WireGuard interfaces and their status on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
list_wireguard_peers List WireGuard Peers
List WireGuard peers with last handshake time and transfer statistics.
| Parameter | Type | Description |
|---|---|---|
interface | string | Filter by WireGuard interface name |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
manage_wireguard_peer Manage WireGuard Peer
Add or remove a WireGuard peer. Add returns already_exists when the public key and explicitly requested endpoint/allowed addresses match; different settings produce CONFLICT without changing the peer. Omitted settings are left unchanged.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
interface * | string | WireGuard interface name (e.g. wg0) |
publicKey * | string | Peer public key in base64 format (44 characters) |
allowedAddress | string | Allowed IP address/CIDR for this peer (e.g. 10.0.0.2/32) |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
endpoint | string | Add only: IPv4:port, hostname:port or [IPv6]:port (port 1–65535); hostname labels may contain underscores. Address-only IPv4/hostname/IPv6 (bare or bracketed) leaves the RouterOS port default unchan… |
routerId | string | Router ID; omit to use the default router. |
manage_wireguard_interface Manage WireGuard Interface
Add, remove, enable, or disable a WireGuard interface. Idempotent by name. RouterOS generates the private key on create — it is never passed in. The public key is returned after creation.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Interface name — idempotency key (e.g. wg0) |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
listenPort | integer | UDP listen port (RouterOS picks one if omitted) |
mtu | integer | MTU (default 1420) |
routerId | string | Router ID; omit to use the default router. |
list_ipsec_peers List IPSec Peers
List IPSec peers on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
address | string | Filter by remote address (substring match) |
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
list_ipsec_policies List IPSec Policies
List IPSec policies on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
dstAddress | string | Filter by destination address (substring match) |
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
srcAddress | string | Filter by source address (substring match) |
manage_ipsec_peer Manage IPSec Peer
Add, remove, enable, or disable an IPSec peer. Idempotent by name: add returns already_exists if a peer with the same name and address already exists.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Peer name — idempotency key |
address | string | Remote gateway address (required for add) |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
exchange | string | IKE exchange mode |
localAddress | string | Local address |
profile | string | IKE profile name |
routerId | string | Router ID; omit to use the default router. |
manage_ipsec_policy Manage IPSec Policy
Add, remove, enable, or disable an IPSec policy. Idempotent by composite key (srcAddress + dstAddress + tunnel).
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
dstAddress * | string | Destination CIDR — part of composite idempotency key |
srcAddress * | string | Source CIDR — part of composite idempotency key |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
ipsecAction | string | IPSec action (required for add) |
level | string | SA level |
routerId | string | Router ID; omit to use the default router. |
saDstAddress | string | SA destination IP for tunnel mode |
saSourceAddress | string | SA source IP for tunnel mode |
tunnel | boolean | Tunnel mode — part of composite idempotency key |
list_pppoe_clients List PPPoE Clients
List PPPoE client interfaces on a MikroTik router. Shows name, parent interface, ISP username, and connection status.
| Parameter | Type | Description |
|---|---|---|
interface | string | Filter by parent interface name (exact match) |
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
status | string | Filter by running status |
manage_pppoe_client Manage PPPoE Client
Add, update, or remove a PPPoE client interface. Idempotent by name (already_exists on matching name+interface+user; CONFLICT on differing config; no_change when an update differs in nothing). Password is always written when provided since RouterOS does not return it on GET.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | PPPoE client interface name — idempotency key (e.g. pppoe-wan) |
addDefaultRoute | boolean | Add default route via PPPoE (yes/no) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dialOnDemand | boolean | Dial on demand instead of always-on (yes/no) |
dryRun | boolean | Preview changes without applying. |
interface | string | Parent interface (required for add) |
password | string | PPPoE password (never logged) |
routerId | string | Router ID; omit to use the default router. |
serviceName | string | PPPoE service name filter (leave empty to match any) |
user | string | PPPoE username (required for add) |
list_ovpn_clients List OpenVPN Clients
List OpenVPN client interfaces on a MikroTik router. Shows name, remote server, and connection status.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
routerId | string | Router ID; omit to use the default router. |
manage_ovpn_client Manage OpenVPN Client
Add, update, or remove an OpenVPN client interface. Idempotent by name (already_exists on matching name+connectTo; CONFLICT on differing connectTo; no_change when an update differs in nothing). Password is always written when provided since RouterOS does not return it on GET.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | OpenVPN client interface name — idempotency key |
certificate | string | Client certificate name |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
connectTo | string | Remote server address (required for add) |
dryRun | boolean | Preview changes without applying. |
mode | string | Tunnel mode |
password | string | VPN password (never logged) |
port | integer | Remote port number |
protocol | string | Transport protocol |
routerId | string | Router ID; omit to use the default router. |
user | string | VPN username |
get_ovpn_server Get OpenVPN Server
Get the OpenVPN server configuration on a MikroTik router. Throws NOT_FOUND if the OpenVPN package is not installed.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
manage_ovpn_server Manage OpenVPN Server
Enable, disable, or configure the OpenVPN server (a per-router singleton). Throws NOT_FOUND if the OpenVPN package is not installed. The set action requires at least one configuration field.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
auth | string | Authentication algorithm (set action only) |
certificate | string | Server certificate name (set action only) |
cipher | string | Encryption cipher (set action only) |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
mode | string | Tunnel mode (set action only) |
port | integer | Listening port (set action only) |
protocol | string | Transport protocol (set action only) |
routerId | string | Router ID; omit to use the default router. |
list_ppp_profiles List PPP Profiles
List PPP profiles including the built-in default and default-encryption profiles.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
name | string | Filter by profile name (exact match) |
routerId | string | Router ID; omit to use the default router. |
manage_ppp_profile Manage PPP Profile
Add, update, or remove a PPP profile. Idempotent by name. update returns no_change when requested values match. Built-in profiles (default, default-encryption) cannot be removed — RouterOS blocks this and the error is surfaced.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Profile name — idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dnsServer | string | DNS server IP pushed to client |
dryRun | boolean | Preview changes without applying. |
localAddress | string | Local IP assigned to router end of PPP link |
rateLimit | string | Rate limit string (e.g. '10M/10M') |
remoteAddress | string | IP or pool name assigned to client |
routerId | string | Router ID; omit to use the default router. |
sessionTimeout | string | Session timeout duration string (e.g. '1h') |
list_users List Users
List local users on a MikroTik router. Passwords are never returned.
| Parameter | Type | Description |
|---|---|---|
group | string | Filter by group name (exact match) |
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
manage_user Manage User
Add, remove, enable, disable, or set the password for a local RouterOS user. Idempotent by name: add returns already_exists if a user with the same name and group already exists.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Username — idempotency key |
address | string | Allowed source address or range |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
group | string | Group name (required for add; e.g. 'read', 'write', 'full') |
password | string | Password (required for add and set-password) |
routerId | string | Router ID; omit to use the default router. |
list_user_groups List User Groups
List local user groups on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
manage_user_group Manage User Group
Add, update, or remove a local RouterOS user group. Idempotent by name: add returns already_exists if a group with the same name and policy already exists.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Group name — idempotency key |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
policy | string | Comma-separated policy list (e.g. 'read,write,ftp') |
routerId | string | Router ID; omit to use the default router. |
skin | string | Optional skin name for the group |
list_certificates List Certificates
List certificates on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
expired | boolean | Filter by expiry status; omit to return all |
limit | integer | Max results to return. |
name | string | Filter by certificate name (substring match) |
routerId | string | Router ID; omit to use the default router. |
manage_certificate Manage Certificate
Remove, trust, or untrust a certificate. Idempotent: trust/untrust return early if already in the target state.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Certificate name — idempotency key |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
routerId | string | Router ID; omit to use the default router. |
list_queues List Queues
List simple queues on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
target | string | Filter by target address (substring match) |
manage_queue Manage Queue
Add, remove, enable, or disable a simple queue. Idempotent by name: add returns already_exists if a queue with the same name and target already exists.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Queue name — idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
limitAt | string | Guaranteed rate (e.g. '1M/1M') |
maxLimit | string | Max upload/download limit (e.g. '10M/10M') |
routerId | string | Router ID; omit to use the default router. |
target | string | Target address (required for add; e.g. '192.168.1.0/24') |
ping Ping
Send ICMP echo requests from the router to a target address. Returns per-packet RTT and summary statistics. 100% packet loss is a valid result, not an error.
| Parameter | Type | Description |
|---|---|---|
address * | string | Target IP address or hostname to ping |
count | integer | Number of ICMP echo requests (1–20) |
routerId | string | Router ID; omit to use the default router. |
routingTable | Routing table to use for the ping | |
size | integer | Packet size in bytes (14–65535) |
traceroute Traceroute
Trace the network path from the router to a target address. Returns an ordered hop list with RTT per hop. Timeouts and partial results are valid responses. Not auto-retried.
| Parameter | Type | Description |
|---|---|---|
address * | string | Target IP address or hostname to trace |
count | integer | Probes per hop (1–5) |
maxHops | integer | Maximum number of hops (1–30) |
routerId | string | Router ID; omit to use the default router. |
torch Torch
Capture a real-time traffic snapshot on a router interface. RouterOS runs the capture for `duration` seconds; the tool returns the flows of the final update with their TX/RX rates in bits per second and packets per second. Not auto-retried.
| Parameter | Type | Description |
|---|---|---|
interface * | string | Interface name to monitor (e.g. ether1, bridge1) |
dstAddress | Filter by destination IP address | |
duration | integer | Capture duration in seconds (1–30) |
routerId | string | Router ID; omit to use the default router. |
srcAddress | Filter by source IP address |
get_log Get Log
Read and filter the system log from a MikroTik router. Supports filtering by topic, message prefix, and a time window (last N minutes) measured against the router's own clock. Entries with unparseable timestamps are included conservatively.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
offset | integer | Pagination offset. |
prefix | string | Substring to match against the log message |
routerId | string | Router ID; omit to use the default router. |
sinceMinutes | integer | Only return entries from the last N minutes (1–1440), measured against the router's clock |
topics | array | Filter entries whose topics field contains any of these strings (e.g. ["firewall", "dhcp"]) |
bandwidth_test Bandwidth Test
Run a RouterOS bandwidth test from the router to a remote host running a RouterOS btest server. Returns TX and RX throughput in Mbps. Duration capped at 20 seconds. Saturates the link — not auto-retried.
| Parameter | Type | Description |
|---|---|---|
address * | string | Remote host running RouterOS btest server |
direction | string | Test direction |
duration | integer | Test duration in seconds (max 20) |
protocol | string | Test protocol |
routerId | string | Router ID; omit to use the default router. |
fetch_url Fetch URL
Send an HTTP/HTTPS request from the router using /tool/fetch. Response body is returned inline (capped at 64 KB with [TRUNCATED] marker). Use outputFile to save to router filesystem instead. Not read-only: POSTs have side effects and outputFile writes to the router.
| Parameter | Type | Description |
|---|---|---|
url * | string | URL to fetch from the router |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
httpData | string | Request body for POST |
method | string | HTTP method |
outputFile | string | Save response body to this router file path instead of returning inline |
routerId | string | Router ID; omit to use the default router. |
list_connections List Connections
List active connection tracking entries from the router firewall table. Filters are applied client-side. Useful for diagnosing NAT and firewall behavior.
| Parameter | Type | Description |
|---|---|---|
dstAddress | string | Filter by destination address (substring match) |
limit | integer | Max results to return. |
protocol | string | Filter by protocol (exact match, e.g. tcp, udp, icmp) |
routerId | string | Router ID; omit to use the default router. |
srcAddress | string | Filter by source address (substring match) |
list_log_rules List Log Rules
List RouterOS logging rules (system/logging) with optional topic substring and action exact-match filtering.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
logAction | string | Filter by log action target (exact match on action field) |
routerId | string | Router ID; omit to use the default router. |
topics | string | Filter by topics (substring match) |
manage_log_rule Manage Log Rule
Add, remove, enable, or disable a RouterOS logging rule. Idempotent by topics+logAction (add → already_exists on match; remove → not_found handled gracefully; enable/disable throw NOT_FOUND when absent). Supports dry-run.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
logAction * | string | Log action target name (RouterOS action field) — idempotency key |
topics * | string | Log topics (e.g. firewall, system, info) — idempotency key |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
prefix | string | Optional prefix to prepend to log messages |
routerId | string | Router ID; omit to use the default router. |
list_log_actions List Log Actions
List RouterOS logging action targets (system/logging/action) with optional type filter.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
type | string | Filter by action type (exact match): memory, disk, remote, echo, email |
manage_log_action Manage Log Action
Add or remove a RouterOS logging action target. Idempotent by name. add throws VALIDATION if type is missing; returns already_exists if name found. remove returns not_found gracefully. Supports dry-run.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
name * | string | Log action name — idempotency key |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
diskFileName | string | Disk log file name without extension (for type=disk) |
dryRun | boolean | Preview changes without applying. |
remote | string | Remote syslog server address (for type=remote) |
remotePort | integer | Remote syslog server port (for type=remote) |
routerId | string | Router ID; omit to use the default router. |
type | string | Action type: memory, disk, remote, echo, email (required on add) |
get_snmp_settings Get SNMP Settings
Retrieve SNMP settings from a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
get_ntp_settings Get NTP Settings
Retrieve NTP client settings from a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
list_netwatch_entries List Netwatch Entries
List Netwatch monitoring entries on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
host | string | Filter by host (substring match) |
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
status | string | Filter by current status |
manage_netwatch_entry Manage Netwatch Entry
Add, remove, enable, or disable a Netwatch monitoring entry. Idempotent by host+port: add returns already_exists if an entry with the same host and port already exists.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
host * | string | Host to monitor — idempotency key |
comment | string | Optional comment |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
interval | string | Check interval (e.g. '1m'; default '1m') |
port | integer | TCP port (optional; ICMP if omitted) |
routerId | string | Router ID; omit to use the default router. |
timeout | string | Probe timeout (e.g. '500ms') |
list_neighbors List Neighbors
List discovered neighbors (CDP/LLDP/MNDP) on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
interface | string | Filter by interface name (substring match) |
limit | integer | Max results to return. |
routerId | string | Router ID; omit to use the default router. |
list_arp_entries List ARP Entries
List ARP table entries on a MikroTik router.
| Parameter | Type | Description |
|---|---|---|
address | string | Filter by IP address (substring match) |
interface | string | Filter by interface (substring match) |
limit | integer | Max results to return. |
macAddress | string | Filter by MAC address (substring match) |
routerId | string | Router ID; omit to use the default router. |
manage_ntp_client Manage NTP Client
Update NTP client settings on a MikroTik router. Idempotent: returns already_set if no changes are needed.
| Parameter | Type | Description |
|---|---|---|
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview changes without applying. |
enabled | boolean | Enable or disable the NTP client |
mode | string | NTP client mode |
routerId | string | Router ID; omit to use the default router. |
servers | string | Comma-separated NTP server addresses |
vlanInterface | string | VLAN interface for NTP communication |
list_swos_endpoints List SwOS Endpoints
List the SwOS/SwOS Lite '.b' API endpoints supported by this server, with the decoded field names per endpoint. Read-only schema introspection — no device call.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
get_swos_status Get SwOS Status
Retrieve status from a MikroTik SwOS switch (SwOS or SwOS Lite): identity, model, firmware, uptime, per-port link state/speed/duplex, PoE mode/state/power, and SFP modules.
| Parameter | Type | Description |
|---|---|---|
include | array | Which status endpoints to fetch |
routerId | string | Router ID; omit to use the default router. |
get_swos_endpoint Get SwOS Endpoint
Fetch and decode a single SwOS '.b' endpoint (link.b, sys.b, poe.b, lacp.b, rstp.b, snmp.b, fwd.b, vlan.b, stats.b, sfp.b, host.b, acl.b, ...) as structured data. Unknown keys are preserved under '_raw'.
| Parameter | Type | Description |
|---|---|---|
endpoint * | string | '.b' endpoint to fetch (see list_swos_endpoints) |
routerId | string | Router ID; omit to use the default router. |
write_swos_blob Write SwOS Blob
Mutate a SwOS '.b' endpoint on a MikroTik switch. The full endpoint blob is read, the given fields are merged in, and the entire blob is written back (the firmware only accepts whole-blob writes); untouched fields are re-sent byte-for-byte, and a field this firmware does not expose is refused rather than injected. dryRun defaults to true — preview first. Every result reports whether the schema has been verified against the switch's firmware. The pre-write blob is snapshotted, so the change can be undone with rollback_change. Returns no_change when the values already match. A real write to sy…
| Parameter | Type | Description |
|---|---|---|
endpoint * | string | '.b' endpoint to write |
fields * | object | Values to set, keyed by decoded field name (from list_swos_endpoints) or by a raw wire key already present in the blob — anything else is rejected. Option fields take the enum name (e.g. 'auto'); IP… |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview the resulting blob without writing to the switch. |
includeManagement | boolean | Allow a real write to sys.b that changes how the switch is reached: the live address (ip), static_ip, addr_acq or an allow_from_* setting. Refused unless true, because it can cut the session that make… |
routerId | string | Router ID; omit to use the default router. |
get_swos_config Get SwOS Config
Export a SwOS switch's configuration as one YAML document: system settings (including management access), every port's name, enabled state and VLAN settings, the VLAN table (full SwOS) and SNMP. The SNMP community is never exported. The document is the input format of apply_swos_config, so it doubles as a backup you can read and diff.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
apply_swos_config Apply SwOS Config
Apply a switch config document (the format get_swos_config exports) to a SwOS switch. Plans every change against the switch first; dryRun defaults to true. Writes only the endpoints that change: the VLAN table grows first (new VLANs and members), then the per-port settings (VLAN, isolation, storm and flood control), port names/negotiation/enabled, LAG and SNMP, then the table shrinks (removed VLANs and members), then system — so no port loses its VLAN mid-apply. Refuses management changes (address, allow-from) unless includeManagement is true, and any plan that would cut a linked port off (i…
| Parameter | Type | Description |
|---|---|---|
config * | The switch config: a YAML document (as text) or the same structure as an object. `version: 1`, then any of `system`, `ports`, `vlans`, `snmp`; only the settings it names are changed. `snmp.community`… | |
acceptLockoutRisk | boolean | Apply a plan whose warnings show a linked port being cut off (its VLAN, untagged traffic, link, isolation or LAG changing). Refused unless this is true; a dry run shows the warnings without it. |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Plan and show every change without writing to the switch. |
includeManagement | boolean | Allow changes to how the switch is reached: address acquisition, static IP and the allow-from settings. Refused unless this is true. |
pruneVlans | boolean | When the config has a `vlans` list, remove VLANs the switch has but the list does not. |
routerId | string | Router ID; omit to use the default router. |
save_swos_backup Save SwOS Backup
Download the switch's own configuration backup (backup.swb, the file the web UI's Save Backup produces) into the server's SwOS folder. The file is MikroTik's opaque format: it restores only through restore_swos_backup or the web UI, on the same model. A switch on factory defaults has nothing to save. Writes a file on the server (owner-only), so it is audited like a write.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
restore_swos_backup Restore SwOS Backup
Restore a backup.swb file from the server's SwOS folder onto the switch, as the web UI's Restore Backup does. The switch replaces its whole configuration and reboots, so it is unreachable for a while, and its address may change to the one in the backup. By default the current configuration is saved first. dryRun defaults to true.
| Parameter | Type | Description |
|---|---|---|
file * | string | Backup file in the server's SwOS folder (from save_swos_backup). |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Check the file and the switch without restoring. |
force | boolean | Restore a backup that came from another switch or model, or whose origin cannot be told (no sidecar from save_swos_backup and not named by it). |
routerId | string | Router ID; omit to use the default router. |
saveCurrentFirst | boolean | Save the switch's current backup before restoring, so the restore can be undone. |
upgrade_swos_firmware Upgrade SwOS Firmware
Upgrade a SwOS switch's firmware the way the web UI's Upgrade tab does. Resolves the latest stable version for the model from MikroTik's download server (or takes `version`), downloads swos-<board>-<version>.bin over HTTPS into the server's SwOS folder (or uses `file`), checks it, then flashes it; the switch reboots. Refuses release candidates unless allowPrerelease is true. A switch still on its preinstalled backup firmware (a version ending in 'p', which cannot save configuration) counts as needing the upgrade. dryRun defaults to true.
| Parameter | Type | Description |
|---|---|---|
allowPrerelease | boolean | Allow a release candidate or beta version. |
board | string | Firmware board name, e.g. css318g. Derived from the model when omitted. |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Resolve, download and check the firmware without flashing it. |
file | string | Use this firmware file from the server's SwOS folder instead of downloading one (offline upgrade). |
force | boolean | Flash a `board` that differs from the one derived from the switch's model. |
routerId | string | Router ID; omit to use the default router. |
version | string | Target version. Defaults to the latest stable release for this model. |
set_swos_password Set SwOS Password
Change a SwOS switch's admin password, as the web UI's Password Change does. The new password comes from the server secret MIKROMCP_PASSWORD_<newPasswordSecret>, never from the conversation; the current one is the router's configured credential. Passwords are ASCII, at most 15 characters. After the change this call's client keeps working with the new password, but the server rebuilds the client from the router's configured credential ({PREFIX}_PASS) after any authentication failure or restart, so that variable must be updated right away. On SwOS Lite the switch does not answer the change; the…
| Parameter | Type | Description |
|---|---|---|
newPasswordSecret * | string | Name of the server secret holding the new password: NAME for MIKROMCP_PASSWORD_<NAME>. The password itself never passes through the conversation, and a switch config cannot reference it. |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Check the secret and the switch without changing the password. |
routerId | string | Router ID; omit to use the default router. |
plan_changes Plan Changes
Preview a sequence of write operations: each step runs with dryRun=true against live state, returning affected paths and the predicted action per step. Also returns a planFingerprint binding the steps to the configuration they were previewed against; pass it to apply_plan to execute the same steps for real, refused if the router changed in between.
| Parameter | Type | Description |
|---|---|---|
steps * | array | Ordered list of write operations to preview (up to 10) |
routerId | string | Router ID; omit to use the default router. |
apply_plan Apply Plan
Execute write operations in order, stopping on first failure. Each step is snapshotted and journaled individually. Pass the planFingerprint from plan_changes so the plan is refused (PLAN_STATE_CHANGED) when the configuration it touches changed after the preview — this check applies to every role. Non-admin identities also need a confirmationToken (same two-step flow as other destructive tools), itself bound to the state when issued. Undo individual steps via rollback_change with the returned journal IDs.
| Parameter | Type | Description |
|---|---|---|
steps * | array | Ordered list of write operations to apply in sequence |
confirmationToken | string | |
planFingerprint | string | The planFingerprint from plan_changes. When given, apply_plan first checks that the steps are the planned ones and that the configuration each step touches is still what plan_changes saw, and refuses… |
routerId | string | Router ID; omit to use the default router. |
rollback_change Rollback Change
Restore device state to before a write, identified by its journal ID. RouterOS: reads the before-snapshot, diffs against live state, and applies the reverse. SwOS: re-POSTs the exact pre-write '.b' blob. Use dryRun=true to preview. Requires MIKROMCP_DATA_DIR (defaults to data/).
| Parameter | Type | Description |
|---|---|---|
journalId * | string | Journal entry ID from write-journal.ndjson to roll back |
confirmationToken | string | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |
dryRun | boolean | Preview the restore plan without applying changes |
routerId | string | Router ID; omit to use the default router. |
list_journal List Write Journal
List recent entries from the server's write journal (write-journal.ndjson): every journaled write with its journalId, timestamp, tool, router, parameters (as redacted at write time), snapshot ids and outcome — newest first. Read-only. Use it to recover a lost journalId for rollback_change, or to audit what was written when. Only entries with rollbackable: true can be rolled back — dry runs and writes without snapshots (run_command, plan_changes) cannot.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max entries to return |
routerId | string | Only entries for this router id |
tool | string | Only entries written by this tool |
check_router_health Check Router Health
Probe a device: RouterOS routers via system/resource, SwOS switches via sys.b. Returns health status, firmware version, uptime, and (RouterOS only) CPU load and memory info. Unlike other tools, this never throws — unreachable devices are reported as healthy=false.
| Parameter | Type | Description |
|---|---|---|
routerId | string | Router ID; omit to use the default router. |
bulk_execute Bulk Execute
Fan out a single-router tool to many routers in parallel (up to `concurrency`), targeted by routerIds or tag. Write tools need two-step confirmation for every role: call without `confirmationToken` to get a fleet token, then re-call with it. Read-only tools fan out immediately. Writes snapshot+journal each router for rollback. Returns per-router results with succeeded/failed counts. To fan out a read-only tool, prefer bulk_read.
| Parameter | Type | Description |
|---|---|---|
params * | object | Params to pass to the tool (omit routerId — injected per router) |
toolName * | string | Name of the tool to fan out (must be a single-router tool) |
concurrency | integer | Max simultaneous router calls |
confirmationToken | string | Fleet confirmation token from a prior APPROVAL_REQUIRED response. Required to fan out any write tool. |
routerIds | array | Explicit list of router IDs to target |
tags | array | Target all routers with ALL of these tags (mutually exclusive with routerIds) |
bulk_read Bulk Read
Fan out a read-only single-router tool (list_*, get_* and others annotated read-only) to many routers in parallel (up to `concurrency`), targeted by routerIds or tag. Unlike bulk_execute, the server refuses every write tool and the traffic-generating diagnostics (ping, traceroute, torch, bandwidth_test) with BULK_READ_TOOL_NOT_READ_ONLY, and never needs a confirmation token, snapshot or journal — so an MCP client can allow bulk_read without allowing fleet-wide writes. Use bulk_execute for anything else. Returns per-router results with succeeded/failed counts.
| Parameter | Type | Description |
|---|---|---|
params * | object | Params to pass to the tool (omit routerId — injected per router) |
toolName * | string | Name of the read-only single-router tool to fan out (e.g. list_interfaces) |
concurrency | integer | Max simultaneous router calls |
routerIds | array | Explicit list of router IDs to target |
tags | array | Target all routers with ALL of these tags (mutually exclusive with routerIds) |
list_routers List Routers
List the routers configured in the registry (routers.yaml): id, host, port, TLS status, tags, ROS version, and which is the default. Read-only reflection of local config — no RouterOS API call, no credentials in the response. rosVersion is what routers.yaml states and may lag a router upgrade. Once get_system_status or check_router_health has reached a router, rosVersionSeen and rosVersionSeenAt show what it reported to this server (kept in memory, so empty after a restart or a host change); ask get_system_status for the live version. Use it to discover valid routerId values and tags for tar…
| Parameter | Type | Description |
|---|---|---|
tags | array | Only return routers having any of these tags (e.g. ["edge", "prod"]) |