@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.
- package/README.md +350 -284
- package/dist/cli.js +1870 -566
- package/dist/index.d.ts +57 -0
- package/dist/index.js +1 -1
- package/dist/shared/{library-2144zr9f.js → cli-2dj736ma.js} +33920 -22075
- package/dist/shared/{cli-p673815b.js → cli-vvy7yfyg.js} +1 -1
- package/dist/shared/{cli-tssmr7sb.js → library-13dhfdnq.js} +29455 -18578
- package/dist/shared/{library-8f4pbp0x.js → library-syt5fmtj.js} +1 -1
- package/dist/ui/aaa.html +1 -1
- package/dist/ui/connected-devices.html +1 -1
- package/dist/ui/dashboard.html +1 -1
- package/dist/ui/firewall-audit.html +1 -1
- package/dist/ui/firewall.html +1 -1
- package/dist/ui/interfaces.html +1 -1
- package/dist/ui/observability.html +70 -62
- package/dist/ui/records.html +1 -1
- package/package.json +12 -11
- package/policies/baseline.yaml +180 -0
- package/prompts/backup-and-document.md +28 -18
- package/prompts/build-tunnel-transactionally.md +74 -0
- package/prompts/fleet-rollout.md +68 -0
- package/prompts/setup-traffic-flow.md +68 -0
- package/schemas/README.md +1 -1
- package/schemas/config.schema.json +367 -4
- package/schemas/tool-catalog.json +3044 -1152
- package/schemas/tools/abort_rollout.json +17 -0
- package/schemas/tools/abort_transaction.json +17 -0
- package/schemas/tools/add_alert_rule.json +45 -0
- package/schemas/tools/add_ipv6_route.json +1 -1
- package/schemas/tools/add_route.json +3 -2
- package/schemas/tools/add_schedule.json +50 -0
- package/schemas/tools/add_script.json +1 -1
- package/schemas/tools/add_traffic_flow_target.json +36 -0
- package/schemas/tools/add_transaction_step.json +21 -0
- package/schemas/tools/analyze_flows.json +25 -0
- package/schemas/tools/begin_transaction.json +109 -0
- package/schemas/tools/block_attacker.json +22 -0
- package/schemas/tools/check_policy_snapshot.json +20 -0
- package/schemas/tools/commit_transaction.json +13 -0
- package/schemas/tools/configure_attack_response.json +12 -0
- package/schemas/tools/diff_explanations.json +24 -0
- package/schemas/tools/explain_device.json +22 -0
- package/schemas/tools/explain_policy_finding.json +17 -0
- package/schemas/tools/explain_rule_reachability.json +18 -0
- package/schemas/tools/explain_section.json +32 -0
- package/schemas/tools/export_policy_report.json +22 -0
- package/schemas/tools/flow_top_talkers.json +31 -0
- package/schemas/tools/get_alert_history.json +26 -0
- package/schemas/tools/get_attack_incident.json +13 -0
- package/schemas/tools/get_audit_timeline.json +24 -0
- package/schemas/tools/get_device_capabilities.json +7 -0
- package/schemas/tools/get_traffic_flow_settings.json +7 -0
- package/schemas/tools/list_alert_rules.json +7 -0
- package/schemas/tools/list_attack_incidents.json +27 -0
- package/schemas/tools/list_attack_responses.json +20 -0
- package/schemas/tools/list_policies.json +17 -0
- package/schemas/tools/list_schedules.json +12 -0
- package/schemas/tools/list_traffic_flow_targets.json +7 -0
- package/schemas/tools/mute_alert_rule.json +18 -0
- package/schemas/tools/plan_rollout.json +95 -0
- package/schemas/tools/refresh_device_capabilities.json +7 -0
- package/schemas/tools/remove_alert_rule.json +13 -0
- package/schemas/tools/remove_schedule.json +13 -0
- package/schemas/tools/remove_traffic_flow_target.json +13 -0
- package/schemas/tools/rollout_status.json +12 -0
- package/schemas/tools/run_policy_check.json +12 -0
- package/schemas/tools/run_schedule_now.json +13 -0
- package/schemas/tools/scan_for_attacks.json +21 -0
- package/schemas/tools/set_traffic_flow_settings.json +28 -0
- package/schemas/tools/simulate_change.json +72 -0
- package/schemas/tools/simulate_packet.json +53 -0
- package/schemas/tools/simulate_suite.json +71 -0
- package/schemas/tools/start_flow_collector.json +14 -0
- package/schemas/tools/start_rollout.json +98 -0
- package/schemas/tools/stop_flow_collector.json +7 -0
- package/schemas/tools/test_alert_channel.json +14 -0
- package/schemas/tools/unblock_attacker.json +20 -0
- package/schemas/tools/update_alert_rule.json +41 -0
- package/schemas/tools/update_route.json +3 -2
- package/schemas/tools/validate_policy_file.json +16 -0
- 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>
|
|
4
|
-
Firewall · routing · DHCP/DNS · wireless · QoS ·
|
|
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-
|
|
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`
|
|
18
|
-
tools
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
48
|
-
|
|
49
|
-
- 🧰 **
|
|
50
|
-
|
|
51
|
-
certificates), QoS
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
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
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
#
|
|
91
|
+
# Requires Bun ≥ 1.3 — https://bun.sh
|
|
79
92
|
bun add -g @usex/mikrotik-mcp
|
|
80
93
|
|
|
81
|
-
#
|
|
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
|
-
#
|
|
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
|
-
**
|
|
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
|
-
|
|
110
|
-
|
|
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
|
-
|
|
117
|
-
bun
|
|
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
|
-
|
|
119
|
+
Full options: **[docs/configuration.md](docs/configuration.md)** · MCPB details:
|
|
120
|
+
**[docs/getting-started.md](docs/getting-started.md)**.
|
|
123
121
|
|
|
124
|
-
|
|
125
|
-
needed on the machine, and the router credentials are entered in the host's UI
|
|
126
|
-
rather than a shell.
|
|
122
|
+
## Simple usage — by scenario
|
|
127
123
|
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
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
|
-
|
|
135
|
+
### 🧱 Make a change, safely
|
|
151
136
|
|
|
152
|
-
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
146
|
+
### 🔐 Stand up a VPN
|
|
166
147
|
|
|
167
|
-
|
|
168
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
165
|
+
### 🖧 Manage several routers at once
|
|
183
166
|
|
|
184
|
-
|
|
185
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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
|
-
|
|
221
|
-
|
|
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
|
-
|
|
225
|
-
|
|
214
|
+
<div align="center">
|
|
215
|
+
<img src="assets/screenshots/web/dashboard-overview.webp" alt="Observability dashboard — overview" width="820" />
|
|
216
|
+
</div>
|
|
226
217
|
|
|
227
|
-
|
|
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
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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
|
-
|
|
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
|
-
|
|
251
|
+
<details>
|
|
252
|
+
<summary><b>📸 Every dashboard screen (14 screenshots)</b></summary>
|
|
240
253
|
|
|
241
|
-
|
|
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
|
-
|
|
248
|
-
|
|
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
|
-
|
|
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
|
-
|
|
254
|
-
|
|
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
|
-
|
|
260
|
-
|
|
261
|
-
|
|
266
|
+
<div align="center">
|
|
267
|
+
<img src="assets/screenshots/web/dashboard-clients.webp" alt="Clients" width="820" />
|
|
268
|
+
</div>
|
|
262
269
|
|
|
263
|
-
|
|
264
|
-
mikrotik-mcp serve --ssh-idle-timeout 60000
|
|
265
|
-
```
|
|
270
|
+
**RADIUS & User Manager.** Servers, sessions, profiles, limitations and vouchers.
|
|
266
271
|
|
|
267
|
-
|
|
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
|
-
|
|
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
|
-
|
|
280
|
-
|
|
278
|
+
<div align="center">
|
|
279
|
+
<img src="assets/screenshots/web/dashboard-topology.webp" alt="Topology map" width="820" />
|
|
280
|
+
</div>
|
|
281
281
|
|
|
282
|
-
|
|
282
|
+
**Packets.** Packet captures started from the dashboard, with status and download.
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
```
|
|
284
|
+
<div align="center">
|
|
285
|
+
<img src="assets/screenshots/web/dashboard-packets.webp" alt="Packet capture" width="820" />
|
|
286
|
+
</div>
|
|
288
287
|
|
|
289
|
-
|
|
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
|
-
|
|
290
|
+
<div align="center">
|
|
291
|
+
<img src="assets/screenshots/web/dashboard-snapshots.webp" alt="Config snapshots" width="820" />
|
|
292
|
+
</div>
|
|
295
293
|
|
|
296
|
-
|
|
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
|
-
|
|
296
|
+
<div align="center">
|
|
297
|
+
<img src="assets/screenshots/web/dashboard-drift-guard.webp" alt="Drift Guard" width="820" />
|
|
298
|
+
</div>
|
|
321
299
|
|
|
322
|
-
|
|
323
|
-
|
|
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
|
-
|
|
328
|
-
|
|
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
|
-
|
|
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
|
-
|
|
336
|
-
|
|
337
|
-
- **[Change Plan & Dry-Run](docs/change-plan.md)** — preview
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
- **[
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
- **[
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
- **[
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
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
|
-
##
|
|
407
|
+
## Built-in prompts
|
|
373
408
|
|
|
374
|
-
|
|
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
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
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
|
-
|
|
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
|
-
|
|
415
|
-
|
|
416
|
-
|
|
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
|
|