Open-source MCP server · RouterOS-native

Talk to your
RouterOS routers
in plain English.

MikroTik MCP is the bridge between your AI assistant and your RouterOS fleet — let Claude, ChatGPT, or any MCP-capable client manage VLANs, firewall rules, DHCP, NAT, WireGuard, and 12 other categories from a single prompt. No web UI clicks. No Winbox tabs.

17 tool categories
160+ RouterOS tools
3 transports (stdio · SSE · HTTP)
MIT licensed
claude · mikrotik-mcp-server
You
Spin up a Guest VLAN on ether1 (id 200), give it 192.168.200.1/24, a DHCP pool from .10 to .100, and masquerade out to WAN.
Claude
On it. Running four tools in order:
mikrotik_create_vlan_interface(name="vlan200", vlan_id=200, interface="ether1")
vlan200 created on ether1 · tag 200
mikrotik_add_ip_address(address="192.168.200.1/24", interface="vlan200")
192.168.200.1/24 bound to vlan200
mikrotik_create_dhcp_pool(name="pool-200", ranges="192.168.200.10-192.168.200.100")
Pool "pool-200" · 91 addresses
mikrotik_create_nat_rule(chain="srcnat", action="masquerade", out_interface="ether1")
NAT rule added at index 0
Guest VLAN is live. Want me to set a rate limit?
01 — What it is

The connective tissue between LLMs and RouterOS.

MikroTik MCP is a Model Context Protocol server. It exposes your RouterOS device's configuration surface as typed tools — your AI client picks the right one, fills in the parameters, and runs it over SSH. You stay in the loop; the model just handles the syntax.

// 01

Natural language → typed tools

Every RouterOS noun has a verb. "Make a VLAN" maps onto mikrotik_create_vlan_interface with strict, validated arguments. No hallucinated CLI.

// 02

Three transports, one server

Run it over stdio for desktop AI clients, expose it as SSE for streaming agents, or wrap it in HTTP for REST consumers via mcpo.

// 03

Safe-mode aware

Wrap risky operations in RouterOS safe-mode sessions. If a change locks you out, the device rolls everything back automatically — no manual recovery.

02 — Capabilities

17 categories. Roughly everything you'd touch in Winbox.

Each category exposes typed tools — create, list, get, update, remove, plus category-specific verbs like move_filter_rule or flush_dns_cache. Click any to jump to its reference.

5 tools

VLAN

Create, list, get, update, and remove tagged interfaces on any parent port. IDs 1–4094.

9 tools

Firewall

Filter rules across input, forward, output chains. Move, enable, disable, plus a basic-setup helper.

8 tools

NAT

srcnat / dstnat / masquerade. Port forwards, redirects, move, enable, disable.

6 tools

DHCP

Servers, networks, pools. Gateway + DNS push, lease configuration.

15 tools

DNS

Static records, regexp blocklists, cache + statistics, query testing.

14 tools

Routes

Static, default, blackhole. Active filters, table + cache inspection, path checks.

15 tools

WireGuard

Interfaces, peers, key management, client-config generation, allowed-IPs.

18 tools

Users

Local accounts, groups, policies, active sessions, SSH keys, exports.

10 tools

Backup & Export

Binary backups, .rsc configuration exports, section dumps, file transfer, restore.

10 tools

Logs

Stream, filter by topic or severity, search, statistics, export, live monitor.

7 tools

IP Pool

Named pools, range expansion, used-address inspection.

4 tools

Safe Mode

Status, enable, commit, rollback sessions. Auto-revert on connection loss.

19 tools

Queues

Simple queues, queue trees, queue types. Rate limit per VLAN, per client.

4 tools

IP Address

Bind, list, get, remove. Comments, network filters, dynamic detection.

18 tools

Wireless

Interfaces, security profiles, access lists, network scan, registration table.

4 tools

Interfaces

List, get, enable, disable any interface — physical or virtual.

3 tools

PoE

Power-over-Ethernet monitoring — live PoE-out voltage, current, power, and per-port settings.

AI Client Claude · ChatGPT MCP-capable MCP MikroTik MCP tool server Python · stdio/SSE/HTTP translates /interface vlan add name=vlan200 vlan-id=200 … RouterOS CLI commands SSH :22 RouterOS device
03 — How it works

From English to /ip vlan add in three hops.

The MCP server advertises typed tools to your AI client. The client picks the right one based on context, fills the parameters, and posts back. The server validates, translates to RouterOS CLI, and runs it over SSH against your device.

01
Client discovers tools. On startup the AI client queries the server for available tool schemas and descriptions.
02
Model selects + fills. Given your prompt, it picks the right tool and constructs validated arguments.
03
Server executes. The tool handler builds the RouterOS command, runs it over SSH, and returns structured output.
04
Model summarizes. The result feeds back to the model, which explains the outcome in plain English.
04 — Install

Up in about a minute.

Pick a transport, paste a config, point it at your router. The Docker route is the shortest — no Python toolchain required.

# Build & run the container
# Clone & build
$ git clone https://github.com/jeff-nasseri/mikrotik-mcp.git
$ cd mikrotik-mcp
$ docker build -t mikrotik-mcp .

# Run with stdio (IDE integration)
$ docker run --rm -i \
    -e MIKROTIK_HOST=192.168.88.1 \
    -e MIKROTIK_USERNAME=sshuser \
    -e MIKROTIK_PASSWORD=your_password \
    -e MIKROTIK_PORT=22 \
    mikrotik-mcp
# Manual / Python install
$ git clone https://github.com/jeff-nasseri/mikrotik-mcp.git
$ cd mikrotik-mcp

# Create & activate venv
$ python -m venv .venv
$ source .venv/bin/activate

# Install + run
$ pip install -e .
$ mcp-server-mikrotik
# ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mikrotik": {
      "command": "uvx",
      "args": [
        "mcp-server-mikrotik",
        "--host",     "<HOST>",
        "--username", "<USERNAME>",
        "--password", "<PASSWORD>",
        "--port",     "22"
      ]
    }
  }
}
# HTTP/SSE transport via Docker
$ docker run --rm -p 8000:8000 \
    -e MIKROTIK_HOST=192.168.88.1 \
    -e MIKROTIK_USERNAME=sshuser \
    -e MIKROTIK_PASSWORD=your_password \
    -e MIKROTIK_MCP__TRANSPORT=sse \
    mikrotik-mcp

# Server is up:
#   SSE:             http://localhost:8000/sse
#   Streamable HTTP: http://localhost:8000/mcp
#   Health probe:    GET /health

Stop clicking through Winbox.
Start describing what you want.

Free, MIT-licensed, runs on your hardware. The model never sees your password — it only sees the tools.