Get the FREE Ultimate OpenClaw Setup Guide →

mikrotik-cursor

Mikrotik MCP tool for Cursor AI

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio kevinpez-mikrotik-cursor-mcp python -m mcp_mikrotik.server \
  --env MIKROTIK_HOST="192.168.88.1" \
  --env MIKROTIK_PORT="22" \
  --env MIKROTIK_SSH_KEY="" \
  --env MIKROTIK_PASSWORD="your-password" \
  --env MIKROTIK_USERNAME="admin" \
  --env MIKROTIK_CMD_TIMEOUT="30" \
  --env MIKROTIK_KNOWN_HOSTS="" \
  --env MIKROTIK_CONNECT_TIMEOUT="10" \
  --env MIKROTIK_STRICT_HOST_KEY_CHECKING="false"

How to use

This MCP server provides a natural language interface to MikroTik RouterOS devices via Cursor IDE. It translates your plain-English requests into the necessary RouterOS API calls or SSH commands, allowing you to manage routers without memorizing RouterOS syntax. The server organizes 440+ actions into 19 categories and supports both API-based communication and an SSH fallback if the API is unavailable. To use it, open Cursor, start a chat, and describe what you want to do—examples include listing interfaces, creating backups, configuring firewall rules, or setting up VPN tunnels. The agent will interpret your request and execute the appropriate sequence of RouterOS operations, returning results or confirmations in Cursor.

How to install

Prerequisites:

  • Python 3.8+
  • Cursor IDE (for testing and interaction)
  • MikroTik RouterOS device with SSH or API enabled

Setup steps:

  1. Clone the repository and navigate to the project root:
git clone https://github.com/kevinpez/mikrotik-cursor-mcp.git
cd mikrotik-cursor-mcp
  1. Create and activate a virtual environment:
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/Mac
source .venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Install the package in editable mode (optional but common for development):
pip install -e .
  1. Configure Cursor MCP (see below) to point at this server, then restart Cursor and test with a sample command like:
Show me the system resources and uptime

Additional notes

Tips and troubleshooting:

  • Ensure the MikroTik host, username, and password are correct and that SSH/API access is enabled on the device.
  • If using SSH, you may want to provide an SSH key path via MIKROTIK_SSH_KEY and set MIKROTIK_STRICT_HOST_KEY_CHECKING to false for easier testing.
  • The configuration example uses a placeholder path to the Python module mcp_mikrotik.server; adjust the command and cwd if running from a different location or with a packaged install.
  • If you encounter connectivity or timeout issues, increase MIKROTIK_CONNECT_TIMEOUT and MIKROTIK_CMD_TIMEOUT values.
  • Cursor IDE caching can cause stale results; restart Cursor after changes to the mcp.json configuration.
  • The MCP server supports dual transport (API first with SSH fallback); ensure both channels are reachable if you rely on SSH-only devices.
  • For production, consider securing credentials with environment management or secret stores rather than embedding in plain text.

Related MCP Servers

Sponsor this space

Reach thousands of developers