One MikroTik MCP server, many routers
1 hour ago
Until now, the MikroTik server talked to exactly one router. This change lets a single server manage a whole fleet. Every existing structured tool, more than 170 of them, gains an optional device argument, so the model names a router by its title and never writes raw RouterOS syntax.
Ask about this presentation
Chapters
Show transcriptHide transcript
Until now, the MikroTik server talked to exactly one router. This change lets a single server manage a whole fleet. Every existing structured tool, more than 170 of them, gains an optional device argument, so the model names a router by its title and never writes raw RouterOS syntax.
The connector picks the target before it executes anything. With one device configured, you can leave the argument out. With several, leaving it out is an error that lists the available titles, and so is an unknown title. A mistake can't silently land on another router. Matching ignores case, and the new list devices tool never returns credentials.
The inventory is a YAML file, and JSON still works because it is a subset. Each entry has a unique title, a host, and credentials. A broken inventory stops the server at startup with one clear message, and validation errors report the position and field name only, so a typo can't leak a password into a log. With no inventory, the old single-device settings still work unchanged. The Docker image mounts the file under slash config.
The first version pooled one SSH client per device. Because the inventory is a shared singleton, every session in the process shared that client, so a timeout in one session could break a command in another, and one slow handshake blocked everything. The author removed pooling. Each command opens its own connection and closes it in a finally block. Safe mode is the exception: it keeps one persistent shell per device, because RouterOS safe mode is a transaction on one session.
The proof comes late, so you know what to look for. One hundred thirty three unit tests pass. The smoke test drives the server over stdio against two live RouterOS containers, and renaming each router produced different system IDs, so the calls reached different machines. Twelve concurrent calls each reached the right router, judged by each container's own MAC address.
Two limits remain. Every command now pays a fresh SSH handshake, tens of milliseconds on a LAN and more on a distant device. And in review, Jeff pointed out that the device note repeated under every tool grows the token cost of loading the server, and asked whether it could move into the system prompt. A reviewer should start with the per-device safe mode manager and the connector, since that is where a wrong router would be reported as success. The title again: one server, many routers.
Up next
1:36PR 118: draw.io diagrams now live in docs/diagrams
@wiresage/mikrotik-mcp · 53 minutes ago
2:01A README edit no longer publishes a release
@wiresage/mikrotik-mcp · 57 minutes ago
2:28MikroTik MCP can now sign in with an SSH agent key
@wiresage/mikrotik-mcp · 1 hour ago
1:46Read-only mode for MikroTik MCP: tools that can look but not change
@wiresage/mikrotik-mcp · 1 hour ago
1:52Sensitive-hiding mode keeps router secrets away from the model
@wiresage/mikrotik-mcp · 1 hour ago
2:08Safe Mode for MikroTik MCP: try a change, then keep it or drop it
@wiresage/mikrotik-mcp · 1 hour ago
2:01Migrating the MikroTik MCP server to mcp 2.0
@wiresage/mikrotik-mcp · 1 hour ago
2:00Pull request 47: the project moves from pip to uv
@wiresage/mikrotik-mcp · 1 hour ago
1:33Fleet article and multi-device prompt examples
@wiresage/mikrotik-mcp · 1 hour ago
2:22Escape quotes, backslashes, $ and non-ASCII in text sent to RouterOS
@wiresage/mikrotik-mcp · 1 hour ago
1:58Bridge VLAN table and port PVID tools for MikroTik MCP
@wiresage/mikrotik-mcp · 1 hour ago
2:02Raw firewall tools for MikroTik MCP: 16 tools that drop traffic before connection tracking
@wiresage/mikrotik-mcp · 1 hour ago






