Back to Browse

Mikrotik MCP Server

Developer ToolsUse Caution3.2MCP RegistryLocal
Free

Server data from the Official MCP Registry

MCP server for MikroTik routers: firewall, NAT, routing, DHCP, DNS, WireGuard and more via SSH.

About

MCP server for MikroTik routers: firewall, NAT, routing, DHCP, DNS, WireGuard and more via SSH.

Security Report

3.2
Use Caution3.2High Risk

The MikroTik MCP server has reasonable authentication and permission handling, but contains multiple command injection vulnerabilities through unsafe string concatenation of user input into MikroTik commands. User-supplied parameters are directly interpolated into commands without proper escaping or validation, allowing potential command injection attacks. Additionally, there are missing input validations and broad error handling that could mask issues. Supply chain analysis found 7 known vulnerabilities in dependencies (0 critical, 2 high severity). Package verification found 1 issue.

5 files analyzed · 17 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

What You'll Need

Set these up before or after installing:

IP address or hostname of the MikroTik router (single-device mode; default: 127.0.0.1). Not needed when an inventory is configured.Optional

Environment variable: MIKROTIK_HOST

SSH username for the MikroTik router (single-device mode; default: admin)Optional

Environment variable: MIKROTIK_USERNAME

SSH password for the MikroTik router (single-device mode)Required

Environment variable: MIKROTIK_PASSWORD

SSH port of the MikroTik router (single-device mode; default: 22)Optional

Environment variable: MIKROTIK_PORT

Path to SSH private key file for key-based authentication (single-device mode)Optional

Environment variable: MIKROTIK_KEY_FILENAME

Path to a YAML file listing multiple MikroTik devices (title, host, port, username, password, key_filename, tags, region). See docs/reference/inventory.Optional

Environment variable: MIKROTIK_INVENTORY_FILE

Inline multi-device inventory as a YAML (or JSON) list; takes precedence over MIKROTIK_INVENTORY_FILE and the single-device variables. Holds credentials.Required

Environment variable: MIKROTIK_INVENTORY

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-jeff-nasseri-mikrotik-mcp": {
      "env": {
        "MIKROTIK_HOST": "your-mikrotik-host-here",
        "MIKROTIK_PORT": "your-mikrotik-port-here",
        "MIKROTIK_PASSWORD": "your-mikrotik-password-here",
        "MIKROTIK_USERNAME": "your-mikrotik-username-here",
        "MIKROTIK_INVENTORY": "your-mikrotik-inventory-here",
        "MIKROTIK_KEY_FILENAME": "your-mikrotik-key-filename-here",
        "MIKROTIK_INVENTORY_FILE": "your-mikrotik-inventory-file-here"
      },
      "args": [
        "mcp-server-mikrotik"
      ],
      "command": "uvx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

MikroTik MCP

MCP Toplist

MseeP.ai Security Assessment Badge

Website Build Status Tests MIT License

Overview

MikroTik MCP provides a bridge between AI assistants and MikroTik RouterOS devices. It allows AI assistants to interact with MikroTik routers through natural language requests, executing commands like managing VLANs, configuring firewall rules, handling DNS settings, and more.

Demo Videos

Claude Desktop

https://github.com/user-attachments/assets/24fadcdc-c6a8-48ed-90ac-74baf8f94b59

Inspector

https://github.com/user-attachments/assets/e0301ff2-8144-4503-83d0-48589d95027d

Inventory

[!NOTE] Since MikroTik MCP version 0.14.0, the MikroTik MCP will allow you to manage multiple MikroTik devices within your fleet structure. The following video simply shows how to use the inventory of MikroTik devices to let LLMs talk with your MikroTik devices.

https://github.com/user-attachments/assets/185b2c39-8f55-4f26-a74c-2ac459ad38f5

Documentation

📚 Full Documentation - Complete guides, API reference, and examples

🌐 Prefer to read online? The same documentation is also published at www.mikrotik-mcp.com (docs) — an optional, web-friendly way to explore the project while reviewing the repo.

Quick Links

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Reviews

No reviews yet

Be the first to review this server!