# MikroMCP

MikroMCP gives AI clients tools for inspecting MikroTik RouterOS routers and SwOS switches. It supports network checks and guarded configuration changes with dry-run previews.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 79
- Author: AliKarami
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/AliKarami/MikroMCP
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/mikromcp

## What it does

The server exposes tools for checking RouterOS status, interfaces, routes, DHCP, DNS, and firewall rules. Agents can also run router-originated ping and traceroute diagnostics and inspect logs. Changes can be previewed before application; workflows include change plans, configuration snapshots, and rollback.

RBAC controls access, and operations are recorded in audit logs. Clients can connect over stdio, Streamable HTTP, or SSE. In Claude Code, the setup command launches the server through `npx -y mikromcp`. SwOS support is experimental: it relies on a reverse-engineered HTTP API and checks firmware compatibility, so the switch model and firmware matter for that feature.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MIKROMCP_CONFIG_PATH`, `MIKROMCP_STDIO_IDENTITY`, `MIKROMCP_LOG_LEVEL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MIKROMCP_CONFIG_PATH=<MIKROMCP_CONFIG_PATH> --env MIKROMCP_STDIO_IDENTITY=<MIKROMCP_STDIO_IDENTITY> --env MIKROMCP_LOG_LEVEL=<MIKROMCP_LOG_LEVEL> --transport stdio mikromcp -- npx -y mikromcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mikromcp --env MIKROMCP_CONFIG_PATH=<MIKROMCP_CONFIG_PATH> --env MIKROMCP_STDIO_IDENTITY=<MIKROMCP_STDIO_IDENTITY> --env MIKROMCP_LOG_LEVEL=<MIKROMCP_LOG_LEVEL> -- npx -y mikromcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mikromcp": {
            "command": "npx",
            "args": [
                "-y",
                "mikromcp"
            ],
            "env": {
                "MIKROMCP_CONFIG_PATH": "<MIKROMCP_CONFIG_PATH>",
                "MIKROMCP_STDIO_IDENTITY": "<MIKROMCP_STDIO_IDENTITY>",
                "MIKROMCP_LOG_LEVEL": "<MIKROMCP_LOG_LEVEL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mikromcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mikromcp"
            ],
            "env": {
                "MIKROMCP_CONFIG_PATH": "<MIKROMCP_CONFIG_PATH>",
                "MIKROMCP_STDIO_IDENTITY": "<MIKROMCP_STDIO_IDENTITY>",
                "MIKROMCP_LOG_LEVEL": "<MIKROMCP_LOG_LEVEL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MIKROMCP_CONFIG_PATH=<MIKROMCP_CONFIG_PATH> -e MIKROMCP_STDIO_IDENTITY=<MIKROMCP_STDIO_IDENTITY> -e MIKROMCP_LOG_LEVEL=<MIKROMCP_LOG_LEVEL> mikromcp npx -y mikromcp
```
Replace <…> with your own values

## When to use it
- Inspect router status and recent warning or error logs
- Find disabled or overly broad firewall rules
- Review a route before changing router configuration
- Run ping and traceroute from the router
- Prepare a configuration change and roll it back if needed

## Example prompts
- Inspect system resources, routes, and recent error logs on `core-01`.
- Find disabled firewall rules on `edge-01` and report them without making changes.
- Prepare a static route change for `core-01`, show the preview, and wait for my approval.

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23643
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
