mikrotik-mcp
Provides tools for managing and monitoring MikroTik RouterOS devices, including system info, interfaces, DHCP leases, firewall rules, NAT rules, address lists, queues, routes, logs, WireGuard, DNS, and traffic. Read-only except for address-list management.
Allows retrieving WireGuard interface and peer information from the router, including endpoints, handshake times, and traffic statistics.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mikrotik-mcp
MCP server for MikroTik RouterOS. Talks to the router directly over the binary RouterOS API (port 8728) — a minimal hand-rolled implementation of the protocol (length encoding, sentence-based exchange, MD5-challenge login for older versions), no third-party RouterOS API library.
Intentionally read-only (with one exception — managing entries in a single address-list, see below). This is a deliberate architectural choice: the router is the most sensitive node in the network, and an LLM shouldn't be able to change firewall/NAT/routing directly.
Tools
Tool | Description |
| Model, RouterOS version, uptime, CPU, RAM |
| List of network interfaces with status |
| DHCP leases — who's connected to the network |
| Firewall filter rules, filterable by chain |
| NAT rules (dstnat/srcnat) |
| Contents of an address-list |
| Simple Queues — bandwidth limits |
| Routing table |
| The only write operations — add/remove an IP from an address-list (e.g. for blocking) |
| Recent log entries |
| Arbitrary read-only RouterOS command — only from an explicit whitelist in the code ( |
| WireGuard interfaces and peers (endpoint, handshake, rx/tx) |
| Router's static DNS entries |
| Instant per-interface throughput snapshot ( |
| JSON snapshot of key config sections — for diffing before/after manual changes |
Related MCP server: MikroTik MCP
Setup
git clone <this-repo> mikrotik-mcp && cd mikrotik-mcp
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # fill in MIKROTIK_HOST/USER/PASS, MCP_SECRET
uvicorn server:app --host 0.0.0.0 --port 8001Systemd unit example: deploy/mikrotik-mcp.service.
Docker:
docker build -t mikrotik-mcp .
docker run -p 8001:8001 --env-file .env mikrotik-mcpOn the router: create a dedicated user in a read-only group (/user group add name=ai-mcp-group policy=read,api,!write,!policy,!test,!winbox,!password,!web,!reboot,!ftp,!sniff,!sensitive,!romon), don't grant write/policy. Even if the server itself is compromised, access stays limited at the RouterOS level.
Security model
Auth is an
Authorization: Bearer $MCP_SECRETheader. EmptyMCP_SECRET= no check (local network/VPN only)./.well-known/oauth-authorization-server+/oauth/authorize+/oauth/tokenare a compatible stub for claude.ai custom connectors, which don't support a static API key — only full OAuth 2.1 or no auth at all. The actual protection is the Bearer token on/mcp, not this handshake. Via Claude Code CLI (claude mcp add --header ...) you don't need this stub at all.redirect_uriin/oauth/authorizeis checked against an allowlist (claude.ai,anthropic.com,console.anthropic.com,localhost).execute_commandruns strictly through a whitelist of root commands in the code — you cannot execute an arbitrary write command through this tool, even by trying.Transport: the server does not terminate TLS itself — it listens on plain HTTP. If it's reachable beyond localhost/a trusted LAN (and especially if you're connecting it as a custom connector in claude.ai, where HTTPS is required), put TLS termination in front of it: Cloudflare Tunnel, Tailscale Funnel, nginx/Caddy + Let's Encrypt, etc. Without that, the Bearer token (
MCP_SECRET) in theAuthorizationheader goes out in plaintext.
Requirements
MikroTik RouterOS 6.x/7.x with the API enabled (
/ip service enable api, port 8728 by default).Python 3.11+.
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Router default logins, compliance index, MAC/OUI lookup. Reads free; submit_correction is Pro.
Read-only access to your MetaTrader 4 and 5 accounts for AI agents: balances, open positions, trade history with win rate, live quotes, symbol specs and candles. It cannot place, modify or close orders.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Ask your AI about your Airbnb and VRBO listings, bookings, guest messages and reviews. Read-only.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA bridge between AI assistants and MikroTik RouterOS devices, allowing natural language interaction to manage network configurations including VLANs, firewalls, DNS settings, and more.1MIT
- AlicenseCqualityAmaintenanceProvides a bridge between AI assistants and MikroTik RouterOS devices, enabling natural language management of VLANs, firewall rules, DNS settings, and more.2341,052 PyPI334MIT
- AlicenseDqualityCmaintenanceEnables managing MikroTik RouterOS devices via natural language, with read-heavy network inspection and guarded write access across multiple routers.261Apache 2.0
- AlicenseNot gradedqualityCmaintenanceBridges AI assistants with MikroTik RouterOS devices, enabling natural language management of network configurations, firewall, VLANs, VPNs, and diagnostics via ~300 tools.1MIT