MikroTik · MCP · v4.24.0
Bun-native · MCP · RouterOS 6.x ∴ 7.x

Drive your router with words.

885 risk-annotated tools across 137 modules turn one — or a whole fleet — of MikroTik devices into something your AI can read, configure and secure in plain language. Now it watches too: attack detection from the devices' own logs, scheduled audits that report only what changed, and an offline simulator that answers "would this get through?" without touching the wire.

SCROLL
0
tools exposed
0
RouterOS modules
0
flagship workflows
0
risk tiers
New in 4.24.0

Beyond the catalog: workflows that think before they touch the wire — and that keep watching after they do.

Change Plan & Dry-Run

Preview before you break it

plan_changes scores risk and flags lock-outs; apply_plan runs it in Safe Mode, shows the exact /export diff, and commits only if the device still answers — else it auto-reverts.

+ add accept · mgmt 10.0.0.0/24 low
+ add address 10.0.0.1/24 low
remove old mgmt ip high
! drop chain=input high
Packet Capture Studio

A remote Wireshark, in the dashboard

Stream mirrored packets to your host as TZSP, decode them live — protocol mix, top talkers, a scrolling list — and export .pcap. No hardware needed.

Firewall Audit

Make the firewall legible

firewall_audit finds shadowed, overly-broad, missing-default-drop, duplicate and dead rules — IPv4 & IPv6 — risk-scored, with one-click fixes.

0
2 unreachable rules
missing default-drop
1 duplicate NAT
3 dead rules
Config Snapshots

Time-travel diff your config

Store /export snapshots on the host and diff any two — or one against the live device — to see exactly what drifted, and when.

/ip firewall filter
- add chain=input action=accept
+ add chain=input action=drop
+ add chain=input connection-state=established
/ip address
- add address=192.168.88.1/24
Discovery · MNDP · Topology

Find devices by MAC, before an IP

bun run discover lists MikroTik devices on the LAN over MNDP; the dashboard draws a live Layer-2 topology map — onboard new neighbours in a click.

Attack Detection

It reads the logs so nobody has to

Correlates brute force, credential spraying and a login that succeeded after failures into incidents with evidence — across the whole fleet, so one source hitting three routers is one story. Blocks are timed, reversible and refused when the source could be forged. Detect-only until you say otherwise.

203.0.113.7 · edge, core · confirmed
! 240 failed logins in 5 min (api, ssh)
! logged in as admin after 12 failures
+ blocked 1h · mcp-attack-block
guard: spoofable evidence never auto-blocks
Scheduled Audits

Tell me what changed, not what is

Runs the auditors on a cron with nobody in the loop and compares every run with the last. New, worsened and resolved reach you; unchanged findings stay silent — an audit that reports forty findings nightly is muted by week two.

new: SSH open to 0.0.0.0/0
worse: cert expires in 6 days
fixed: default-drop restored
18 unchanged — not reported
Config Narrative

The document that should have been in the wiki

explain_device turns a config into plain language: what the box is for, its VLANs and subnets, what each firewall chain does, and — first, because it is what people read — what is exposed to the internet. With a Mermaid topology diagram, and an honest list of what it did not recognise.

Primary role: Edge router · also Switch, Wi-Fi
! www reachable from anyone (port 80)
VLAN 40 guest · 192.0.2.0/24 · DHCP
+ forward chain ends in drop
not covered: /queue/tree, /tool/netwatch
Offline Simulator

Would this packet get through?

Trace a hypothetical packet through NAT, routing and the firewall against a snapshot — no device in the loop. When it meets something it does not model it reports UNKNOWN rather than guessing, which is the only way a simulator earns trust.

tcp 10.10.0.9:5001 → 203.0.113.5:443
+ dstnat: no match
+ route: 0.0.0.0/0 via ether1
+ forward #2 accept (established)
verdict: ACCEPT · decided by filter/forward #2
Config Studio

Edit the config, safely, in the browser

A schema-aware JSON editor with autocomplete and validation, per-device connection tests, and a safe-apply that auto-reverts if it locks you out.

The surface

885 tools. 137 modules.
Fourteen domains.

Scroll to traverse

What it does

One safe choke point. Hundreds of scopes. Zero string concatenation.

Transactional Safe Mode

Push changes through RouterOS Safe Mode's persistent session — a broken config rolls back instead of locking you out of the box.

// safe-mode.ts

Injection-safe by design

Every device command is assembled with a typed Cmd builder and quoteValue escaping — even control chars and newlines never reach the SSH channel raw.

// routeros.ts

Reach by MAC, no IP

MAC-Telnet (Layer-2, UDP 20561) reaches a router with a wrong, missing or unroutable IP — the classic provisioning & recovery case — behind the same tool surface.

// mac-telnet/

Fleet-aware

Manage many routers from one server. Tools auto-expose a device selector and the registry peels it off before your handler runs — configure both ends of a tunnel in one chat.

// runtime.ts

Live observability

An opt-in localhost dashboard streams every tool call in real time — latency, errors, per-device health, a topology map, packet capture and an editable config studio.

// dashboard.ts

Anywhere transport

stdio, SSE and streamable-HTTP — with CORS and a read-only mode for safe public exposure, plus a self-contained Docker image and MCP App UI views.

// cli.ts
Watch it work

Twenty-five screens that show what the AI just did to your router.

mikrotik-mcp serve --dashboard opens a localhost UI on port 9090 that records every tool call as it happens — inputs, outputs, latency, target device, risk — with every secret redacted before it is ever stored. Off by default. Zero overhead until you flip it on.

127.0.0.1:9090 live · ws

    Every screen in the box

    Tap any frame for the full-height capture
    Anatomy of a call

    How one natural-language request reaches the wire.

    01
    Intent

    LLM

    Picks a tool by its description — “block SSH from the WAN” becomes a single typed call.

    prompt
    02
    Gate

    registry

    Auto-injects the device, then validates against a five-tier risk preset before anything runs.

    risk · gate
    03
    Build

    Cmd

    A typed builder + quoteValue escape every argument — control chars and newlines never reach the channel raw.

    quote · build
    04
    Wire

    RouterOS

    One choke point — executeMikrotikCommand — funnels it to the device, Safe-Mode aware.

    SSH · MAC-Telnet
    tool call · the model picks a tool by its description
    v4.24.0 · MIT

    Configuration
    as conversation.

    Point any MCP client at your MikroTik and start talking. Bun ≥ 1.3 · RouterOS 6.x ∴ 7.x · SSH or MAC-Telnet.

    Get it on npm Read the docs