clr-mikrotik-mcp

v1.0.0
clr-mikrotik-mcp Checked 9 hours ago Published 3 months ago

MCP server for MikroTik RouterOS management

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mikrotik_identity

Get device identity (hostname). Args: host: Device IP or hostname (e.g. "192.168.88.1"). Returns: A dictionary containing the device identity.

ParameterTypeDescription
host *string

mikrotik_version

Get RouterOS version, CPU, memory, and uptime. Args: host: Device IP or hostname. Returns: A dictionary containing system resource information.

ParameterTypeDescription
host *string

mikrotik_health

Get device health sensors (voltage, temperature, fan speed). Args: host: Device IP or hostname. Returns: Health sensor data from the device.

ParameterTypeDescription
host *string

mikrotik_interfaces

List interfaces, optionally filtered by type. Args: host: Device IP or hostname. interface_type: Filter by type (e.g. "ether", "vlan", "bridge", "bonding"). Returns: A list of interface dictionaries.

ParameterTypeDescription
host *string
interface_type

mikrotik_addresses

List all IP addresses on the device. Args: host: Device IP or hostname. Returns: A list of IP address dictionaries.

ParameterTypeDescription
host *string

mikrotik_arp

List ARP table entries, optionally filtered by interface. Args: host: Device IP or hostname. interface: Filter by interface name (e.g. "bridge-nn-16"). Returns: A list of ARP entry dictionaries.

ParameterTypeDescription
host *string
interface

mikrotik_dhcp_leases

List DHCP leases, optionally filtered by DHCP server name. Args: host: Device IP or hostname. server: Filter by DHCP server name (e.g. "nn-16"). Returns: A list of DHCP lease dictionaries.

ParameterTypeDescription
host *string
server

mikrotik_routes

List routing table entries, optionally filtered by destination. Args: host: Device IP or hostname. dst: Filter by destination prefix (e.g. "10.20.22.0/24"). Returns: A list of route entry dictionaries.

ParameterTypeDescription
host *string
dst

mikrotik_neighbors

List discovered neighbors (LLDP/CDP/MNDP). Args: host: Device IP or hostname. Returns: A list of neighbor entry dictionaries.

ParameterTypeDescription
host *string

mikrotik_firewall

List firewall filter rules, optionally filtered by chain. Args: host: Device IP or hostname. chain: Filter by chain (e.g. "input", "forward", "output"). Returns: A list of firewall filter rule dictionaries.

ParameterTypeDescription
host *string
chain

mikrotik_nat

List NAT rules. Args: host: Device IP or hostname. Returns: A list of NAT rule dictionaries.

ParameterTypeDescription
host *string

mikrotik_users

List all user accounts on the device. Args: host: Device IP or hostname. Returns: A list of user account dictionaries.

ParameterTypeDescription
host *string

mikrotik_ssh_keys

List imported SSH public keys, optionally filtered by user. Args: host: Device IP or hostname. user: Filter by username. Returns: A list of SSH key dictionaries.

ParameterTypeDescription
host *string
user

mikrotik_services

List IP services (SSH, www, api, winbox, etc.) with status. Args: host: Device IP or hostname. Returns: A list of IP service dictionaries.

ParameterTypeDescription
host *string

mikrotik_user_add

Create a new user account on the device. Safety: refuses to create a user if one with the same name already exists, and refuses names matching the currently authenticated user. Args: host: Device IP or hostname. name: Username for the new account. group: Permission group (e.g. "read", "write", "full"). Required. password: Password for the new account. address: Source IP restriction (e.g. "192.168.88.0/24"). Empty = any. comment: Optional comment for the user account. Returns: The REST API response (created user resource).

ParameterTypeDescription
group *string
host *string
name *string
password *string
addressstring
commentstring

mikrotik_ssh_key_import

Import an SSH public key for a user. Uploads the key via SFTP, imports it via CLI, and cleans up the temp file. The user must already exist on the device. Args: host: Device IP or hostname. user: Username to import the key for (must already exist). public_key: SSH public key string (e.g. "ssh-ed25519 AAAA... comment"). Returns: CLI output from the import command.

ParameterTypeDescription
host *string
public_key *string
user *string

mikrotik_api

Execute a raw RouterOS REST API call. Covers all 401+ RouterOS API endpoints. Path must start with /. Args: host: Device IP or hostname. path: REST API path (e.g. "/interface/bridge/vlan", "/ip/pool"). method: HTTP method — GET, POST (add), PUT (set), PATCH, DELETE (remove). body: JSON body for POST/PUT/PATCH (e.g. {"address": "10.0.0.1/24", "interface": "ether1"}). proplist: Comma-separated properties to return (e.g. "name,address,interface"). Returns: Parsed JSON from the device, or an error dictionary for unsupported methods.

ParameterTypeDescription
host *string
path *string
body
methodstring
proplist

mikrotik_ssh

Execute a RouterOS CLI command via SSH. Use for commands not available via REST API: - /interface/bridge/host (FDB table on CRS switches) - print count-only, print stats - /export (full config export) - interactive monitoring commands Always append 'without-paging' for list commands. Args: host: Device IP or hostname. command: RouterOS CLI command (e.g. "/interface/bridge/host/print without-paging"). Returns: Command output as text.

ParameterTypeDescription
command *string
host *string

mikrotik_api_read

Read-only RouterOS REST API call (GET). Use ``mikrotik_api`` for non-destructive writes (POST/PUT/PATCH) and ``mikrotik_api_destructive`` for DELETE. Args: host: Device IP or hostname. path: REST API path starting with /. proplist: Comma-separated properties to return. Returns: Parsed JSON from the device.

ParameterTypeDescription
host *string
path *string
proplist

mikrotik_api_destructive

Destructive RouterOS REST API call (DELETE). Use ``mikrotik_api_read`` for GET and ``mikrotik_api`` for non-destructive writes (POST/PUT/PATCH). Args: host: Device IP or hostname. path: REST API path of the resource to delete. Returns: Parsed JSON from the device.

ParameterTypeDescription
host *string
path *string

mikrotik_ssh_read

Read-only RouterOS CLI command via SSH. Allowed verbs: print, get, getall, find, monitor, export. Use ``mikrotik_ssh`` for write commands or ``mikrotik_ssh_destructive`` for remove/reset/reboot/shutdown. Args: host: Device IP or hostname. command: RouterOS CLI command (e.g. "/interface/bridge/host/print"). Returns: Command output as text.

ParameterTypeDescription
command *string
host *string

mikrotik_ssh_destructive

Destructive RouterOS CLI command via SSH. Allowed verbs: remove, reset-configuration, reboot, shutdown. Args: host: Device IP or hostname. command: RouterOS CLI command (e.g. "/system reboot"). Returns: Command output as text.

ParameterTypeDescription
command *string
host *string