MM

mikrotik-mcp/mikrotik-mcp

Developer tools
29 stars 6 forks Quality 77 Trend 21MIT

A Bun-native MCP server that turns one or more MikroTik routers into +950 tools your AI can drive. Firewall · routing · DHCP/DNS · wireless · QoS · and a complete VPN suite — over SSH, with...

Overview

Drive one or more MikroTik routers in plain language — 950 risk-annotated tools your AI can call, over SSH. Firewall · routing · DHCP/DNS · wireless · QoS · a complete VPN suite · transactional Safe Mode · live attack detection · and an observability dashboard that watches every call. @usex/mikrotik-mcp turns into any MCP client (Claude Desktop, Claude Code, Cursor, …) can call to read and configure your router by talking to it. It reaches the device over — no agent, no package to install on RouterOS — runs on , and validates every call against a schema. "Show me the firewall input chain, then block SSH from the WAN under safe mode." "Build an IKEv2 site-to-site tunnel to 203.0.113.5 for 192.168.20.0/24." "Why can't VLAN 50 reach the internet?" - lookup_ip_intelligence and Diagnostics → IP Intelligence compare full ipquery/ipkit responses: ASN/organization, location, risk and every additional field, with searchable details and JSON export.

README

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.

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.

View the full README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

{ "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" } } } }