Mikrotik RouterOS
by @drodecker
Manage MikroTik RouterOS devices via API to view status, firewall, network config, logs, users, backups, and run custom commands across multiple devices.
clawhub install mikrotik-routerosπ About This Skill
MikroTik RouterOS Skill
description: Connect and manage MikroTik RouterOS devices via API. Supports viewing device status, firewall rules, network configuration, and executing custom RouterOS commands.
Connect and manage MikroTik RouterOS devices via API.
Features
Configuration
Option 1: TOOLS.md (Recommended)
Add device info in ~/.openclaw/workspace/TOOLS.md:
MikroTik Devices
Password format:
empty password, no password, none, or leave blankOption 2: Environment Variables
export MIKROTIK_HOST=192.168.88.1
export MIKROTIK_USER=admin
export MIKROTIK_PASS= # empty password
or
export MIKROTIK_PASS=yourpassword # with password
Priority: Environment Variables > TOOLS.md > Defaults
Usage
π Device Status
π₯ Firewall
π Network Interfaces
π DHCP
π‘ ARP Table
π WireGuard
π€ Users
π Logs
π§ Services
πΎ Backup Configuration
π§Ή Clean Storage
π API Configuration
π Traffic Statistics
π Interface Details
π·οΈ VLAN
π Bridge
π Queues/Bandwidth
π Routing
π‘οΈ System Health
π Scheduled Tasks
π‘ Neighbor Discovery
π Active Connections
π Ping Test
π‘ Network Scan
π― Custom Commands
π₯οΈ Multi-device Support
If multiple devices are configured, you can specify the device name in the command:Dependencies
File Structure
βββ SKILL.md # Skill description (this file) βββ handler.py # Command processor βββ mikrotik-api/ # API client library βββ __init__.py βββ client.py # API client βββ commands.py # Command wrappers βββ cli.py # CLI tool βββ scanner.py # Network scanner
Notes
β οΈ Security Warnings
1. Network Scan Risks
- mikrotik scan actively scans the local subnet, generating network discovery traffic.
- May trigger security alerts in production networks.
- Recommendation: Run in isolated/test networks or obtain permission from the network administrator first.
2. Credential Security
- β DO NOT save router admin passwords in plaintext in public or unencrypted TOOLS.md.
- β
Recommended: Use environment variables (MIKROTIK_HOST/MIKROTIK_USER/MIKROTIK_PASS).
- β
Recommended: Use temporary credentials for short-term sessions and delete after use.
3. Local Commands and Permissions
- scanner.py uses subprocess to call system commands (ip/hostname).
- Requires opening UDP sockets for network scanning.
- Ensure: The environment allows these operations.
Changelog
v1.8.6 (2026-03-30)
v1.8.5 (2026-03-09)
v1.8.4 (2026-03-08)
v1.8.2 (2026-03-06)
π‘ Examples
π Device Status
π₯ Firewall
π Network Interfaces
π DHCP
π‘ ARP Table
π WireGuard
π€ Users
π Logs
π§ Services
πΎ Backup Configuration
π§Ή Clean Storage
π API Configuration
π Traffic Statistics
π Interface Details
π·οΈ VLAN
π Bridge
π Queues/Bandwidth
π Routing
π‘οΈ System Health
π Scheduled Tasks
π‘ Neighbor Discovery
π Active Connections
π Ping Test
π‘ Network Scan
π― Custom Commands
π₯οΈ Multi-device Support
If multiple devices are configured, you can specify the device name in the command:βοΈ Configuration
Option 1: TOOLS.md (Recommended)
Add device info in ~/.openclaw/workspace/TOOLS.md:
MikroTik Devices
Password format:
empty password, no password, none, or leave blankOption 2: Environment Variables
export MIKROTIK_HOST=192.168.88.1
export MIKROTIK_USER=admin
export MIKROTIK_PASS= # empty password
or
export MIKROTIK_PASS=yourpassword # with password
Priority: Environment Variables > TOOLS.md > Defaults
π Tips & Best Practices
β οΈ Security Warnings
1. Network Scan Risks
- mikrotik scan actively scans the local subnet, generating network discovery traffic.
- May trigger security alerts in production networks.
- Recommendation: Run in isolated/test networks or obtain permission from the network administrator first.
2. Credential Security
- β DO NOT save router admin passwords in plaintext in public or unencrypted TOOLS.md.
- β
Recommended: Use environment variables (MIKROTIK_HOST/MIKROTIK_USER/MIKROTIK_PASS).
- β
Recommended: Use temporary credentials for short-term sessions and delete after use.
3. Local Commands and Permissions
- scanner.py uses subprocess to call system commands (ip/hostname).
- Requires opening UDP sockets for network scanning.
- Ensure: The environment allows these operations.