mikrotik-mcp: 31 modules regrouped into 12 feature areas
1 day ago
Pull request 224 in wiresage/mikrotik-mcp regroups the 31 tool modules of scope/ into 12 feature-area packages, with tests and reference pages following the same layout. Tool names, parameters and commands do not change. The video covers the new layout, how a module registers, the evidence that nothing changed, the layout tests, the review fixes and what open pull requests need to do.
Links
Ask about this presentation
Chapters
0:00One folder of 31 modules becomes 12 feature areas
0:22Finding a tool meant scanning one long folder
0:44Now each feature area is its own package
1:14A module registers its tools by being imported
1:38The tool catalogue is identical to master
2:09Live runs on two routers match the previous release
2:35Layout tests keep the structure from decaying
2:59Review found guards that could pass while checking nothing
3:27What to know before you rebase
3:56A new tool now starts in its area
Show transcriptHide transcript
Every tool in this server used to live in one folder. This change sorts them into twelve feature areas, and the tests and reference pages move with them. A model or a user sees no difference: the same tool names, the same parameters, the same RouterOS commands. What changes is where everything lives, and that is why it is worth a few minutes.
Before, scope was a single folder with thirty one tool modules and three helpers side by side. Firewall sat next to scheduler, and backup sat next to wireless. The app file imported all of them on one line, and the smoke test kept a hand written list that had already forgotten two modules. Issue 222 asked for one package per feature area.
Firewall holds six modules, and interfaces holds six more. IP has five, and system has the info, scheduler and backup tools. Monitoring gathers logs, Netwatch and the diagnostics tools, because they all observe a device. The author says that placement is easy to change. Devices holds the inventory and safe mode. DHCP, DNS, routing, queues, users and VPN have one module each, and helpers shared by several areas live in an underscore shared package.
Each area has an init file with a one line charter and a list like this one. Importing a module is what registers its tools, so app.py now imports twelve packages, one per line, instead of thirty one modules on one line. The catch is that a module missing from this list registers nothing and fails quietly. That is why the layout tests check every area against its folder.
The author compared the tool catalogue against master in all three modes. The default server exposes 239 tools, read only mode exposes 107, and sensitive hiding mode matches too. Only the registration order differs. Every tool function, 233 of them, builds the same 570 RouterOS commands and returns the same text. Unit tests grew from 1040 to 1194 cases, and the additions are the new guards.
The wheel built from this branch also ran against two lab routers. Read only mode passed every one of its 223 steps. The main pass passed 495 of 534. The author reports that the steps that fail also fail on the previous release, 0.28.1.0, and traces them to known tool defects, not to the move. So the move adds no new failures.
A move like this can slowly come undone, so the pull request adds tests for the rules. The app file must import every area. Each area must import every module in its folder. Areas never import each other, and shared code goes in the shared package. Every tool module needs its reference page. The author broke the layout on purpose thirteen ways and watched the right test fail each time.
The reviewer, inistor, found that several of the new guards could pass without checking anything. A hasattr check could let a tool reach the real SSH connector, so every module is now patched strictly. Link checks used substring matches, so a dropped filter link hid behind the ipv6 filter link. They now compare parsed targets. A leftover cache folder no longer counts as a package, and a nested sub-folder is rejected. The reviewer broke each guard on purpose and approved.
The description lists what to expect. Every open pull request that touches the scope folder needs a rebase. Edits to moved files follow the renames, and the conflicts are mostly the import block at the top of each file. There are no compatibility imports, because nothing outside this repository imports these modules. The contributing page in the website repository still describes the old layout and needs a follow up. And old links to the moved reference pages no longer resolve.
The merge releases a patch version, and that is the one limit to keep in mind: the structure is new, and the website still needs its follow up. From now on, a new tool module goes in the package of its area and in that area's import list. If you forget, the layout test says exactly what to move or import. One folder of thirty one modules is now twelve feature areas.
Up next
2:13feat(diagnostics): ping, traceroute, torch, quick sniffer and CPU profile
@wiresage/mikrotik-mcp
5 days ago
1:41Remove IP addresses by position, ID or address
@wiresage/mikrotik-mcp
1 week ago
1:36PR 118: draw.io diagrams now live in docs/diagrams
@wiresage/mikrotik-mcp
2 weeks ago
2:01A README edit no longer publishes a release
@wiresage/mikrotik-mcp
2 weeks ago
2:28MikroTik MCP can now sign in with an SSH agent key
@wiresage/mikrotik-mcp
2 weeks ago
1:46Read-only mode for MikroTik MCP: tools that can look but not change
@wiresage/mikrotik-mcp
2 weeks ago
1:52Sensitive-hiding mode keeps router secrets away from the model
@wiresage/mikrotik-mcp
2 weeks ago
2:08Safe Mode for MikroTik MCP: try a change, then keep it or drop it
@wiresage/mikrotik-mcp
2 weeks ago
2:01Migrating the MikroTik MCP server to mcp 2.0
@wiresage/mikrotik-mcp
2 weeks ago
2:00Pull request 47: the project moves from pip to uv
@wiresage/mikrotik-mcp
2 weeks ago
1:33Fleet article and multi-device prompt examples
@wiresage/mikrotik-mcp
2 weeks ago
2:29One MikroTik MCP server, many routers
@wiresage/mikrotik-mcp
2 weeks ago
