@usex/mikrotik-mcp 4.23.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +350 -284
  2. package/dist/cli.js +1870 -566
  3. package/dist/index.d.ts +57 -0
  4. package/dist/index.js +1 -1
  5. package/dist/shared/{library-2144zr9f.js → cli-2dj736ma.js} +33920 -22075
  6. package/dist/shared/{cli-p673815b.js → cli-vvy7yfyg.js} +1 -1
  7. package/dist/shared/{cli-tssmr7sb.js → library-13dhfdnq.js} +29455 -18578
  8. package/dist/shared/{library-8f4pbp0x.js → library-syt5fmtj.js} +1 -1
  9. package/dist/ui/aaa.html +1 -1
  10. package/dist/ui/connected-devices.html +1 -1
  11. package/dist/ui/dashboard.html +1 -1
  12. package/dist/ui/firewall-audit.html +1 -1
  13. package/dist/ui/firewall.html +1 -1
  14. package/dist/ui/interfaces.html +1 -1
  15. package/dist/ui/observability.html +70 -62
  16. package/dist/ui/records.html +1 -1
  17. package/package.json +12 -11
  18. package/policies/baseline.yaml +180 -0
  19. package/prompts/backup-and-document.md +28 -18
  20. package/prompts/build-tunnel-transactionally.md +74 -0
  21. package/prompts/fleet-rollout.md +68 -0
  22. package/prompts/setup-traffic-flow.md +68 -0
  23. package/schemas/README.md +1 -1
  24. package/schemas/config.schema.json +367 -4
  25. package/schemas/tool-catalog.json +3044 -1152
  26. package/schemas/tools/abort_rollout.json +17 -0
  27. package/schemas/tools/abort_transaction.json +17 -0
  28. package/schemas/tools/add_alert_rule.json +45 -0
  29. package/schemas/tools/add_ipv6_route.json +1 -1
  30. package/schemas/tools/add_route.json +3 -2
  31. package/schemas/tools/add_schedule.json +50 -0
  32. package/schemas/tools/add_script.json +1 -1
  33. package/schemas/tools/add_traffic_flow_target.json +36 -0
  34. package/schemas/tools/add_transaction_step.json +21 -0
  35. package/schemas/tools/analyze_flows.json +25 -0
  36. package/schemas/tools/begin_transaction.json +109 -0
  37. package/schemas/tools/block_attacker.json +22 -0
  38. package/schemas/tools/check_policy_snapshot.json +20 -0
  39. package/schemas/tools/commit_transaction.json +13 -0
  40. package/schemas/tools/configure_attack_response.json +12 -0
  41. package/schemas/tools/diff_explanations.json +24 -0
  42. package/schemas/tools/explain_device.json +22 -0
  43. package/schemas/tools/explain_policy_finding.json +17 -0
  44. package/schemas/tools/explain_rule_reachability.json +18 -0
  45. package/schemas/tools/explain_section.json +32 -0
  46. package/schemas/tools/export_policy_report.json +22 -0
  47. package/schemas/tools/flow_top_talkers.json +31 -0
  48. package/schemas/tools/get_alert_history.json +26 -0
  49. package/schemas/tools/get_attack_incident.json +13 -0
  50. package/schemas/tools/get_audit_timeline.json +24 -0
  51. package/schemas/tools/get_device_capabilities.json +7 -0
  52. package/schemas/tools/get_traffic_flow_settings.json +7 -0
  53. package/schemas/tools/list_alert_rules.json +7 -0
  54. package/schemas/tools/list_attack_incidents.json +27 -0
  55. package/schemas/tools/list_attack_responses.json +20 -0
  56. package/schemas/tools/list_policies.json +17 -0
  57. package/schemas/tools/list_schedules.json +12 -0
  58. package/schemas/tools/list_traffic_flow_targets.json +7 -0
  59. package/schemas/tools/mute_alert_rule.json +18 -0
  60. package/schemas/tools/plan_rollout.json +95 -0
  61. package/schemas/tools/refresh_device_capabilities.json +7 -0
  62. package/schemas/tools/remove_alert_rule.json +13 -0
  63. package/schemas/tools/remove_schedule.json +13 -0
  64. package/schemas/tools/remove_traffic_flow_target.json +13 -0
  65. package/schemas/tools/rollout_status.json +12 -0
  66. package/schemas/tools/run_policy_check.json +12 -0
  67. package/schemas/tools/run_schedule_now.json +13 -0
  68. package/schemas/tools/scan_for_attacks.json +21 -0
  69. package/schemas/tools/set_traffic_flow_settings.json +28 -0
  70. package/schemas/tools/simulate_change.json +72 -0
  71. package/schemas/tools/simulate_packet.json +53 -0
  72. package/schemas/tools/simulate_suite.json +71 -0
  73. package/schemas/tools/start_flow_collector.json +14 -0
  74. package/schemas/tools/start_rollout.json +98 -0
  75. package/schemas/tools/stop_flow_collector.json +7 -0
  76. package/schemas/tools/test_alert_channel.json +14 -0
  77. package/schemas/tools/unblock_attacker.json +20 -0
  78. package/schemas/tools/update_alert_rule.json +41 -0
  79. package/schemas/tools/update_route.json +3 -2
  80. package/schemas/tools/validate_policy_file.json +16 -0
  81. package/schemas/tools/verify_transaction.json +13 -0
package/README.md CHANGED
@@ -1,28 +1,26 @@
1
1
  <div align="center">
2
2
  <img src="assets/logo.svg" alt="@usex/mikrotik-mcp" width="440" />
3
- <p><strong>A Bun-native MCP server that turns one or more MikroTik routers into 819 tools your AI can drive.</strong><br/>
4
- Firewall · routing · DHCP/DNS · wireless · QoS · and a complete VPN suite over SSH, with transactional Safe Mode.</p>
3
+ <p><strong>Drive one or more MikroTik routers in plain language — 885 risk-annotated tools your AI can call, over SSH.</strong><br/>
4
+ Firewall · routing · DHCP/DNS · wireless · QoS · a complete VPN suite · transactional Safe Mode · live attack detection · and an observability dashboard that watches every call.</p>
5
5
 
6
6
  <p>
7
7
  <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-7C3AED.svg"></a>
8
8
  <img alt="Runtime: Bun" src="https://img.shields.io/badge/runtime-Bun%20%E2%89%A5%201.3-06B6D4.svg">
9
9
  <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-strict-6366F1.svg">
10
- <img alt="MCP" src="https://img.shields.io/badge/MCP-819%20tools-1F2937.svg">
10
+ <img alt="MCP" src="https://img.shields.io/badge/MCP-885%20tools-1F2937.svg">
11
11
  <a href="docs/"><img alt="Docs" src="https://img.shields.io/badge/docs-reference-7C3AED.svg"></a>
12
12
  </p>
13
13
  </div>
14
14
 
15
15
  ---
16
16
 
