loading…
Search for a command to run...
loading…
Enables management of MikroTik routers running RouterOS 6 and 7 via SSH, Telnet, or API with automatic command adaptation. Provides over 46 MCP tools for device
Enables management of MikroTik routers running RouterOS 6 and 7 via SSH, Telnet, or API with automatic command adaptation. Provides over 46 MCP tools for device management, firewall, DHCP, VPN, configuration profiles, and more.
A robust Model Context Protocol (MCP) server for managing MikroTik routers running RouterOS 6 and 7. Provides seamless connectivity via SSH, Telnet, or API with automatic command adaptation.
Python version is simpler and easier to deploy!
pip install -e .
Copy and edit the example configuration:
cp devices.json.example devices.json
# Edit devices.json with your router details
Add to your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"mikrotik": {
"command": "python",
"args": ["-m", "mikrotik_mcp.server"]
}
}
}
Restart Claude Desktop and try:
List my MikroTik devices
Connect to router-main and show system info
📖 Read Full Python Documentation →
# Windows
install-python.bat
# Linux/macOS
chmod +x install-python.sh
./install-python.sh
npm install
npm run build
list_devices - List all configured routersconnect_device - Establish connectionexecute_command - Run any RouterOS commandget_system_info - System resourcesget_interfaces - Network interfacesget_firewall_rules - Firewall configurationbackup_config - Export configurationfirewall_add_filter_rule - Add filter rulesfirewall_add_nat_rule - Configure NATfirewall_add_address_list - Manage address listsfirewall_get_address_list - View address listsfirewall_remove_rule - Remove rulesdhcp_create_server - Create DHCP serverdhcp_add_network - Configure networkdhcp_add_static_lease - Add static leasesdhcp_create_pool - Create IP poolsdhcp_get_servers - List DHCP serversvpn_add_ipsec_peer, vpn_get_ipsec_peersvpn_add_l2tp_user, vpn_configure_l2tp_server, vpn_get_l2tp_connectionsvpn_add_wireguard_interface, vpn_add_wireguard_peer, vpn_get_wireguard_interfacesvpn_get_ppp_secretsprofile_list - List available profilesprofile_get - Get profile detailsprofile_preview - Preview commandsprofile_apply - Apply profile to deviceprofile_validate - Validate profileprofile_save_current - Save device config as profileexecute_batch_commands - Run multiple commandsget_fleet_status - Multi-device overviewexecute_on_all_devices - Run command on allcompare_configs - Compare two devicesget_command_history - Audit log accessget_device_audit_stats - Device statisticsget_connection_stats - Connection metricsexport_config - Export without savingrestore_config - Restore from backupmikrotik_mcp/
├── server.py # Main MCP server
├── device_manager.py # Device lifecycle management
├── models.py # Pydantic data models
├── connections/ # SSH, Telnet, API implementations
├── modules/ # Feature modules
│ ├── firewall.py # Firewall management
│ ├── dhcp.py # DHCP management
│ ├── vpn.py # VPN management
│ └── profiles.py # Configuration profiles
├── audit.py # Audit logging
├── cache.py # Response caching
├── retry.py # Connection retry logic
└── logger.py # Structured logging
devices.json or .env (already in .gitignore)# Run tests
pytest
# With coverage
pytest --cov=mikrotik_mcp --cov-report=html
# Specific test
pytest tests/test_device_manager.py
Contributions welcome! Please:
MIT License - See LICENSE file for details
Built with:
For issues:
Happy routing! 🚀
For detailed setup and usage, see the Python Documentation.
Выполни в терминале:
claude mcp add mikrotik-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.