Get the FREE Ultimate OpenClaw Setup Guide โ†’

mikrotik

MCP server for Mikrotik

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jeff-nasseri-mikrotik-mcp docker run -i jeff-nasseri/mikrotik-mcp

How to use

This MikroTik MCP server provides a bridge between AI assistants and MikroTik RouterOS devices. It enables natural language requests to be translated into RouterOS commands for tasks such as managing VLANs, configuring firewall rules, DNS settings, and other common network management operations. The server exposes an API/interface that lets an AI agent generate, validate, and execute RouterOS commands, while providing feedback and results back to the user. Use it to script routine network configurations, audit rules, or automate changes across one or more MikroTik devices. The available tooling focuses on translating intents into safe, idempotent RouterOS configurations and returning structured results (success status, command outputs, and error messages) for easy integration into higher-level automation flows.

To use the server in your workflow, authenticate with your MikroTik device credentials (host, user, and password or API token as supported), then send a request that describes the desired network change in natural language or a structured intent. The MCP backend will parse the intent, generate the appropriate RouterOS commands, apply them to the target device(s), and return the results. You can integrate this with chatbots, automation pipelines, or testing tools to validate configurations before applying them to production devices. The included documentation also covers testing and integration with tools like Claude Desktop and the MCP Inspector for interactive testing and validation.

How to install

Prerequisites:

  • Docker installed on the host (Docker Desktop on Windows/macOS or Docker Engine on Linux)
  • Access to the MikroTik RouterOS device(s) you want to manage
  • Optional: environment to securely store credentials (e.g., Docker secrets or environment variables)

Installation steps:

  1. Pull and run the MCP Docker image:

    docker run -d --name mikrotik-mcp
    -e MT_HOST=YOUR_MIKROTIK_HOST
    -e MT_USER=YOUR_MIKROTIK_USERNAME
    -e MT_PASSWORD=YOUR_MIKROTIK_PASSWORD
    jeff-nasseri/mikrotik-mcp

    Replace YOUR_MIKROTIK_HOST, YOUR_MIKROTIK_USERNAME, and YOUR_MIKROTIK_PASSWORD with your MikroTik device credentials.

  2. (Optional) Use a docker-compose file for easier management:

    version: '3' services: mikrotik-mcp: image: jeff-nasseri/mikrotik-mcp environment: MT_HOST: your-mikrotik-host MT_USER: your-username MT_PASSWORD: your-password stdin_open: true tty: true

  3. Verify the service is running and reachable. Check container logs:

    docker logs -f mikrotik-mcp

  4. Consult the provided Quick Start or Documentation in the repository for model prompts, intents, and example commands to run against MikroTik RouterOS devices.

Additional notes

Environment variables and configuration:

  • MT_HOST: Hostname or IP address of the MikroTik RouterOS device.
  • MT_USER: Username with appropriate privileges on the MikroTik device.
  • MT_PASSWORD: Password for the MikroTik user (consider using a more secure credential store in production).
  • MT_PORT (optional): The API/SSH port for connecting to the MikroTik device if not using default ports.

Security considerations:

  • Limit access to the MCP service to trusted AI agents and users.
  • Use network segmentation or a VPN to restrict access to MikroTik devices.
  • Rotate credentials periodically and consider using API tokens or SSH keys where supported.

Common issues:

  • Connectivity failures: verify MT_HOST is reachable and that the MikroTik device accepts connections from the MCP host.
  • Authentication failures: confirm credentials have the required permissions.
  • Command errors: review the generated RouterOS commands in the MCP logs or output to refine intents and safety checks.

Configuration options:

  • The MCP supports multiple devices; you can scale by adding more server entries and pointing intents to the correct MT_HOST values. Consult docs for intent schemas and safe-commands templates.

Related MCP Servers

Sponsor this space

Reach thousands of developers โ†—