# OpenWrt MCP

> OpenWrt MCP is an open-source MCP server for cloud and infrastructure. MCP server running on an OpenWrt router so AI clients can inspect and change it safely. It is available on CLI, Linux and self-hosted.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, self-hosted
- **Repository:** https://github.com/stanislav-testhub/openwrt-mcp
- **MCP Registry name:** io.github.stanislav-testhub/openwrt-mcp
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-11-18

## About

The README says this server runs directly on an OpenWrt router rather than on a PC, so an MCP client such as Claude Code can read system state and make configuration changes over an SSH session the owner sets up. Access is deny-by-default: each client gets explicit grants per tool and scope, with expiry and rate limits, and configuration changes are staged, checked and armed for automatic rollback until confirmed.

The project targets stock OpenWrt 25.12 (apk, fw4/nftables) and 24.10 (opkg). It is described as a single static binary with no dependencies, with logging of every call to an audit log and masking of secret values in tool output. Outbound network actions such as ping, package queries with refresh, or sysupgrade checks are flagged in the tool annotations and each needs a grant.

It is a port of an earlier GlassOnTin project for GL.iNet firmware, and suits people who want an assistant to diagnose or reconfigure their own router while keeping a record and a way back from bad changes.

## Features

- **Deny-by-default access:** Each client receives explicit per-tool and per-scope grants with expiry and a calls-per-minute limit.
- **Rollback-armed changes:** Configuration edits are staged and checked, then reverted automatically unless confirmed, including after a reboot.
- **Audit log:** Tool calls are recorded in an audit log kept on the router.
- **Runs on the router:** The server is installed on the OpenWrt device itself and reached over SSH or a loopback HTTP tunnel.
- **Broad tool set:** Tools cover system status, logs, Wi-Fi clients, firewall, UCI config, packages, WireGuard and service control.
- **LuCI approval page:** A LuCI page shows status, pending requests and the audit log, and lets an administrator allow or deny access.

## Good for

- Diagnosing why a router's Wi-Fi or internet connection is slow or dropping
- Reviewing a router's security settings and exposed ports
- Planning and applying a UCI configuration change with an automatic rollback
- Managing WireGuard peers and generating client keys
- Checking which packages need upgrading before a sysupgrade

## Tools

- `system_status`: Model, release, uptime, load, memory, storage, interfaces and health findings.
- `logread`: Filters and summarises the router's log buffer.
- `network_clients`: Lists DHCP leases, neighbours and Wi-Fi association data joined by MAC.
- `firewall_show`: Shows the nftables ruleset, fw4 print and fw4 check output.
- `net_diag`: Ping, traceroute, nslookup, routes and neighbour diagnostics.
- `uci_get`: Reads UCI configuration with revision and history.
- `uci_apply`: Stages, checks and commits UCI changes with rollback armed.
- `uci_confirm`: Makes a pending change permanent.
- `uci_rollback`: Undoes a pending change.
- `service_list`: Lists procd services and add-on status.
- `service_control`: Starts, stops or restarts services and waits for the state to settle.
- `pkg_query`: Queries installed, upgradable and searchable packages.
- `pkg_change`: Adds, removes or upgrades packages, simulating unless commit is set.
- `sysupgrade`: Lists preserved files, validates images and creates backups; never flashes.
- `wg_list_clients`: Lists WireGuard peers with handshake and traffic data.
- `wg_new_client`: Creates a WireGuard keypair and peer configuration.
- `wg_remove_client`: Removes a WireGuard peer by name, key or section.
- `ubus_list`: Lists available ubus objects, methods and arguments.
- `ubus_call`: Calls any ubus method on the router.
- `exec`: Runs one program without a shell; a grant is a root shell equivalent for some programs.
- `mfa_unlock`: Opens the TOTP window for MFA-gated tools.
- `request_access`: Creates access requests for the operator to approve.

## FAQ

### Where does the server run?

According to the README, it runs on the OpenWrt router itself as a single binary, not on a PC.

### Which OpenWrt versions are supported?

The README names stock OpenWrt 25.12 (apk) and 24.10 (opkg), both with fw4/nftables. OpenWrt 21.02 and older are described as best effort.

### Does the server send telemetry or make outbound connections?

The README says the server makes no outbound connections of its own and sends no telemetry.

### Can it flash firmware?

No. The README states the sysupgrade tool never flashes an image.

### Is OpenWrt MCP free?

Yes. OpenWrt MCP is open source, so you can use and self-host it for free.

### What are the best alternatives to OpenWrt MCP?

The closest alternatives to OpenWrt MCP are Linux MCP daemon (mcpd), Komodo MCP Server, arr-mcp, Tailscale MCP by usefulapi and VPS MCP & Digital Secretary.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.

## Alternatives

- [Linux MCP daemon (mcpd)](https://ai-powered.com/mcp/linux-mcp-daemon-mcpd): Linux MCP daemon (mcpd) is an open-source MCP server for cloud and infrastructure.
- [Komodo MCP Server](https://ai-powered.com/mcp/komodo-mcp-server-2): Komodo MCP Server is an open-source MCP server for cloud and infrastructure.
- [arr-mcp](https://ai-powered.com/mcp/arr-mcp): arr-mcp is an open-source MCP server for events and entertainment.
- [Tailscale MCP by usefulapi](https://ai-powered.com/mcp/tailscale-mcp-by-usefulapi): Tailscale MCP by usefulapi is a freemium MCP server for cloud and infrastructure.
- [VPS MCP & Digital Secretary](https://ai-powered.com/mcp/vps-mcp-and-digital-secretary): VPS MCP & Digital Secretary is an open-source MCP server for cloud and infrastructure.
- [UpCloud MCP by usefulapi](https://ai-powered.com/mcp/upcloud-mcp-by-usefulapi): UpCloud MCP by usefulapi is a freemium MCP server for cloud and infrastructure.
- [WatchGuard MCP](https://ai-powered.com/mcp/watchguard-mcp): WatchGuard MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/openwrt-mcp