17
- `@usex/mikrotik-mcp` exposes **MikroTik RouterOS** as **819 [Model Context Protocol](https://modelcontextprotocol.io)
18
- tools across 111 modules**, so an AI client (Claude Desktop, Claude Code, any MCP
19
- client) can read and configure your router in plain language. It speaks to the
20
- device over **SSH** — no agent, no API package to install on RouterOS — runs on
21
- **[Bun](https://bun.sh)**, and validates every tool call against a Zod schema.
17
+ `@usex/mikrotik-mcp` turns **MikroTik RouterOS** into **885 [Model Context Protocol](https://modelcontextprotocol.io)
18
+ tools** any MCP client (Claude Desktop, Claude Code, Cursor, …) can call to read and
19
+ configure your router by talking to it. It reaches the device over **plain SSH** — no
20
+ agent, no package to install on RouterOS — runs on **[Bun](https://bun.sh)**, and
21
+ validates every call against a schema.
22
22
 
23
- Every tool is **risk-annotated** (read / write / destructive) so clients can gate
24
- what runs, and risky changes can be wrapped in **Safe Mode** — RouterOS holds them
25
- in memory and auto-reverts if your session drops, so you can't lock yourself out.
23
+ Point it at a router and go:
26
24
 
27
25
  ```jsonc
28
26
  // claude_desktop_config.json
@@ -40,64 +38,68 @@ in memory and auto-reverts if your session drops, so you can't lock yourself out
40
38
  }
41
39
  ```
42
40
 
41
+ Then just ask:
42
+
43
43
  > _"Show me the firewall input chain, then block SSH from the WAN under safe mode."_
44
44
  > _"Build an IKEv2 site-to-site tunnel to 203.0.113.5 for 192.168.20.0/24."_
45
45
  > _"Why can't VLAN 50 reach the internet?"_
46
46
 
47
- ## Why it's different
48
-
49
- - 🧰 **Breadth** 819 tools covering the whole device: L2 (bridge, VLAN, wireless,
50
- PoE), L3 (addressing, routing, DHCP, DNS), security (firewall, NAT, address-lists,
51
- certificates), QoS (queues), and system ops (users, logs, backups, scheduler).
52
- - 🔐 **A complete VPN suite** — WireGuard, IPsec (IKEv1/IKEv2), L2TP, PPTP, SSTP,
53
- OpenVPN, plus GRE/IPIP/EoIP/VXLAN tunnels. With a `choose-vpn-solution` prompt
54
- that picks the right one for you. See the **[VPN guide](docs/vpn-guide.md)**.
55
- - 🛟 **Safe Mode** — a real transactional window (`enable_safe_mode` →
56
- changes `commit_safe_mode`/`rollback_safe_mode`) backed by a persistent SSH
57
- session. Auto-reverts on disconnect.
58
- - 🚦 **Risk-annotated tools** — `readOnlyHint` / `destructiveHint` let clients
47
+ ## Highlights
48
+
49
+ - 🧰 **885 tools, one per RouterOS scope** L2 (bridge, VLAN, wireless, PoE),
50
+ L3 (addressing, routing, DHCP, DNS), security (firewall, NAT, address-lists,
51
+ certificates), QoS, and system ops (users, logs, backups, scheduler).
52
+ - 🛡️ **Attack detection** — reads every device's log, correlates brute force,
53
+ credential spraying and _a login that succeeded after failures_ into incidents with
54
+ evidence, and can block the source with a timed, reversible entry. Detect-only until
55
+ you say otherwise. [→](docs/attack-detection.md)
56
+ - ⏱️ **Scheduled audits** run the auditors on a cron with nobody in the loop, and
57
+ hear only about what **changed** since the last run: new, worsened, resolved.
58
+ [→](docs/scheduled-audits.md)
59
+ - 📖 **`explain_device`** — turns a config into the architecture document that should
60
+ have been in the wiki (topology diagram, what's exposed, what each chain does), and
61
+ explains what the difference between two snapshots actually _means_.
62
+ [→](docs/config-narrative.md)
63
+ - 🧪 **Offline simulator** — trace a hypothetical packet through NAT, routing and
64
+ firewall against a snapshot, with no device in the loop. Reports UNKNOWN rather than
65
+ guessing. [→](docs/simulator.md)
66
+ - 📊 **Live observability dashboard** — a localhost web UI that shows **every tool
67
+ call the AI makes** in real time: inputs, outputs, latency, errors, per-device
68
+ analytics. Secrets redacted. [Jump to it ↓](#-observability-dashboard)
69
+ - 🔐 **Complete VPN suite** — WireGuard, IPsec (IKEv1/IKEv2), L2TP, PPTP, SSTP,
70
+ OpenVPN, plus GRE/IPIP/EoIP/VXLAN. A `choose-vpn-solution` prompt picks one for you.
71
+ - 🛟 **Safe Mode** — wrap risky changes in a real transactional window; RouterOS
72
+ holds them in memory and **auto-reverts if your session drops**, so you can't lock
73
+ yourself out.
74
+ - 🚦 **Risk-annotated** — every tool is tagged read / write / destructive, so clients
59
75
  auto-approve reads and prompt on writes.
60
- - 🧱 **Injection-safe by construction** — a command builder quotes/escapes every
61
- value, so a hostname like `LAN; /system reset` can never split into a second
62
- command.
63
- - 🖧 **Multiple devices** define named routers and the AI targets one per call
64
- (a validated `device` argument). Configure **both ends of a tunnel** from one
65
- conversation. See **[docs/multi-device.md](docs/multi-device.md)**.
66
- - 🪜 **SSH jump hosts** — reach a router with no exposed port by tunnelling
67
- through another via `jumpVia` (ProxyJump/bastion) — commands, Safe Mode and
68
- file upload all ride the hop. No new WAN port.
69
- - **Connection pooling** one persistent SSH session per device, reused
70
- across tool calls. Saves ~200-500 ms handshake per command (double through
71
- jump hosts). Idle connections auto-close after 30 s.
72
- - 🤖 **Guided prompts** — 9 built-in workflows (harden, diagnose, guest Wi-Fi, VPNs,
73
- cross-device tunnels, backup & document) that turn an intent into tool calls.
74
-
75
- ## Quickstart
76
+ - 🧱 **Injection-safe** — a command builder quotes/escapes every value; a hostname
77
+ like `LAN; /system reset` can never split into a second command.
78
+ - 🖧 **Multiple devices** — name your routers and target one per call; configure
79
+ **both ends of a tunnel** in one conversation.
80
+ - 🪜 **SSH jump hosts** reach a router with no exposed port by tunnelling through a
81
+ bastion (`jumpVia`); commands, Safe Mode and file upload all ride the hop.
82
+ - **Connection pooling** — one persistent SSH session per device saves ~200-500 ms
83
+ per command.
84
+ - 🔀 **REST API, opt-in** point a device at RouterOS 7.9+'s `/rest` for structured
85
+ JSON and real HTTP status codes, with automatic SSH fallback for anything REST
86
+ can't express. Per-device, off by default.
87
+
88
+ ## Install
76
89
 
77
90
  ```bash
78
- # 1. Install (requires Bun ≥ 1.3 — https://bun.sh)
91
+ # Requires Bun ≥ 1.3 — https://bun.sh
79
92
  bun add -g @usex/mikrotik-mcp
80
93
 
81
- # 2. Point it at your router and verify SSH connectivity
94
+ # Point it at your router and verify SSH connectivity
82
95
  MIKROTIK_HOST=192.168.88.1 MIKROTIK_USERNAME=admin MIKROTIK_PASSWORD=•••• \
83
96
  mikrotik-mcp auth-check
84
97
 
85
- # 3. List the catalog (name · risk · title)
86
- mikrotik-mcp tools
87
-
88
- # 4. Run it (stdio by default — wire it into your MCP client)
98
+ # Wire it into your MCP client (stdio by default)
89
99
  mikrotik-mcp serve
90
100
  ```
91
101
 
92
- **Try it without an AI client** open the official [MCP Inspector](docs/inspector.md)
93
- against the server (from source):
94
-
95
- ```bash
96
- bun run inspect # opens the Inspector UI to browse/run all 819 tools
97
- ```
98
-
99
- **Prefer SSH keys over a password?** Point the server at a key file instead — and
100
- add a passphrase if the key is encrypted:
102
+ Prefer **SSH keys**? Swap the password for a key file (add a passphrase if it's encrypted):
101
103
 
102
104
  ```bash
103
105
  MIKROTIK_HOST=192.168.88.1 MIKROTIK_USERNAME=admin \
@@ -106,66 +108,48 @@ MIKROTIK_KEY_PASSPHRASE=•••• \
106
108
  mikrotik-mcp auth-check # prints "Auth mode: SSH key"
107
109
  ```
108
110
 
109
- The key (file via `--key-filename` or inline PEM via `--private-key`) takes
110
- precedence over a password. Full configuration reference:
111
- **[docs/configuration.md](docs/configuration.md)**.
112
-
113
- ### From source
111
+ Prefer a **one-click bundle** (no Bun/Node/npm on the machine, credentials entered in
112
+ the host UI)? Build an `.mcpb` and drag it into Claude Desktop → Settings → Extensions:
114
113
 
115
114
  ```bash
116
- git clone https://github.com/mikrotik-mcp/mikrotik-mcp && cd mikrotik-mcp
117
- bun install
118
- bun run start # serve from source
119
- bun run build # bundle to dist/
115
+ bun run build:mcp # bundle for this machine
116
+ bun run build:mcp --target linux-x64 # or one target · build:mcp:all for every target
120
117
  ```
121
118
 
122
- ### As an MCP Bundle (`.mcpb`)
119
+ Full options: **[docs/configuration.md](docs/configuration.md)** · MCPB details:
120
+ **[docs/getting-started.md](docs/getting-started.md)**.
123
121
 
124
- A one-click install for Claude Desktop and other MCPB hosts no Bun, Node or npm
125
- needed on the machine, and the router credentials are entered in the host's UI
126
- rather than a shell.
122
+ ## Simple usageby scenario
127
123
 
128
- ```bash
129
- bun run build:mcp # bundle for this machine
130
- bun run build:mcp --target linux-x64 # or one specific target
131
- bun run build:mcp:all # every target
132
- ```
124
+ Once the server is wired into your client, everything below is a **plain-language
125
+ request**. The AI picks the right tool, validates it, and runs it. No CLI syntax to memorize.
133
126
 
134
- Bundles land in `dist-mcpb/` as `mikrotik-mcp-<version>-<platform>-<arch>.mcpb`.
135
- Open one with your MCPB host (on Claude Desktop, drag it onto Settings →
136
- Extensions) and fill in the router address and credentials it prompts for.
127
+ ### 🔎 See what's on the router
137
128
 
138
- Because the server is Bun-native `bun:sqlite`, `Bun.serve`, `Bun.S3Client`, and
139
- `@tikoci/centrs`, which ships raw TypeScript it cannot run on the Node runtime an
140
- MCPB host provides. Each bundle therefore **vendors the Bun binary it was built
141
- against** and runs `runtime/bun dist/cli.js serve`, so every subsystem (MAC-Telnet,
142
- the dashboard, S3 backups) behaves exactly as it does from source. That costs about
143
- 60 MB per bundle and makes each one platform-specific — hence one artifact per
144
- platform/arch rather than a single universal file.
129
+ > _"List the firewall filter rules and flag anything that allows WAN → LAN."_
130
+ > _"What DHCP leases are active right now?"_
131
+ > _"Show interface traffic and tell me which port is saturated."_
145
132
 
146
- The build stages the bundle, validates the manifest, and drives the staged server
147
- over stdio (`initialize` + `tools/list`, asserting the tool count matches the
148
- manifest) before packing. Pass `--no-smoke` to skip that last check.
133
+ All read-only safe to auto-approve.
149
134
 
150
- ## The tool catalog
135
+ ### 🧱 Make a change, safely
151
136
 
152
- **819 tools across 111 modules.** Full, always-current reference (parameters +
153
- risk per tool) is generated from source: **[docs/tools-reference.md](docs/tools-reference.md)**.
137
+ > _"Enable safe mode, block inbound SSH on the WAN, then commit if I'm still connected."_
154
138
 
155
- | Group | Tools | Modules |
156
- | ------------------------ | ----: | ---------------------------------------------------------------------------------------------------------- |
157
- | **Interfaces** | 41 | interfaces, VLAN, bridge, wireless, PoE |
158
- | **Addressing & Routing** | 46 | IP addresses, IP pools, routing, DHCP, DNS |
159
- | **Dynamic Routing** | 99 | router-id, settings, tables, rules, next-hops, filters, BFD, BGP, OSPF, RIP, PIM-SM, IGMP proxy, GMP, RPKI |
160
- | **Security** | 34 | firewall filter, NAT, address-lists, certificates, IP services |
161
- | **VPN & Tunneling** | 96 | WireGuard, IPsec, PPP, L2TP, PPTP, SSTP, OpenVPN, GRE/IPIP/EoIP/VXLAN |
162
- | **QoS** | 19 | queue types, queue trees, simple queues |
163
- | **System & Ops** | 102 | system, network tools, scheduler/scripts, users, logs, backup, Safe Mode |
139
+ Safe Mode holds the change in memory and reverts automatically if you lock yourself out:
140
+
141
+ ```text
142
+ enable_safe_mode (make changes) → commit_safe_mode # persist
143
+ rollback_safe_mode # discard
144
+ ```
164
145
 
165
- ## VPN & tunneling expert coverage
146
+ ### 🔐 Stand up a VPN
166
147
 
167
- Every MikroTik VPN technology, modeled the way RouterOS actually layers them (the
168
- PPP-based VPNs share one `/ppp` backend for users and addressing):
148
+ > _"Create a WireGuard interface on port 13231 and generate a client config for my laptop."_
149
+ > _"Build an IKEv2 site-to-site tunnel to 203.0.113.5 for 192.168.20.0/24."_
150
+
151
+ Not sure which VPN? Ask the **`choose-vpn-solution`** prompt — it recommends one and
152
+ outlines the build. Every technology is covered:
169
153
 
170
154
  | Need | Use | Build it with |
171
155
  | ----------------------------------- | ----------------------- | -------------------------------------------------------------------------------------- |
@@ -173,17 +157,15 @@ PPP-based VPNs share one `/ppp` backend for users and addressing):
173
157
  | Interop site-to-site / native IKEv2 | **IPsec** | `create_ipsec_{profile,peer,identity,proposal,policy}`, `get_ipsec_active_peers` |
174
158
  | Built-in OS VPN clients | **L2TP/IPsec** | `set_l2tp_server`, `create_ppp_secret`, `create_ppp_profile` |
175
159
  | Through restrictive firewalls | **SSTP** (TLS) | `set_sstp_server`, `create_sstp_client` |
176
- | Cross-platform OpenVPN | **OpenVPN** | `set_ovpn_server`, `create_ovpn_client` |
160
+ | Cross-platform | **OpenVPN** | `set_ovpn_server`, `create_ovpn_client` |
177
161
  | Route / L2-bridge between sites | **GRE/IPIP/EoIP/VXLAN** | `create_gre_tunnel`, `create_eoip_tunnel`, `create_vxlan_tunnel` |
178
162
 
179
- Not sure which? Invoke the **`choose-vpn-solution`** prompt and the server
180
- recommends one and outlines the build. Details: **[docs/vpn-guide.md](docs/vpn-guide.md)**.
163
+ Details: **[docs/vpn-guide.md](docs/vpn-guide.md)**.
181
164
 
182
- ## Manage multiple devices
165
+ ### 🖧 Manage several routers at once
183
166
 
184
- Give each router a name and the AI can drive them all from one conversation —
185
- exactly what you need to **set up a tunnel between two MikroTiks and test it from
186
- both ends**. Point the server at a JSON file (or `MIKROTIK_DEVICES`):
167
+ Name your routers and drive them all from one conversation — exactly what you need to
168
+ **set up a tunnel between two MikroTiks and test it from both ends**:
187
169
 
188
170
  ```jsonc
189
171
  // devices.json
@@ -199,223 +181,307 @@ both ends**. Point the server at a JSON file (or `MIKROTIK_DEVICES`):
199
181
  ```bash
200
182
  mikrotik-mcp serve --config ./devices.json
201
183
  mikrotik-mcp devices # site-a (default) · site-b
202
- mikrotik-mcp auth-check # probes every device
203
184
  ```
204
185
 
205
- When more than one device is configured, **every tool gains an optional `device`
206
- argument** (a validated enum of your names); omit it to use the default. The AI
207
- discovers names with `list_mikrotik_devices`, and **Safe Mode is per-device** so
208
- each router commits independently. The **`setup-tunnel-between-sites`** prompt
209
- drives the whole both-ends flow. Full guide: **[docs/multi-device.md](docs/multi-device.md)**.
186
+ Every tool gains an optional `device` argument, and **Safe Mode is per-device**:
210
187
 
211
- ```jsonc
212
- // the AI calls a tool against a specific router:
213
- // create_wireguard_interface { "device": "site-a", "name": "wg-to-b", "listen_port": 13231 }
214
- ```
188
+ > _"On site-a create a WireGuard interface, on site-b add it as a peer, then ping across."_
215
189
 
216
- **Behind a bastion?** Reach a router with no exposed SSH port by jumping through
217
- another (OpenSSH-style ProxyJump) `jumpVia` names a configured device to tunnel
218
- through; commands, Safe Mode and SFTP upload all ride the hop:
190
+ Behind a bastion with no exposed port? Jump through another router (`jumpVia`) —
191
+ commands, Safe Mode and SFTP all ride the hop. Full guide:
192
+ **[docs/multi-device.md](docs/multi-device.md)**.
219
193
 
220
- ```jsonc
221
- "home-ax3": { "host": "10.10.30.100", "username": "admin", "jumpVia": "hex" }
194
+ ### 🩺 Diagnose and harden
195
+
196
+ > _"Why can't VLAN 50 reach the internet?"_
197
+ > _"Audit my firewall for shadowed and overly-broad rules."_
198
+ > _"Harden this router and show me the exact diff before committing."_
199
+
200
+ These map to higher-level workflows — [firewall audit](docs/firewall-audit.md),
201
+ [security hardening](docs/security-hardening.md), [change plan & dry-run](docs/change-plan.md) —
202
+ each read-only to inspect, dry-run + Safe Mode to fix.
203
+
204
+ ## 📊 Observability dashboard
205
+
206
+ **A localhost web dashboard that watches every tool call the LLM makes against this
207
+ server — in real time.** Off by default, zero overhead until you flip it on, and it runs
208
+ alongside whatever transport you use:
209
+
210
+ ```bash
211
+ mikrotik-mcp serve --dashboard # → http://127.0.0.1:9090
222
212
  ```
223
213
 
224
- The bastion router needs SSH TCP forwarding enabled (`/ip ssh set
225
- forwarding-enabled=local`). See **[docs/multi-device.md](docs/multi-device.md#ssh-jump-hosts-bastion--proxyjump)**.
214
+ <div align="center">
215
+ <img src="assets/screenshots/web/dashboard-overview.webp" alt="Observability dashboard — overview" width="820" />
216
+ </div>
226
217
 
227
- ## Built-in prompts
218
+ Every call flows through one choke point in the registry, so the dashboard sees **all
219
+ of them, across every transport**. Why you'll want it on:
220
+
221
+ - 👁️ **Live feed of every call** — tool, inputs, outputs, target device, duration,
222
+ success/error — streaming in over a Bun-native WebSocket (SSE fallback). Filter by
223
+ tool / risk / device / status / free-text, pause & resume, export to CSV or JSON.
224
+ - 📈 **Analytics at a glance** — calls in window, calls/min, error rate, avg / p95 / p99
225
+ latency, distinct tools, output volume; top tools, by-risk and status donuts,
226
+ by-device bars, and a recent-errors panel.
227
+ - 🔒 **Secrets redacted before storage** — any password, private key, PSK or token is
228
+ replaced with `«redacted»` before anything is stored or streamed. Set
229
+ `--dashboard-capture-body=false` to keep metadata only.
230
+ - 🕸️ **Devices & connectivity map** — a hub-and-spoke graph of the server to each
231
+ device, coloured by live SSH reachability, with per-device online/offline, latency,
232
+ RouterOS identity/version and recent activity.
228
233
 
229
- MCP **prompts** are one-click guided workflows. This server ships 9 — authored as
230
- Markdown in [`prompts/`](prompts/), so you can edit or add your own without
231
- touching code:
234
+ <div align="center">
235
+ <img src="assets/screenshots/web/dashboard-live-feed.webp" alt="Observability dashboard live call feed" width="820" />
236
+ </div>
232
237
 
233
- `harden-router` · `diagnose-connectivity` · `setup-guest-wifi` ·
234
- `choose-vpn-solution` · `setup-wireguard-vpn` · `setup-ipsec-site-to-site` ·
235
- `setup-l2tp-ipsec-roadwarrior` · `setup-tunnel-between-sites` · `backup-and-document`
238
+ <div align="center">
239
+ <img src="assets/screenshots/web/dashboard-devices.webp" alt="Observability dashboard devices & connectivity" width="820" />
240
+ </div>
236
241
 
237
- See **[docs/prompts.md](docs/prompts.md)**.
242
+ It also carries a page per flagship workflow — **Attacks** (live incidents, the evidence
243
+ behind each, guarded blocking), **Schedules** (audit posture over time and what regressed),
244
+ **Explain** (the architecture document with its topology diagram), **Policies**,
245
+ **Simulator**, **Transactions**, **Flows** and **Rollout** — plus **Config Studio** (edit
246
+ the config JSON with autocomplete + safe-apply auto-rollback), a **live topology map** from
247
+ MNDP discovery, a **releases/upgrade** timeline, and a **reload/restart** button. Everything persists to a Bun-native SQLite
248
+ store on your machine — no external database. Binds to loopback (`127.0.0.1`) by default;
249
+ set a bearer token (`--dashboard-token`) to expose it safely.
238
250
 
239
- ## Transports
251
+ <details>
252
+ <summary><b>📸 Every dashboard screen (14 screenshots)</b></summary>
240
253
 
241
- | Transport | When | Run |
242
- | ------------------- | --------------------------------- | ---------------------------------------------------------------- |
243
- | **stdio** (default) | Claude Desktop, local MCP clients | `mikrotik-mcp serve` |
244
- | **streamable-http** | Remote / shared, behind a proxy | `mikrotik-mcp serve --transport streamable-http --mcp-port 8000` |
245
- | **sse** | Legacy HTTP clients | `mikrotik-mcp serve --transport sse` |
254
+ <br/>
246
255
 
247
- HTTP transports expose `POST /mcp` and a `GET /health` check, with DNS-rebinding
248
- protection that reconciles with your bind host automatically. See
249
- **[docs/transports.md](docs/transports.md)**.
256
+ **Live feed call detail drawer.** One call expanded: arguments, output, target device,
257
+ duration, risk annotation secrets already `«redacted»`.
250
258
 
251
- ## SSH connection pooling
259
+ <div align="center">
260
+ <img src="assets/screenshots/web/dashboard-live-feed-detail.webp" alt="Live feed — call detail drawer" width="820" />
261
+ </div>
252
262
 
253
- By default the server keeps **one persistent SSH connection per device** and
254
- opens a fresh exec channel for each tool call — eliminating the ~200-500 ms
255
- handshake overhead that a one-shot connection incurs on every command. Through
256
- a jump host the savings double (two handshakes avoided). Idle connections are
257
- closed automatically after 30 s.
263
+ **Clients.** Every DHCP lease / connected station across devices, with identity, traffic
264
+ and last-seen.
258
265
 
259
- ```bash
260
- # Disable pooling (revert to one-shot per tool call)
261
- MIKROTIK_SSH__KEEP_ALIVE=false mikrotik-mcp serve
266
+ <div align="center">
267
+ <img src="assets/screenshots/web/dashboard-clients.webp" alt="Clients" width="820" />
268
+ </div>
262
269
 
263
- # Tune the idle timeout (ms)
264
- mikrotik-mcp serve --ssh-idle-timeout 60000
265
- ```
270
+ **RADIUS & User Manager.** Servers, sessions, profiles, limitations and vouchers.
266
271
 
267
- In a JSON config file:
272
+ <div align="center">
273
+ <img src="assets/screenshots/web/dashboard-radius-um.webp" alt="RADIUS & User Manager" width="820" />
274
+ </div>
268
275
 
269
- ```jsonc
270
- {
271
- "ssh": {
272
- "keepAlive": true, // default — set false to disable
273
- "keepAliveInterval": 10000, // SSH keepalive packet interval (ms)
274
- "idleTimeout": 30000, // close idle connections after (ms)
275
- },
276
- }
277
- ```
276
+ **Topology.** Live L2 map built from MNDP neighbour discovery.
278
277
 
279
- Connection pooling is SSH-only; MAC-Telnet devices always use one-shot
280
- connections. Safe Mode still uses its own dedicated persistent session.
278
+ <div align="center">
279
+ <img src="assets/screenshots/web/dashboard-topology.webp" alt="Topology map" width="820" />
280
+ </div>
281
281
 
282
- ## Safe Mode
282
+ **Packets.** Packet captures started from the dashboard, with status and download.
283
283
 
284
- ```text
285
- enable_safe_mode (make changes) commit_safe_mode # persist
286
- → rollback_safe_mode # discard
287
- ```
284
+ <div align="center">
285
+ <img src="assets/screenshots/web/dashboard-packets.webp" alt="Packet capture" width="820" />
286
+ </div>
288
287
 
289
- While active, every change is held in memory; if the SSH session drops (e.g. a
290
- firewall rule that locks you out), RouterOS reverts everything automatically.
291
- Commands issued during the window are routed through the same persistent session.
292
- See **[docs/safe-mode.md](docs/safe-mode.md)**.
288
+ **Snapshots.** `/export`-based config snapshots kept locally browse and diff any two.
293
289
 
294
- ## Configuration
290
+ <div align="center">
291
+ <img src="assets/screenshots/web/dashboard-snapshots.webp" alt="Config snapshots" width="820" />
292
+ </div>
295
293
 
296
- Connection and transport settings come from `MIKROTIK_*` env vars or matching CLI
297
- flags (highest precedence last: defaults → env → flags).
298
-
299
- | Variable | Flag | Default | Purpose |
300
- | ----------------------------- | -------------------- | ----------- | ---------------------------------------------------------------------------------------------------- |
301
- | `MIKROTIK_HOST` | `--host` | `127.0.0.1` | RouterOS host |
302
- | `MIKROTIK_USERNAME` | `--username` | `admin` | SSH user |
303
- | `MIKROTIK_PORT` | `--port` | `22` | SSH port |
304
- | `MIKROTIK_PASSWORD` | `--password` | — | SSH password _(or use a key →)_ |
305
- | `MIKROTIK_KEY_FILENAME` | `--key-filename` | — | SSH private-key file path |
306
- | `MIKROTIK_PRIVATE_KEY` | `--private-key` | — | Inline private key (PEM) |
307
- | `MIKROTIK_KEY_PASSPHRASE` | `--key-passphrase` | — | Passphrase for an encrypted key |
308
- | `MIKROTIK_JUMP_HOST` | `--jump-host` | — | SSH bastion to tunnel through ([jump hosts](docs/multi-device.md#ssh-jump-hosts-bastion--proxyjump)) |
309
- | `MIKROTIK_CONFIG_FILE` | `--config` | — | JSON file of named devices ([multi-device](docs/multi-device.md)) |
310
- | `MIKROTIK_DEVICES` | `--devices` | — | Inline JSON of named devices |
311
- | `MIKROTIK_MCP__TRANSPORT` | `--transport` | `stdio` | `stdio` / `streamable-http` / `sse` |
312
- | `MIKROTIK_MCP__PORT` | `--mcp-port` | `8000` | HTTP bind port |
313
- | `MIKROTIK_SSH__KEEP_ALIVE` | `--ssh-keep-alive` | `true` | SSH connection pooling (reuse connections across tool calls) |
314
- | `MIKROTIK_SSH__IDLE_TIMEOUT` | `--ssh-idle-timeout` | `30000` | Close idle pooled connections after (ms) |
315
- | `MIKROTIK_DASHBOARD__ENABLED` | `--dashboard` | `false` | Real-time observability dashboard ([docs](docs/observability.md)) |
316
-
317
- Full table (incl. HTTP host, allow-lists, timeouts, `MIKROTIK_LOG_LEVEL`):
318
- **[docs/configuration.md](docs/configuration.md)**.
294
+ **Drift Guard.** Baseline vs. live config, with drift promoted or reconciled.
319
295
 
320
- ### Observability dashboard (optional)
296
+ <div align="center">
297
+ <img src="assets/screenshots/web/dashboard-drift-guard.webp" alt="Drift Guard" width="820" />
298
+ </div>
321
299
 
322
- A localhost-only web dashboard that intercepts **every** tool call the LLM makes
323
- live feed of inputs/outputs (secrets redacted), latency percentiles, error
324
- rate and per-tool/risk/device analytics — persisted to a Bun-native SQLite store
325
- and served on its own port alongside any transport:
300
+ **Change Plan.** Dry-run a batch of changes, review the exact commands, then apply under
301
+ Safe Mode.
326
302
 
327
- ```bash
328
- mikrotik-mcp serve --dashboard # http://127.0.0.1:9090
329
- ```
303
+ <div align="center">
304
+ <img src="assets/screenshots/web/dashboard-changeplan.webp" alt="Change plan / dry-run" width="820" />
305
+ </div>
306
+
307
+ **S3 Backups.** Off-device backup archive — upload, list, download, delete.
308
+
309
+ <div align="center">
310
+ <img src="assets/screenshots/web/dashboard-s3-backup.webp" alt="S3 backups" width="820" />
311
+ </div>
312
+
313
+ **Backups.** Local backup files kept on the MCP host.
314
+
315
+ <div align="center">
316
+ <img src="assets/screenshots/web/dashboard-local-backup.webp" alt="Local backups" width="820" />
317
+ </div>
318
+
319
+ **Modules.** The full tool catalog by module and risk annotation.
320
+
321
+ <div align="center">
322
+ <img src="assets/screenshots/web/dashboard-modules.webp" alt="Tool modules" width="820" />
323
+ </div>
324
+
325
+ **Config.** Config Studio — edit the config JSON with autocomplete, then safe-apply with
326
+ auto-rollback.
327
+
328
+ <div align="center">
329
+ <img src="assets/screenshots/web/dashboard-config.webp" alt="Config Studio" width="820" />
330
+ </div>
331
+
332
+ **Memory.** Knowledge graph of entities, relations and observations gathered from calls.
333
+
334
+ <div align="center">
335
+ <img src="assets/screenshots/web/dashboard-memory.webp" alt="Memory knowledge graph" width="820" />
336
+ </div>
330
337
 
331
- See **[docs/observability.md](docs/observability.md)**.
338
+ **What's new.** Release notes for the running server version, shown on first launch after
339
+ an upgrade.
340
+
341
+ <div align="center">
342
+ <img src="assets/screenshots/web/dashboard-whats-new.webp" alt="What's new — release notes" width="820" />
343
+ </div>
344
+
345
+ </details>
346
+
347
+ Full reference: **[docs/observability.md](docs/observability.md)**.
348
+
349
+ ## The tool catalog
350
+
351
+ **885 tools across 137 modules.** Full, always-current reference (parameters + risk per
352
+ tool) is generated from source: **[docs/tools-reference.md](docs/tools-reference.md)**.
353
+
354
+ | Group | Tools | Modules |
355
+ | ------------------------ | ----: | ----------------------------------------------------------------------------------------------------------------- |
356
+ | **System & Ops** | 182 | system, network tools, scheduler/scripts, users, logs, backup, Safe Mode, transactions, rollout, scheduled audits |
357
+ | **Security** | 125 | firewall filter, NAT, address-lists, certificates, IP services, hardening, policy-as-code, attack detection |
358
+ | **VPN & Tunneling** | 108 | WireGuard, IPsec, PPP, L2TP, PPTP, SSTP, OpenVPN, GRE/IPIP/EoIP/VXLAN |
359
+ | **Dynamic Routing** | 99 | router-id, tables, rules, next-hops, filters, BFD, BGP, OSPF, RIP, PIM-SM, IGMP proxy, GMP, RPKI |
360
+ | **IPv6** | 90 | addressing, DHCPv6, ND, neighbours, pools, routes, firewall filter/NAT/mangle/raw |
361
+ | **Tools** | 67 | ping, traceroute, bandwidth test, sniffer, traffic generator, RoMON, Wake-on-LAN, SMS |
362
+ | **Addressing & Routing** | 62 | IP addresses, IP pools, routing, DHCP, DNS |
363
+ | **Interfaces** | 56 | interfaces, VLAN, bridge, wireless, PoE |
364
+ | **AAA** | 34 | RADIUS, User Manager, 802.1X |
365
+ | **QoS** | 23 | queue types, queue trees, simple queues |
366
+ | **Switch** | 18 | switch settings, ports, rules, port isolation |
367
+ | **Discovery & Meta** | 9 | tool gateway (find/describe/invoke), server pulse, capability probe |
368
+ | **Memory** | 9 | persistent knowledge graph |
332
369
 
333
370
  ## Beyond the catalog
334
371
 
335
- On top of the per-scope tools, the server ships higher-level workflows:
336
-
337
- - **[Change Plan & Dry-Run](docs/change-plan.md)** — preview intended commands as
338
- a terraform-style plan (risk-scored, lock-out-aware, safely reordered), then
339
- `apply_plan` runs them under Safe Mode, shows the **exact `/export` diff**, and
340
- commits only if the device is still reachable (auto-reverts a lock-out).
341
- - **[Config Snapshots](docs/config-snapshots.md)** store `/export` snapshots on
342
- the host and **time-travel diff** any two, or one against the live device.
343
- - **[Firewall Audit](docs/firewall-audit.md)** — `firewall_audit` finds shadowed,
344
- overly-broad, missing-default-drop, duplicate and dead rules, risk-scored, with
345
- one-click fixes in MCP App hosts.
346
- - **[Security Hardening](docs/security-hardening.md)** — granular audit+remediate
347
- pairs per risk category (firewall default-deny, address-list enforcement, kernel
348
- IP, IPv6 baseline, SSH, service exposure, helpers, management plane, accounts,
349
- CRL, segmentation, DNS) plus an orchestrator. Every audit is read-only; every
350
- fix defaults to dry-run and snapshots + Safe-Modes before writing, remediating
351
- by explicit `finding_id`.
352
- - **[Port-Scan Detection](docs/port-scan-detection.md)** — detect (never block) six
353
- port-scan signatures (psd, Nmap FIN/NULL/Xmas, SYN/FIN, SYN/RST) by tagging the
354
- source, inside a trust-excluding `detect-portscan` jump-gate; explicit signature
355
- selection, trust-list pre-flight, snapshot + Safe-Mode apply.
356
- - **[Packet Capture Studio](docs/packet-capture.md)** stream mirrored packets to
357
- the host as TZSP, decode them live in the dashboard, and export `.pcap`.
358
- - **[Discovery](docs/discovery.md)** `bun run discover` lists MikroTik devices on
359
- the LAN by MAC (MNDP); the dashboard draws a live **topology map**.
360
- - **[Config Studio](docs/config-studio.md)** edit the config JSON in the
361
- dashboard with autocomplete, validation, and safe-apply auto-rollback.
362
-
363
- ## Schemas
364
-
365
- `schemas/` ships machine-readable JSON Schemas, **generated from the TypeScript
366
- source** (`bun run gen:schemas`) so they can never drift:
367
-
368
- - `schemas/tool-catalog.json` every tool with risk, description, and input schema
369
- - `schemas/tools/<name>.json` — per-tool input schema
370
- - `schemas/config.schema.json` — the runtime configuration
372
+ Higher-level workflows built on top of the per-scope tools:
373
+
374
+ - **[Change Plan & Dry-Run](docs/change-plan.md)** — preview commands as a
375
+ terraform-style plan, apply under Safe Mode, show the exact `/export` diff, commit
376
+ only if still reachable.
377
+ - **[Cross-Device Transactions](docs/transactions.md)** coordinate Safe Mode across
378
+ several routers: prepare, verify while still uncommitted, then commit everywhere or
379
+ roll back everywhere.
380
+ - **[Staged Fleet Rollout](docs/fleet-rollout.md)** — apply one change as canary → wave →
381
+ fleet with a health gate and soak between waves, reverting everything already changed
382
+ on the first failure.
383
+ - **[Scheduled Audits](docs/scheduled-audits.md)** — run the auditors on a cron with
384
+ nobody in the loop and alert only on what changed since the previous run: new,
385
+ worsened, resolved.
386
+ - **[Config Narrative](docs/config-narrative.md)** turn a router's configuration into a
387
+ plain-language architecture document with a topology diagram, and explain what the
388
+ difference between two snapshots actually means.
389
+ - **[Attack Detection](docs/attack-detection.md)** — watch the fleet's logs for brute
390
+ force, credential spraying and a login that succeeded after failures, correlate them
391
+ into incidents with evidence, and block the source reversibly when you ask.
392
+ - **[Config Snapshots](docs/config-snapshots.md)** store `/export` snapshots and
393
+ time-travel diff any two, or one against the live device.
394
+ - **[Firewall Audit](docs/firewall-audit.md)** find shadowed, broad, missing-default-drop,
395
+ duplicate and dead rules, risk-scored, with one-click fixes.
396
+ - **[Security Hardening](docs/security-hardening.md)** per-category audit+remediate
397
+ pairs; audits read-only, fixes dry-run + snapshot + Safe-Mode first.
398
+ - **[Policy-as-Code](docs/policy-as-code.md)** write your own compliance rules in
399
+ YAML and lint a config snapshot offline; Markdown/JSON/SARIF, read-only, CI-able.
400
+ - **[Offline Simulator](docs/simulator.md)** — trace a hypothetical packet through NAT,
401
+ routing and firewall against a snapshot; reports UNKNOWN rather than guessing.
402
+ - **[Traffic Flow](docs/traffic-flow.md)** NetFlow/IPFIX collection and continuous
403
+ top-talker / conversation / application analytics; flow metadata only, no payload.
404
+ - **[Port-Scan Detection](docs/port-scan-detection.md)** · **[Packet Capture Studio](docs/packet-capture.md)** ·
405
+ **[Discovery](docs/discovery.md)** · **[Config Studio](docs/config-studio.md)**.
371
406
 
372
- ## Documentation
407
+ ## Built-in prompts
373
408
 
374
- | Doc | |
375
- | ------------------------------------------------------------- | --------------------------------------------------------------------- |
376
- | [Getting started](docs/getting-started.md) | Install, verify, first run |
377
- | [Configuration](docs/configuration.md) | Every env var & flag |
378
- | [Multiple devices](docs/multi-device.md) | Manage several routers; per-call targeting |
379
- | [Connecting clients](docs/connecting-clients.md) | Claude Desktop, stdio, HTTP |
380
- | [Transports](docs/transports.md) | stdio / HTTP / SSE, DNS-rebinding |
381
- | **[Observability](docs/observability.md)** | Real-time dashboard: live feed + analytics, SQLite |
382
- | [Safe Mode](docs/safe-mode.md) | Transactional changes |
383
- | **[Change Plan & Dry-Run](docs/change-plan.md)** | Preview commands, apply with the exact diff + auto-rollback |
384
- | **[Config Snapshots](docs/config-snapshots.md)** | `/export` snapshots + time-travel diff |
385
- | **[Firewall Audit](docs/firewall-audit.md)** | Shadowed/broad/dead rules, risk-scored |
386
- | **[Security Hardening](docs/security-hardening.md)** | Per-category audit+remediate, fix by finding_id, snapshot + Safe-Mode |
387
- | **[Port-Scan Detection](docs/port-scan-detection.md)** | Detect+tag six scan signatures behind a trust-excluding jump-gate |
388
- | **[CAPsMAN Orchestrator](docs/capsman.md)** | Wi-Fi fabric audit: coverage/co-channel, weak signal, load, FT & HA |
389
- | **[Packet Capture Studio](docs/packet-capture.md)** | Live TZSP capture + pcap export |
390
- | **[Discovery](docs/discovery.md)** | `bun run discover`, MNDP neighbours, topology map |
391
- | **[Config Studio](docs/config-studio.md)** | Edit config in the dashboard with autocomplete |
392
- | **[VPN guide](docs/vpn-guide.md)** | Every tunnel type + how to build it |
393
- | [Prompts](docs/prompts.md) | The 9 guided workflows |
394
- | [Architecture](docs/architecture.md) | How it's built |
395
- | [Security](docs/security.md) | Credentials, risk gating |
396
- | [Tool reference](docs/tools-reference.md) | The full generated catalog |
397
- | [MCP Inspector](docs/inspector.md) | Test tools/prompts in the UI or CLI |
398
- | [Development](docs/development.md) · [Docker](docs/docker.md) | Build, test, deploy |
399
-
400
- ## Development
409
+ MCP **prompts** are one-click guided workflows — authored as Markdown in
410
+ [`prompts/`](prompts/), so you can edit or add your own without touching code:
401
411
 
402
- ```bash
403
- bun run test:types # tsc --noEmit
404
- bun test # unit tests
405
- bun run gen # regenerate schemas/ + docs/tools-reference.md from source
406
- bun run build # bundle to dist/
407
- ```
412
+ `harden-router` · `diagnose-connectivity` · `setup-guest-wifi` ·
413
+ `choose-vpn-solution` · `setup-wireguard-vpn` · `setup-ipsec-site-to-site` ·
414
+ `setup-l2tp-ipsec-roadwarrior` · `setup-tunnel-between-sites` · `backup-and-document`
415
+
416
+ See **[docs/prompts.md](docs/prompts.md)**.
417
+
418
+ ## Transports
419
+
420
+ | Transport | When | Run |
421
+ | ------------------- | --------------------------------- | ---------------------------------------------------------------- |
422
+ | **stdio** (default) | Claude Desktop, local MCP clients | `mikrotik-mcp serve` |
423
+ | **streamable-http** | Remote / shared, behind a proxy | `mikrotik-mcp serve --transport streamable-http --mcp-port 8000` |
424
+ | **sse** | Legacy HTTP clients | `mikrotik-mcp serve --transport sse` |
425
+
426
+ HTTP transports expose `POST /mcp` and `GET /health` with DNS-rebinding protection. See
427
+ **[docs/transports.md](docs/transports.md)**.
428
+
429
+ ## Configuration
430
+
431
+ Settings come from `MIKROTIK_*` env vars or matching CLI flags (defaults → env → flags):
432
+
433
+ | Variable | Flag | Default | Purpose |
434
+ | ----------------------------- | ------------------ | ----------- | ----------------------------------- |
435
+ | `MIKROTIK_HOST` | `--host` | `127.0.0.1` | RouterOS host |
436
+ | `MIKROTIK_USERNAME` | `--username` | `admin` | SSH user |
437
+ | `MIKROTIK_PASSWORD` | `--password` | — | SSH password _(or use a key →)_ |
438
+ | `MIKROTIK_KEY_FILENAME` | `--key-filename` | — | SSH private-key file path |
439
+ | `MIKROTIK_KEY_PASSPHRASE` | `--key-passphrase` | — | Passphrase for an encrypted key |
440
+ | `MIKROTIK_JUMP_HOST` | `--jump-host` | — | SSH bastion to tunnel through |
441
+ | `MIKROTIK_CONFIG_FILE` | `--config` | — | JSON file of named devices |
442
+ | `MIKROTIK_DEVICES` | `--devices` | — | Inline JSON of named devices |
443
+ | `MIKROTIK_MCP__TRANSPORT` | `--transport` | `stdio` | `stdio` / `streamable-http` / `sse` |
444
+ | `MIKROTIK_SSH__KEEP_ALIVE` | `--ssh-keep-alive` | `true` | SSH connection pooling |
445
+ | `MIKROTIK_DASHBOARD__ENABLED` | `--dashboard` | `false` | Real-time observability dashboard |
446
+
447
+ Full table (HTTP host, allow-lists, timeouts, dashboard options, `MIKROTIK_LOG_LEVEL`):
448
+ **[docs/configuration.md](docs/configuration.md)**.
449
+
450
+ ## Documentation
408
451
 
409
- See **[docs/development.md](docs/development.md)** and [CONTRIBUTING.md](CONTRIBUTING.md).
452
+ | Doc | |
453
+ | ------------------------------------------------------------------- | ------------------------------------------------------------ |
454
+ | [Getting started](docs/getting-started.md) | Install, verify, first run |
455
+ | [Configuration](docs/configuration.md) | Every env var & flag |
456
+ | [Device capabilities](docs/capabilities.md) | What a router supports; how tools are gated on it |
457
+ | [Alerting](docs/alerting.md) | Rules that reach out — Slack, Discord, ntfy, webhook, MCP |
458
+ | [Multiple devices](docs/multi-device.md) | Manage several routers; per-call targeting |
459
+ | [Connecting clients](docs/connecting-clients.md) | Claude Desktop, stdio, HTTP |
460
+ | **[Observability](docs/observability.md)** | Real-time dashboard: live feed + analytics, SQLite |
461
+ | [Safe Mode](docs/safe-mode.md) | Transactional changes |
462
+ | **[Cross-Device Transactions](docs/transactions.md)** | Two-phase commit across several routers |
463
+ | **[Staged Fleet Rollout](docs/fleet-rollout.md)** | Canary → wave → fleet with health gates and auto-revert |
464
+ | **[Change Plan & Dry-Run](docs/change-plan.md)** | Preview commands, apply with the exact diff + auto-rollback |
465
+ | **[Traffic Flow](docs/traffic-flow.md)** | NetFlow/IPFIX collection + top-talker analytics |
466
+ | **[Attack Detection](docs/attack-detection.md)** | Live attack incidents from logs; guarded, timed blocking |
467
+ | **[Firewall Audit](docs/firewall-audit.md)** | Shadowed/broad/dead rules, risk-scored |
468
+ | **[Security Hardening](docs/security-hardening.md)** | Per-category audit+remediate, snapshot + Safe-Mode |
469
+ | **[Scheduled Audits](docs/scheduled-audits.md)** | Auditors on a cron, alerting only on run-over-run changes |
470
+ | **[Policy-as-Code](docs/policy-as-code.md)** | Your own YAML compliance rules, linted offline → SARIF |
471
+ | **[Config Narrative](docs/config-narrative.md)** | Config → architecture doc + Mermaid; consequence-level diffs |
472
+ | **[Offline Simulator](docs/simulator.md)** | Trace a packet through firewall + routing, no device |
473
+ | **[VPN guide](docs/vpn-guide.md)** | Every tunnel type + how to build it |
474
+ | [Prompts](docs/prompts.md) | The 9 guided workflows |
475
+ | [Architecture](docs/architecture.md) · [Security](docs/security.md) | How it's built · credentials & risk gating |
476
+ | [Tool reference](docs/tools-reference.md) | The full generated catalog |
477
+ | [Development](docs/development.md) · [Docker](docs/docker.md) | Build, test, deploy |
410
478
 
411
479
  ## Security
412
480
 
413
- Talks to RouterOS over SSH using credentials you supply; nothing is sent anywhere
414
- else. Tool values are quoted/escaped to prevent console-command injection.
415
- Destructive and dangerous tools are annotated so clients can require confirmation,
416
- and a plaintext-password-in-a-container warning nudges you toward key files or
417
- secrets. Details: **[docs/security.md](docs/security.md)**. Only point this at
418
- devices you're authorized to manage.
481
+ Talks to RouterOS over SSH using credentials you supply; nothing is sent anywhere else.
482
+ Tool values are quoted/escaped to prevent console-command injection. Destructive tools
483
+ are annotated so clients can require confirmation. Details:
484
+ **[docs/security.md](docs/security.md)**. Only point this at devices you're authorized to manage.
419
485
 
420
486
  ## License
421
487