MikroTik MCP connects Claude, Codex and other MCP clients to one or more MikroTik routers. Inspect the network, investigate a connection, preview changes and verify the result. The server runs on Bun and uses SSH by default; no agent is required on the router.
Documentation website → · Getting started · AI installation prompt · Tool reference
Get connected
Install Bun (the project pins its tested version in package.json), then:
bun add -g @usex/mikrotik-mcp
mikrotik-mcp --help
Add this server to a local MCP client, replacing the example host, username and key path:
{
"mcpServers": {
"mikrotik": {
"command": "mikrotik-mcp",
"args": ["serve"],
"env": {
"MIKROTIK_HOST": "192.168.88.1",
"MIKROTIK_USERNAME": "automation",
"MIKROTIK_KEY_FILENAME": "/absolute/path/to/private-key"
}
}
}
}
Import the matching public key into the intended RouterOS user, then verify connectivity with auth-check before making changes. The setup guide covers passwords, key creation and troubleshooting. Prefer one shared process? Follow service deployment and client configuration. Docker is optional.
Explore the dashboard
mikrotik-mcp serve --config /absolute/path/devices.json \
--dashboard --dashboard-host 127.0.0.1 --dashboard-port 9090
Open http://127.0.0.1:9090. The dashboard brings together:
- Network operations: device setup, address failover, routing, Wi-Fi, VPN sessions and user accounting.
- Investigation: client paths, packet and flow evidence, service checks, site activity and incident timelines.
- Controlled changes: plans, Safe Mode, access scope, transactions, rollouts, snapshots and recovery workflows.
- MCP workspace: tool-call tracing, configuration, memory, prompts and module controls.
See every dashboard page, with full-page previews and instructions for its controls and limitations.
https://github.com/user-attachments/assets/f6dba72e-60f8-47ef-9045-2e871d92c8f0
Watch the dashboard film · Download MP4 · 60 seconds · 1080p · Synthetic demonstration data
Documentation
The new website lives in docs/. Run cd docs && bun install --frozen-lockfile && bun run dev, then open http://localhost:4000. It includes operational guides, all dashboard pages, the generated tool/configuration/prompt references and a clearly marked historical archive. Build and deployment instructions.
| Start here |
Continue with |
| Configuration |
Multiple routers and failover |
| Docker and persistence |
Publishing images |
| Security and access |
Safe Mode |
| Development |
Architecture |
Only manage routers you are authorized to control. Use scoped credentials, review write operations and keep recoverable backups. Safe Mode and multi-device rollback have practical limits; they do not replace verification.
License
MIT. Made by Ali Torki and contributors.
Scheduled tunnel bandwidth tests
The dashboard and Raycast support manual and scheduled inter-router bandwidth tests with read-only path preflight, bounded load, persisted history, charts and selected-test comparisons. Optional Raycast background polling dispatches native macOS result notifications, including failures. Source interface/address fields describe route expectations, not forced binding. See the bandwidth testing guide for setup, credentials, restart behavior and notification requirements.