Labsco
AliKarami logo

MikroMCP

β˜… 36

from AliKarami

AI-native network automation for MikroTik RouterOS. MikroMCP exposes RouterOS as a typed, auditable Model Context Protocol server so Claude, Cursor, Codex, and other MCP clients can inspect, diagnose, and safely operate MikroTik routers in natural language.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

MikroMCP

<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/MikroMCP-logo-dark.png"> <source media="(prefers-color-scheme: light)" srcset="./docs/assets/MikroMCP-logo-light.png"> <img alt="MikroMCP" src="./docs/assets/MikroMCP-logo-dark.png" width="700"> </picture> </p>

AI-native network automation for MikroTik RouterOS. MikroMCP exposes RouterOS as a typed, auditable Model Context Protocol server so Claude, Cursor, Codex, and other MCP clients can inspect, diagnose, and safely operate MikroTik routers in natural language.

CI Release Version License: MIT Node.js >= 22 RouterOS 7.x MCP Server Tools MikroMCP MCP server

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.

In one sentence: MikroMCP turns MikroTik RouterOS into a production-minded MCP control plane for AI infrastructure, DevOps automation, and modern router management.

AI assistant connected through MikroMCP to a small MikroTik fleet, with tool calls flowing through validation, audit, and RouterOS REST


Feature Showcase

CategoryWhat MikroMCP covers
🧭 Router managementSystem status, clock, reboot, packages, files, scripts, scheduler jobs, containers
🌐 Network operationsInterfaces, VLANs, IP addresses, DHCP leases, DNS static records, bridge ports, WiFi clients
πŸ”₯ Firewall and policyFilter/NAT rules, mangle rules, address lists, route tables, routing rules
πŸ›°οΈ Routing visibilityStatic routes, routing tables, BGP peers, OSPF neighbors
πŸ” Secure accessHTTP bearer auth, bcrypt token hashes, RBAC, router/tool restrictions, confirmation tokens
πŸ§ͺ DiagnosticsRouter-originated ping, traceroute, torch, log filtering, guarded SSH command execution
πŸ›‘οΈ Change safetyDry-run, idempotent writes, snapshots, write journal, plan_changes, apply_plan, rollback_change
βš™οΈ Production behaviorRetries for read tools, per-router circuit breakers, correlation IDs, structured logs, audit logs
πŸ€– AI-agent fitHuman-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 for single-router setups; usage skill for safe, guided tool use in Claude Code
🧩 MCP compatibilitystdio for desktop clients, Streamable HTTP and legacy SSE for remote or service-style clients

117 typed tools in total β€” browse the full catalog with parameters, defaults, and copy-paste example prompts in Available Tools.


Demo

Usage

<p align="center"> <img src="docs/assets/demo-1.gif" width="900" /> </p>

Review by Claude

Claude Reviewed Router Configuration


Why MikroMCP Is Useful For AI Agents

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.

AI assistants can use MikroMCP to:

  • Investigate router state without memorizing RouterOS command syntax.
  • Chain tool calls across interfaces, routes, firewall rules, logs, and diagnostics.
  • Return both operator-friendly summaries and structured JSON for follow-up reasoning.
  • Preview changes before mutation and explain exactly what would happen.
  • Respect tool-level authorization, router scoping, maintenance windows, and confirmation gates.

Documentation

The README stays intentionally short. Everything below is documented in depth in the wiki:

ResourceUse it for
Getting StartedInstall (npm, binary, Docker), configure, and connect in 15 minutes
RouterOS API SetupEnable the REST API, create a user, TLS and firewall
ConfigurationRouter registry, credentials, all environment variables
RunningRun commands, HTTP/SSE transport, troubleshooting
Connecting to Claude DesktopRegister MikroMCP in Claude Desktop
Connecting to AI AssistantsClaude Code, Cursor, Codex, HTTP/Docker/systemd
Using the SkillInstall the MikroMCP usage skill so your assistant drives the tools safely
Available ToolsAll 117 tools β€” parameters and example prompts
ArchitectureSystem layers, request pipeline, auth model
Error HandlingError categories, retry engine, circuit breaker
SecurityThreat model, hardening checklist, vulnerability reporting
DevelopmentProject structure, tests, MCP Inspector workflow
ContributingAdding tools, coding conventions, PR checklist
Roadmap Β· ROADMAP.mdShipped milestones and guiding principles

Contributing

Issues, bug reports, tool requests, documentation improvements, and pull requests are welcome.

Good first contributions:

  • Add a read-only tool for an uncovered RouterOS surface.
  • Add screenshots, demo GIFs, or topology diagrams.
  • Expand tests around RouterOS response normalization and idempotency edge cases.
  • Help validate RouterOS version compatibility across real MikroTik devices and CHR.

Development standards:

  • TypeScript strict mode, ESM imports with .js extensions
  • Zod schemas with .strict(), idempotency and dryRun for write tools
  • MikroMCPError for domain errors, focused Vitest coverage for every tool

Please open an issue before large changes so maintainers can align on scope.


Security

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.


Community And Support

  • ⭐ Star the repository if MikroMCP helps your MikroTik or MCP workflow.
  • 🍴 Fork it to add RouterOS surfaces your network depends on.
  • 🧡 Open an issue for bugs, feature requests, compatibility notes, or documentation gaps.

License

MikroMCP is released under the MIT License.