winbox-mcp
# winbox-mcp
An MCP server that lets Claude (or any MCP client) control MikroTik RouterOS routers (v6/v7) — everything WinBox can do.
## Install
```bash
git clone https://github.com/mohammed-w-mosabeh/winbox-mcp.git
claude mcp add -s user winbox -- uv run --directory /path/to/winbox-mcp winbox-mcp
```
## Transports
`api` (8728), `api-ssl` (8729), `rest` / `rest-ssl` (v7 REST on the www port), plus SSH for `ros_cli`,
`ros_export` and SFTP file transfer.
Routers live in `~/.config/winbox-mcp/routers.json` (created by `add_router`, stored with 0600 permissions),
or set `ROS_HOST` / `ROS_USER` / `ROS_PASSWORD` for a single router.
On the router, the `api` service (or `www` for REST) and `ssh` must be enabled: `/ip service print`.
## Tools
`list_routers`, `add_router`, `remove_router`, `discover_neighbors` (MNDP), `ros_print`, `ros_add`, `ros_set`,
`ros_remove`, `ros_enable`, `ros_disable`, `ros_command` (any API command), `ros_cli` (SSH terminal),
`ros_export`, `system_overview`, `ros_ping`, `ros_backup`, `ros_file_download`, `ros_file_upload`.
Menus use API paths such as `/ip/address`, `/interface/bridge/port`, `/routing/ospf/instance`.
See also: [silab-mcp](https://github.com/mohammed-w-mosabeh/silab-mcp) — control SILAB MikroTik labs, and
push lab routers into this server with `silab_routers_to_winbox`.
## License
[MIT](LICENSE)
TDQS
Scored across 18 tools
The core RouterOS menu CRUD (ros_print/add/set/remove/enable/disable) is reasonably distinct, and router management (list/add/remove/discover) is clearly separate from device operations. However, ros_command ('run ANY command') and ros_cli ('run plain terminal commands') are supersets that overlap with nearly every other tool, leaving fuzzy boundaries for an agent deciding between ros_set, ros_command, and ros_cli for the same mutation/read.
A deliberate ros_ namespace covers most device operations with consistent verb style (ros_print, ros_add, ros_set, ros_remove, ros_enable, ros_disable). But the server-level tools (list_routers, add_router, remove_router, discover_neighbors, system_overview) drop the prefix and follow a separate verb_noun convention, so two conventions coexist in one set.
18 tools is slightly on the heavy side but each maps to a real RouterOS workflow (discovery, generic CRUD, toggles, CLI escape hatches, file transfer, backup, export). The count is well-justified by the broad domain rather than being redundant padding.
Coverage is strong: router registry management, generic menu CRUD, enable/disable, arbitrary API commands, SSH CLI, config export, binary backup, and SFTP file up/download. Minor gaps exist (no dedicated file list/delete or reboot tool), but these are reachable via ros_print, ros_remove, or ros_command, so few dead ends remain.