Skip to content
Back to search

MikroMCP

Production-grade MCP server for MikroTik RouterOS with secure AI-native network automation.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/AliKarami/MikroMCP with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/AliKarami/MikroMCP'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/alikarami--mikromcp/badge.svg)](/listings/alikarami--mikromcp)

HTML

<a href="/listings/alikarami--mikromcp"><img src="/api/listings/alikarami--mikromcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 244 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # MikroMCP
  2. <p align="center">
  3. <picture>
  4. <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/MikroMCP-logo-dark.png">
  5. <source media="(prefers-color-scheme: light)" srcset="./docs/assets/MikroMCP-logo-light.png">
  6. <img alt="MikroMCP" src="./docs/assets/MikroMCP-logo-dark.png" width="700">
  7. </picture>
  8. </p>
  9. > **AI-native network automation for MikroTik RouterOS and SwOS.** MikroMCP exposes RouterOS routers and SwOS switches as a typed, auditable [Model Context Protocol](https://modelcontextprotocol.io) server so Claude, Cursor, Codex, and other MCP clients can inspect, diagnose, and safely operate MikroTik gear in natural language.
  10. [![CI](https://github.com/AliKarami/MikroMCP/actions/workflows/ci.yml/badge.svg)](https://github.com/AliKarami/MikroMCP/actions/workflows/ci.yml)
  11. [![Release](https://github.com/AliKarami/MikroMCP/actions/workflows/release.yml/badge.svg)](https://github.com/AliKarami/MikroMCP/actions/workflows/release.yml)
  12. [![Version](https://img.shields.io/badge/version-v1.16.1-2DD4BF)](package.json)
  13. [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
  14. [![Node.js >= 22](https://img.shields.io/badge/node-%3E%3D22-339933)](package.json)
  15. [![RouterOS 7.x](https://img.shields.io/badge/RouterOS-7.x-293239)](https://help.mikrotik.com/docs/display/ROS/REST+API)
  16. [![MCP Server](https://img.shields.io/badge/MCP-server-6f42c1)](https://modelcontextprotocol.io)
  17. [![Tools](https://img.shields.io/badge/MCP%20tools-133-0f766e)](https://github.com/AliKarami/MikroMCP/wiki/Available-Tools)
  18. [![MikroMCP MCP server](https://glama.ai/mcp/servers/AliKarami/MikroMCP/badges/score.svg)](https://glama.ai/mcp/servers/AliKarami/MikroMCP)
  19. MikroMCP exists because raw router CLI access is the wrong abstraction for AI agents. RouterOS is powerful, but asking an LLM to improvise shell commands against production network gear is risky. MikroMCP gives agents a controlled tool surface: strict schemas, idempotent writes, dry-run previews, per-router circuit breakers, retry policies, RBAC, audit logs, snapshots, and rollback-aware change workflows.
  20. **In one sentence:** MikroMCP turns MikroTik RouterOS into a production-minded MCP control plane for AI infrastructure, DevOps automation, and modern router management.
  21. ![AI assistant connected through MikroMCP to a small MikroTik fleet, with tool calls flowing through validation, audit, and RouterOS REST](docs/assets/mikromcp-hero.png)
  22. ---
  23. ## Quick Start
  24. <p align="center">
  25. <img src="docs/assets/quickstart.svg" alt="MikroMCP quick start: npm install -g mikromcp, mikromcp init, then ask Claude Desktop about your router" width="760">
  26. </p>
  27. That's the whole setup for a single-router stdio deployment. For standalone binaries, Docker, HTTP/SSE mode, the RouterOS API prerequisites, and the full 15-minute walkthrough, see the **[Getting Started guide](https://github.com/AliKarami/MikroMCP/wiki/Getting-Started)**.
  28. ---
  29. ## Feature Showcase
  30. | Category | What MikroMCP covers |
  31. | -------------------------- | ----------------------------------------------------------------------------------------------------- |
  32. | 🧭 **Router management** | System status, clock, reboot, packages, files, scripts, scheduler jobs, containers |
  33. | 🌐 **Network operations** | Interfaces, VLANs, IP addresses, DHCP leases, DNS static records, bridge ports, WiFi clients |
  34. | 🔥 **Firewall and policy** | Filter/NAT rules, mangle rules, address lists, route tables, routing rules |
  35. | 🛰️ **Routing visibility** | Static routes, routing tables, BGP peers, OSPF neighbors |
  36. | 🔀 **SwOS switches** | *Experimental.* MikroTik SwOS and SwOS Lite switches (`deviceType: "swos"`) over the reverse-engineered `.b` HTTP API: port links, PoE, SFP diagnostics, guarded whole-blob writes with a firmware-compatibility check, the whole switch config as one YAML document (export, dry-run, apply), backups and firmware upgrades |
  37. | 🔐 **Secure access** | HTTP bearer auth, bcrypt token hashes, RBAC, router/tool restrictions, confirmation tokens |
  38. | 🧪 **Diagnostics** | Router-originated `ping`, `traceroute`, `torch`, log filtering, guarded SSH command execution |
  39. | 🛡️ **Change safety** | Dry-run, idempotent writes, snapshots, write journal, `plan_changes`, `apply_plan`, `rollback_change` |
  40. | ⚙️ **Production behavior** | Retries for read tools, per-router circuit breakers, correlation IDs, structured logs, audit logs |
  41. | 🤖 **AI-agent fit** | Human-readable responses plus structured JSON content for reasoning, chaining, and automation; server advertises an `instructions` string on MCP initialize so clients self-configure; optional [`routerId` resolved via `MIKROMCP_DEFAULT_ROUTER`](https://github.com/AliKarami/MikroMCP/wiki/Configuration) for single-router setups; [usage skill](docs/wiki/Using-the-Skill.md) for safe, guided tool use in Claude Code |
  42. | 🧩 **MCP compatibility** | stdio for desktop clients, Streamable HTTP and legacy SSE for remote or service-style clients |
  43. **133 typed tools** in total — browse the full catalog with parameters, defaults, and copy-paste example prompts in **[Available Tools](https://github.com/AliKarami/MikroMCP/wiki/Available-Tools)**.
  44. ---
  45. ## Demo
  46. ### Usage
  47. <p align="center">
  48. <img src="docs/assets/demo-1.gif" width="900" />
  49. </p>
  50. ### Review by Claude
  51. ![Claude Reviewed Router Configuration](docs/assets/claude-review.png)
  52. ---
  53. ## Real-World Usage Examples
  54. ### Router Inspection
  55. ```text
  56. Use MikroMCP to inspect core-01. Summarize system resources, RouterOS version,
  57. running interfaces, active routes, DNS settings, and recent warning/error logs.
  58. Flag anything that looks operationally risky.
  59. ```
  60. ### Firewall Management
  61. ```text
  62. List firewall filter and NAT rules on edge-01. Identify disabled rules,
  63. overlapping port forwards, broad accept rules, and anything without comments.
  64. Do not change anything yet.
  65. ```
  66. ### Safe Static Route Change
  67. ```text
  68. Dry-run a route on core-01 for 10.20.0.0/16 via 192.168.88.1 in the main table.
  69. Show the exact planned diff and tell me whether an existing route conflicts.
  70. ```
  71. ### WireGuard Operations
  72. ```text
  73. Show WireGuard peers on branch-02. Sort by last handshake age and flag peers
  74. that have not handshaken recently or have no transfer counters.
  75. ```
  76. ### Interface Diagnostics
  77. ```text
  78. Check interface health on edge-01, then run ping and traceroute from the router
  79. to 1.1.1.1. If packet loss is present, use torch on the WAN interface for a
  80. short traffic snapshot.
  81. ```
  82. ### Plan / Apply / Rollback Workflow
  83. ```text
  84. Create a change plan that adds a DNS record and a firewall address-list entry
  85. on edge-01. Use dry-run first, explain the plan, then wait for approval before
  86. applying anything.
  87. ```
  88. ---
  89. ## Why MikroMCP Is Useful For AI Agents
  90. MCP gives LLMs a standard way to call tools. MikroMCP makes RouterOS a high-quality MCP target by turning network operations into well-described, machine-readable, permission-aware actions.
  91. AI assistants can use MikroMCP to:
  92. - Investigate router state without memorizing RouterOS command syntax.
  93. - Chain tool calls across interfaces, routes, firewall rules, logs, and diagnostics.
  94. - Return both operator-friendly summaries and structured JSON for follow-up reasoning.
  95. - Preview changes before mutation and explain exactly what would happen.
  96. - Respect tool-level authorization, router scoping, maintenance windows, and confirmation gates.
  97. ---
  98. ## FAQ
  99. ### What is MikroMCP?
  100. MikroMCP is an open-source [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that exposes MikroTik RouterOS as 133 typed, auditable tools — letting AI assistants inspect, diagnose, and safely operate routers in natural language instead of improvising CLI commands.
  101. ### MikroMCP vs RouterOS API
  102. The RouterOS REST/API exposes raw endpoints. MikroMCP wraps them in schema-validated, idempotent, dry-run-able tools with RBAC, audit logging, snapshots, and rollback — the safety layer an LLM needs before it touches production gear.
  103. ### MikroMCP vs SSH automation
  104. Instead of brittle SSH scripts that screen-scrape CLI output, MikroMCP returns structured, typed results with confirmation gates and per-router circuit breakers. SSH is used only where REST can't reach — `ping` and guarded `run_command`.
  105. ### MikroMCP for Claude Code
  106. MikroMCP speaks MCP over stdio and HTTP/SSE, so Claude Code and Claude Desktop drive RouterOS directly. Pair it with the bundled [usage skill](docs/wiki/Using-the-Skill.md) for safe, guided workflows.
  107. ### MikroMCP for Codex
  108. Codex connects to MikroMCP over the standard MCP protocol — see [Connecting to AI Assistants](https://github.com/AliKarami/MikroMCP/wiki/Connecting-to-AI-Assistants).
  109. ### MikroMCP for Cursor
  110. Cursor connects to MikroMCP as an MCP server (stdio or HTTP) to inspect and manage MikroTik routers without leaving the editor.
  111. ### MikroMCP for OpenClaw
  112. Any MCP-compatible client — OpenClaw included — can use MikroMCP; configure it as a stdio or HTTP MCP server.
  113. ### RouterOS AI Automation Guide
  114. Start with [Getting Started](https://github.com/AliKarami/MikroMCP/wiki/Getting-Started) to install and connect, then use the [usage skill](docs/wiki/Using-the-Skill.md) and [Available Tools](https://github.com/AliKarami/MikroMCP/wiki/Available-Tools) to automate RouterOS safely with an AI assistant.
  115. ### Best MCP Servers for Network Engineers
  116. MikroMCP is purpose-built for MikroTik/RouterOS operations with production-grade safety — dry-run, rollback, audit, and RBAC — making it a strong MCP choice for network engineers adopting AI tooling.
  117. ---
  118. ## Documentation
  119. The README stays intentionally short. Everything below is documented in depth in the [wiki](https://github.com/AliKarami/MikroMCP/wiki):
  120. | Resource | Use it for |
  121. | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
  122. | [Getting Started](https://github.com/AliKarami/MikroMCP/wiki/Getting-Started) | Install (npm, binary, Docker), configure, and connect in 15 minutes |
  123. | [RouterOS API Setup](https://github.com/AliKarami/MikroMCP/wiki/RouterOS-API-Setup) | Enable the REST API, create a user, TLS and firewall |
  124. | [Configuration](https://github.com/AliKarami/MikroMCP/wiki/Configuration) | Router registry, credentials, all environment variables |
  125. | [Running](https://github.com/AliKarami/MikroMCP/wiki/Running) | Run commands, HTTP/SSE transport, troubleshooting |
  126. | [Connecting to Claude Desktop](https://github.com/AliKarami/MikroMCP/wiki/Connecting-to-Claude-Desktop) | Register MikroMCP in Claude Desktop |
  127. | [Connecting to AI Assistants](https://github.com/AliKarami/MikroMCP/wiki/Connecting-to-AI-Assistants) | Claude Code, Cursor, Codex, HTTP/Docker/systemd |
  128. | [Using the Skill](docs/wiki/Using-the-Skill.md) | Install the MikroMCP usage skill so your assistant drives the tools safely |
  129. | [Available Tools](https://github.com/AliKarami/MikroMCP/wiki/Available-Tools) | All 133 tools — parameters and example prompts |
  130. | [Architecture](https://github.com/AliKarami/MikroMCP/wiki/Architecture) | System layers, request pipeline, auth model |
  131. | [Error Handling](https://github.com/AliKarami/MikroMCP/wiki/Error-Handling) | Error categories, retry engine, circuit breaker |
  132. | [Security](https://github.com/AliKarami/MikroMCP/wiki/Security) | Threat model, hardening checklist, vulnerability reporting |
  133. | [Development](https://github.com/AliKarami/MikroMCP/wiki/Development) | Project structure, tests, MCP Inspector workflow |
  134. | [Contributing](https://github.com/AliKarami/MikroMCP/wiki/Contributing) | Adding tools, coding conventions, PR checklist |
  135. | [Roadmap](https://github.com/AliKarami/MikroMCP/wiki/Roadmap) · [ROADMAP.md](ROADMAP.md) | Shipped milestones and guiding principles |
  136. ---
  137. ## Contributing
  138. Issues, bug reports, tool requests, documentation improvements, and pull requests are welcome.
  139. Good first contributions:
  140. - Add a read-only tool for an uncovered RouterOS surface.
  141. - Add screenshots, demo GIFs, or topology diagrams.
  142. - Expand tests around RouterOS response normalization and idempotency edge cases.
  143. - Help validate RouterOS version compatibility across real MikroTik devices and CHR.
  144. Development standards:
  145. - TypeScript strict mode, ESM imports with `.js` extensions
  146. - Zod schemas with `.strict()`, idempotency and `dryRun` for write tools
  147. - `MikroMCPError` for domain errors, focused Vitest coverage for every tool
  148. Please open an issue before large changes so maintainers can align on scope.
  149. ### Acknowledgements
  150. - [@f0086](https://github.com/f0086) — SwOS / SwOS Lite switch support (v1.9.0), which took MikroMCP beyond RouterOS for the first time.
  151. - [@karamble](https://github.com/karamble) — full SwOS support (v1.14.0): the full-SwOS dialect, whole-switch config apply, backups, firmware upgrades, password changes and switch-bound secrets.
  152. ---
  153. ## Security
  154. MikroMCP controls real network devices — treat it like an operations system: least-privilege RouterOS users, verified TLS (or pinned fingerprints), credentials only in `~/.mikromcp/.env`, scoped RBAC identities, and audit logging for shared use. The full hardening checklist and vulnerability-reporting process are on the [Security page](https://github.com/AliKarami/MikroMCP/wiki/Security).
  155. ---
  156. ## Community And Support
  157. - ⭐ Star the repository if MikroMCP helps your MikroTik or MCP workflow.
  158. - 🍴 Fork it to add RouterOS surfaces your network depends on.
  159. - 🧵 Open an issue for bugs, feature requests, compatibility notes, or documentation gaps.
  160. ---
  161. ## License
  162. MikroMCP is released under the [MIT License](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.