Control MikroTik Routers with Natural Language
Enables natural language interaction with MikroTik RouterOS devices for managing network configurations like VLANs, firewall rules, and DHCP servers.
1.0.0Add to Favorites
Why it matters
Bridge the gap between AI assistants and MikroTik RouterOS devices. Interact with your network infrastructure using natural language to manage VLANs, firewall rules, DNS, and more.
Outcomes
What it gets done
Manage VLAN interfaces (create, view, update, delete)
Configure and manage DHCP servers and IP address assignments
Create and manage NAT rules and IP pools
Automate network operations through natural language commands
Install
Add it to your toolbox
Capabilities
Tools your agent gets
Overview
What this is, in full
What it does
Mikrotik MCP provides a bridge between AI assistants and MikroTik RouterOS devices, enabling natural language interaction with routers for managing VLANs, firewall rules, DNS settings, and other network operations.
Installation
Manual Installation
# Clone the repository
git clone https://github.com/jeff-nasseri/mikrotik-mcp/tree/master
cd mcp-mikrotik
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e .
# Run the server
mcp-server-mikrotik
Docker
git clone https://github.com/jeff-nasseri/mikrotik-mcp.git
cd mikrotik-mcp
docker build -t mikrotik-mcp .
Configuration
Cursor IDE
{
"mcpServers": {
"mikrotik-mcp-server": {
"command": "docker",
"args": [
"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"
]
}
}
}
Available Tools
| Tool | Description |
|---|---|
mikrotik_create_vlan_interface |
Creates a VLAN interface on the MikroTik device |
mikrotik_list_vlan_interfaces |
Lists VLAN interfaces on the MikroTik device |
mikrotik_get_vlan_interface |
Gets detailed information about a specific VLAN interface |
mikrotik_update_vlan_interface |
Updates an existing VLAN interface |
mikrotik_remove_vlan_interface |
Removes a VLAN interface from the MikroTik device |
mikrotik_add_ip_address |
Adds an IP address to an interface |
mikrotik_list_ip_addresses |
Lists IP addresses on the MikroTik device |
mikrotik_get_ip_address |
Gets detailed information about a specific IP address |
mikrotik_remove_ip_address |
Removes an IP address from the MikroTik device |
mikrotik_create_dhcp_server |
Creates a DHCP server on the MikroTik device |
mikrotik_list_dhcp_servers |
Lists DHCP servers on the MikroTik device |
mikrotik_get_dhcp_server |
Gets detailed information about a specific DHCP server |
mikrotik_create_dhcp_network |
Creates a DHCP network configuration |
mikrotik_create_dhcp_pool |
Creates a DHCP address pool |
mikrotik_remove_dhcp_server |
Removes a DHCP server from the MikroTik device |
Features
- VLAN interface management (create, view, update, delete)
- IP address management on interfaces
- DHCP server configuration and management
- NAT rule creation and management
- IP pool management and monitoring
- System backup and configuration export
- Integration testing with pytest and Docker
- Natural language interface for router operations
Environment Variables
Required
MIKROTIK_HOST- IP address or hostname of the MikroTik deviceMIKROTIK_USERNAME- SSH username for the MikroTik deviceMIKROTIK_PASSWORD- SSH password for the MikroTik device
Optional
MIKROTIK_PORT- SSH port for the MikroTik device (default: 22)
Notes
Requires Python 3.8+ and a MikroTik RouterOS device with API access enabled. Includes integration tests that run a temporary MikroTik RouterOS container for testing. Has a security rating badge from MseeP.ai.
Trust
How it checks out
Reviews
What people say after installing
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.