MikroMCP — Claude Code MCP server: features and setup
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.
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 mikromcpWhat MikroMCP 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.
What it helps with
- 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 for the agent
- Inspect system resources, routes, and recent error logs on
core-01. - Find disabled firewall rules on
edge-01and report them without making changes. - Prepare a static route change for
core-01, show the preview, and wait for my approval.
How to install MikroMCP
Platform CLI
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 mikromcpReplace <…> with your own values
Platform CLI
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 mikromcpReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
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 mikromcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about MikroMCP
How do I install MikroMCP in Claude Code?
Run claude mcp add mikromcp -- npx -y mikromcp. For the environment-variable setup, run `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`.
What does MikroMCP do?
It connects AI clients to MikroTik devices with tools for RouterOS and SwOS inspection, diagnostics, and management. Changes can be previewed, and operations are logged for auditing.
What should I know about MikroMCP’s SwOS support?
SwOS support is experimental and uses a reverse-engineered HTTP API. Firmware compatibility is checked for switch configuration operations.