MikroTik MCP
Lets your AI agent manage MikroTik routers over SSH: firewall, NAT, routing, DHCP, DNS, VLANs and WireGuard.
320 stars on GitHubby wiresageLicense MITUpdated 18 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add mikrotik -- uvx mcp-server-mikrotik
What to fill in
| Name | What it is | Required |
|---|---|---|
MIKROTIK_HOST | IP address or hostname of the MikroTik router (single-device mode; default: 127.0.0.1). Not needed when an inventory is configured. | No |
MIKROTIK_USERNAME | SSH username for the MikroTik router (single-device mode; default: admin) | No |
MIKROTIK_PASSWORD | SSH password for the MikroTik router (single-device mode) | No |
MIKROTIK_PORT | SSH port of the MikroTik router (single-device mode; default: 22) | No |
MIKROTIK_KEY_FILENAME | Path to SSH private key file for key-based authentication (single-device mode) | No |
MIKROTIK_READ_ONLY | When true, expose only tools that do not modify RouterOS or its file store. Use a read-only RouterOS account as defence in depth. | No |
MIKROTIK_SENSITIVE_HIDING | When true, redact recognized credentials and private key material from tool results, MCP notifications, and logs, and omit tools that return opaque sensitive payloads. | No |
MIKROTIK_INVENTORY_FILE | Path to a YAML file listing multiple MikroTik devices (title, host, port, username, password, key_filename, tags, region). See docs/reference/inventory. | No |
MIKROTIK_INVENTORY | Inline multi-device inventory as a YAML (or JSON) list; takes precedence over MIKROTIK_INVENTORY_FILE and the single-device variables. Holds credentials. | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Show me the firewall rules on my main router.
Create a VLAN for guests on the office router.
What it is
MikroTik MCP bridges AI assistants and MikroTik RouterOS devices. You ask in plain words and the agent runs the matching router commands, such as managing VLANs, firewall rules and DNS settings. From version 0.14.0 it can manage several routers in one inventory.
What it can do
- Manage VLANs
- Configure firewall rules and NAT
- Handle DNS settings
- Routing, DHCP and WireGuard (listed in the registry description)
- Inventory of several MikroTik devices
- Works with Claude Desktop and MCP Inspector
When to use
- βΊWhen you want to change router settings by describing what you want
- βΊWhen you manage a fleet of MikroTik devices from one place
- βΊWhen you want to review firewall or DNS configuration with an assistant
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
linux-networkingHelps your agent configure and troubleshoot Linux networking, including firewall rules with nftables, routing, DNS and connections.edge-device-exploitationExplains how attackers target routers, firewalls and VPN devices at a network's edge, so network teams can check and patch them.homelab-network-readinessChecks home network readiness for VLAN segmentation, DNS filtering, and secure remote access.Frequently asked questions
Is it free?
It is MIT licensed, so you can use, modify and distribute it. The readme lists no price.
How does it talk to the router?
The registry description says over SSH.
Can it manage more than one router?
Yes. Since version 0.14.0 you can manage multiple MikroTik devices through an inventory.
Where are the install steps?
In the Installation Guide in the repo docs and on mikrotik-mcp.com.
Which clients does it work with?
The readme has a Claude Desktop integration guide and an MCP Inspector guide.
Can it break my router settings?
It can run configuration commands, so review requested changes before approving them.
If it does not work
- βΊCheck that SSH access to the router works with the same credentials from your computer.
- βΊTest the connection with MCP Inspector to see tool errors.
- βΊRestart your MCP client fully after changing its config.
5 new skills a week. 1 minute to read.