Back to Browse

Openwrt MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

MCP server that runs on an OpenWrt router: deny-by-default policy, audit log, rollback-armed changes

About

MCP server that runs on an OpenWrt router: deny-by-default policy, audit log, rollback-armed changes

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (1 strong, 1 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry.

4 files analyzed · No issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

How to Install

Install command not verified. See the repository for install instructions.

View repository

Documentation

View on GitHub

From the project's GitHub README.

openwrt-mcp -- an MCP server for OpenWrt 24.10 and 25.12

English · Русский · 简体中文

CI Release License: MIT OpenWrt 24.10+ M8ven Score

An MCP server that runs on an OpenWrt router, so Claude Code (or any MCP client) can inspect and change it -- behind deny-by-default policies, an audit log, and an automatic rollback for configuration changes.

Local and private. The server makes no outbound connections of its own and sends no telemetry; it listens on loopback and on a root-only socket, and talks to your client over an SSH session you set up. The tools that can make the router itself reach out (net_diag, pkg_query with refresh, pkg_change, sysupgrade check, the uci_apply probes, ubus_call, exec) say so in their MCP annotations (openWorldHint), and each needs a grant from you. Secret values are masked in tool output by default, and a new WireGuard key never enters the conversation unless you ask for it.

Footprint. One static binary with no dependencies: 9.1 to 11.3 MB for the router architectures (9.6 MB on arm64, about 3.7 MB compressed in the release archive), about 10 MB resident on a GL-MT6000 right after start, and 23 tools in about 22 KB of tool descriptions. Every release file is checksummed and carries a build attestation.

Resident / anonymous (VmRSS / RssAnon)Idle daemonOne bridgeDaemon after the golden calls
amd64, build host10.9 / 1.8 MB10.9 / 2.1 MB17.6 / 7.3 MB
x86-64 in the 24.10.8 and 25.12.5 rootfs (CI, two runs each)10.5 to 10.7 / 1.8 to 2.0 MB10.2 to 10.3 / 1.6 to 1.8 MB16.4 to 16.8 / 6.5 to 6.9 MB
mipsle-softfloat, 25.12.6 system emulation10.3 / – MB10.0 / 0.9 MB16.3 / 5.2 MB

bench/footprint.sh; the stripped binary is 11.6 MB on amd64 (11.4 MB in the CI rootfs run) and 12.4 MB on mipsle. Resident includes the mapped binary, so anonymous memory is what memory_limit and the small profile act on. The CI row is the lowest and highest of four job summaries (the figures move by a few hundred kB between runs); the MIPS row is QEMU system emulation, not a router, see docs/resource-footprint.md.

Based on GlassOnTin/openwrt-mcp by Ian Williams, which targets GL.iNet firmware 4.x (OpenWrt 21.02, opkg). This is a port to stock OpenWrt 25.12 (apk, fw4/nftables, procd, netifd, LuCI JS). The security core is upstream's; see Credits for what came from where.

Requirements

  • Router: stock OpenWrt 25.12 (apk) or 24.10 (opkg), both with fw4/nftables. Nothing to install on the router beforehand. The package tools pick the manager from the binaries on the router (apk first, then opkg); system_status says which one and which firewall it found.
    • What differs on 24.10: pkg_query has no policy and no audit (opkg has neither; the tool says so). pkg_change simulates with opkg --noaction. New package defaults arrive as <file>-opkg instead of <file>.apk-new, and pkg_config_diff / pkg_config_resolve handle both (the old copy is kept as .pre-opkg-new; for /etc/config/NAME as the hidden .NAME.pre-opkg-new, which reload_config skips). Adding or removing a WireGuard peer re-runs ifup for the interface (24.10's handler cannot sync peers in place), so every tunnel's sessions restart for a moment. world lists the packages opkg marks "user installed". system_status mode=doctor reports opkg-new-pending; mode=audit skips the package audit and says why.
    • fw3 (OpenWrt 21.02 and older, or firmware built on it): best effort. firewall_show answers ruleset (iptables-save, IPv4) and rendered (fw3 -q print); check, table and chain are refused; a firewall apply is not pre-checked.
    • Tested on: 25.12.5 on a GL-MT6000 (hardware); the unit tests run both managers on fakes; CI runs the package and uci tools in the openwrt/rootfs container of 24.10 and 25.12 (no ubus or netifd there, so network, wireless and firewall paths are not covered). Firmware derived from OpenWrt (GL.iNet, ImmortalWrt) is best effort.
  • Your PC: OpenSSH (Windows 10 and later, macOS and Linux have it). Installing from a release needs nothing else. Building from source needs Go 1.26+, ssh and tar (Linux, macOS, or Git Bash on Windows).
  • Any CPU OpenWrt and Go share: the release has a binary for each (arm64, armv5/v7, mips/mipsle softfloat, mips64/mips64le, x86, x86-64, riscv64); install.sh reads the router's DISTRIB_ARCH and picks it, or cross-compiles when you build from source.

Tested on a GL.iNet GL-MT6000 (mediatek/filogic, aarch64_cortex-a53) with OpenWrt 25.12.5. Nothing in the code is specific to that board.


How it differs from other OpenWrt MCP servers

From each project's own README on 2026-10-07; "not stated" means the README does not say. Corrections are welcome.

this projectopenwrt_ssh_mcppaulomac1000/openwrt-mcpopenwrt-luci-mcp
Runs onthe routera PC, in Dockera PC, in Docker or Pythona PC, in Node.js
Reaches the router bySSH to a key-bound forced command, or loopback HTTPSSHSSHLuCI's HTTP /ubus
Changes configurationyes, through one tool that checks first and arms a rollbackyes, including packages and a firmware flashread-only unless ENABLE_WRITE_OPERATIONS=1no
Automatic rollback of a bad changeyes, and it survives a rebootnot statednot statednot applicable
Access control and auditper-client grants with scopes, expiry and a rate limit, audit log, optional TOTPcommand whitelist, audit logaudit logsecrets hidden, no audit log
Package managerapk (25.12) or opkg (24.10)opkgopkglists installed and available
Flashing firmwareneveryesnot statedno
Needs on the routerthe binarySSHSSHuhttpd-mod-ubus, rpcd

What changed from upstream

upstream 0.5 (21.02 / GL.iNet)this port (25.12)
Packaging.ipk for opkginstall.sh file install + keep.d (25.12's apk has no mkpkg; see below)
Web UIGL.iNet oui-httpd pageLuCI page, Services -> MCP Server: status, and approve or deny requests
TransportHTTP over an ssh -L tunnelsame, plus stdio over SSH via a key-bound forced command -- no tunnel to keep alive
Rollback snapshot/tmp (lost on reboot)on flash; an unconfirmed change is rolled back at the next start, including after a power cycle
uci_applyset / create / delete+ add_list, del_list, set_list, dry_run, shows the staged uci changes, strict name validation. A dry run ends with advice, warnings from this change.
Reloadubus call uci reload_config (async)/sbin/reload_config, plus explicit config.change events when it has no checksums (first run after boot)
WireGuardGL wireguard_server / gl_ddnsstock network.<iface> + wireguard_<iface> peers, DDNS from ddns, CGNAT warning, PSK, list and remove
Packages--pkg_query, pkg_change (simulate first), .apk-new review with a settings-level diff
Firewall--firewall_show: nft ruleset, fw4 print, fw4 check
Services--service_list / service_control via rpcd rc
Scope globs[0] was a character classbrackets are literal: firewall.@rule[3].* means what it says
Presets--`openwrt-mcp allow @readonly

Tools

ToolScope
system_statustoolModel, release, uptime, load, memory, storage, temperatures, conntrack, every interface (state, addresses, default route, errors), radios/SSIDs, and what is outstanding. Call first. mode=doctor returns ranked health findings (radio down, interface without an address, enabled service that died, conntrack and storage nearly full, pending .apk-new, NTP or an unset clock, a newer kernel installed than running). `history=1h
logreadtoolWhole log buffer filtered (substring, RE2, last N minutes) before the line limit; offset pages back from the newest line. mode=summary collapses it to distinct messages (numbers, addresses and ids become placeholders) with count, first and last time and worst severity. baseline=save returns a token; baseline=<token> shows only the messages that were not in the log then. Baselines hold fingerprints, not log text, and live in memory.
network_clientstoolDHCP leases + static hosts + neighbour table + every AP's association list, joined by MAC: name, IP, SSID, signal, rates, connected time, each client's share of its radio's airtime (from hostapd), lease; 100 rows a page, offset for the next.
firewall_showtoolnft list ruleset, fw4 print, fw4 check, one table or chain.
net_diag<action>[.<target>]ping / traceroute / nslookup (optionally from a given interface), routes, policy rules, neighbours. wifi_survey reports, per radio, how busy the channel it stays on has been (busy, rx and tx airtime, noise); other channels are unmeasured, so it never recommends one. traffic samples interface rates for a few seconds and ranks the conntrack table by source. usage reads nlbwmon's totals per device for an accounting period (a month by default). All three only read. throughput runs iperf3 against a server you name, 3 s up and 3 s down by default, 5 s each at most, and reports Mbit/s; capture runs tcpdump on one interface for at most 10 s or 2000 packets, with a filter of BPF primitives only, and returns a summary (protocols, top senders, TCP resets, DNS names asked), never the packets. bufferbloat pings the same server alone, then while iperf3 fills the link upload and download (5 s each way by default, 10 at most), and reports the added latency under load with a grade (A+ under 5 ms, A under 30, B under 60, C under 200, D under 400, F beyond); a server across your WAN is the one that measures your uplink, and a bad grade points at SQM (the tune-sqm prompt). These need the binary installed and are not in @readonly or @operator: grant throughput.*, bufferbloat.* and capture.* by name.
uci_get<config>[.<section>[.<option>]]; refs for a name searchuci show, optionally with stable cfgXXXXXX ids. Ends with the config's revision. history=list / diff:<id> shows the kept versions from before each confirmed change. refs=NAME finds what defines and uses a name across configs. view=vlan_matrix shows the bridge-vlan sections of network (DSA) as a port by VLAN table (T tagged, U untagged, * PVID, the bridge's own membership) and lists what it can see wrong: a VLAN defined twice, two PVIDs on one port, a port the bridge does not own.
uci_apply<config>.<section>[.<option>] per change; <config> for restore; probe.<kind>.<target> per probeStage, check, commit, reload, rollback armed. dry_run shows exactly what would change and what the service's own checker says. expected_revisions refuses if a config moved meanwhile, probe checks the router afterwards, restore=<id> puts a past version back. After the commit the config is read back; a change the router did not keep is NOT_APPLIED and nothing is reloaded.
uci_confirm / uci_rollbacktoolMake a pending change permanent / undo it now.
service_list / service_controltool, <service>.detail / <service>.<action>procd services; service_list detail=NAME returns an installed add-on's own status (tailscale, AdGuard Home, podkop, and the 1.7 wave: adblock, adblock-fast, banIP, ddns, https-dns-proxy, miniupnpd, mwan3, pbr, sqm, ttyd; the plain list names the ones installed here); stopping or disabling dropbear, network, rpcd or openwrt-mcp is refused. service_control waits for the state to settle (wait) and says if it did not; a final state that contradicts the action is NOT_APPLIED. Add-on verbs (`action=refresh
pkg_querytoolinstalled, upgradable, search, info, files, owner, policy, apk audit, world; 200 lines a page, offset for the next.
pkg_change<action>.<pkg> / upgradeapk add/del/upgrade; simulates unless commit=true; reports new .apk-new files; checks /etc/apk/world afterwards.
pkg_config_difftoolEvery .apk-new as a diff against the live file -- for /etc/config/* by setting (uci show), so quoting/indentation noise disappears.
pkg_config_resolvelive pathkeep_current (drop the new default) or use_new (install it; rollback-armed for UCI configs).
sysupgrade<action>list (preserved files), test (validate an image in /tmp), check (owut), plan (added packages, target release, changed /etc files not kept), backup (mode 0600; the previous archive this tool made is removed). Never flashes.
wg_list_clientstoolPeers with handshake age, endpoint, traffic, config/kernel mismatch, duplicate names.
client_accessclient.<mac>, e.g. client.aa:bb:cc:dd:ee:01; kick.<mac> for kickCut one device off the internet: block, schedule (blocked from..until, optional days; past midnight is split into two rules) or allow (remove its rules). Compiles to fw4 REJECT rules (src_mac, start_time, weekdays, dest wan), named mcpdev_<mac>_<n>, through the rollback-armed apply. The device keeps LAN, DHCP and DNS. kick disconnects it from Wi-Fi now (hostapd del_client with a deauth frame, from every interface it is on; ban_seconds up to 3600 keeps it off): a separate scope kick.<mac>, not in @operator, no rollback because no config changes. Rules from config rule cover uci_apply only, not this tool.
managed_file<kind>.<action>, e.g. dnsmasq.write, crontab.readFiles outside UCI by kind: crontab (/etc/crontabs/root), dnsmasq (/etc/dnsmasq.d/<name>.conf), hosts, sysupgrade_conf. Actions list, read, write (the whole file; dry_run validates and shows the diff), history, diff and restore with an id. A write is validated per kind (cron format, dnsmasq --test with no script or include directives, hosts and sysupgrade.conf syntax), atomic with the old mode and owner, re-read afterwards, keeps the old version in the history (history_keep) and reloads the service. A symlink at the target is refused. Values named like secrets are masked in reads and diffs. In no preset: a crontab write is a root shell, so it needs a named grant. Kind path (scope path.<action>) takes an absolute path and is off until the owner lists globs: list managed_path '/etc/blocklists/*' in config server (* never crosses a /). The path must be already clean, outside the deny floor (the policy, rpcd, SSH keys, shadow, passwd, *.key/*.pem), have no symlink among its directories, and its directory must exist; the content must be UTF-8 text. No validator and no reload: use a typed kind when there is one.
wg_new_clientwireguard.<iface>; wireguard.<iface>.reveal for reveal=trueKeypair, next free address, peer saved in the network config; uci_confirm keeps it. The private key and config go to a root-only file; you collect them with openwrt-mcp wg-show <name> (config and QR in your own terminal). reveal=true returns them in the result instead.
wg_remove_clientwireguard.<iface>.<name>By name, key or section, from the config and the interface; rollback armed (uci_confirm keeps it). Refuses a peer connected in the last 3 minutes, or this session's own, unless force=true.
ubus_list(ungated)Discovery: every object, method and argument signature.
ubus_call<object>.<method>Anything else on the bus. Replies over 8 KB have long arrays pruned.
execargv[0]One program, no shell. A grant for sh, find, awk, env, ssh and the like is a root shell: allow refuses it without --shell-equivalent.
mfa_unlock(ungated)Opens the TOTP window for MFA-gated tools.
request_access(ungated)Opens one request per entry at once, without waiting, so the operator answers them together. Grants nothing.

Prompts. Clients that show MCP prompts (as slash commands, usually) get eleven recipes: router-health, who-is-online, secure-my-router, wifi-doctor, upgrade-plan, block-ads, multi-wan, vpn-policy-routing, expose-service-safely, remote-access and tune-sqm. Each is a few lines that name the tools to call and end in a report or a proposal, never a change. They use only what the @readonly preset grants, so a read-only client can follow them to the end, and they cost nothing until used. Listing or fetching one runs nothing on the router, so no policy applies and nothing is audited.


Warnings, references, peers and add-ons

Warnings in a dry run. uci_apply dry_run ends with warnings from this change: findings the change would add that the router does not have today, ranked like the audit's, each with a next step and an OpenWrt wiki page. They are advice, never a refusal. They cover a port or port forward opened to the internet, WAN zone input or forward set to ACCEPT, SSH password logins switched on, an SSID left without encryption, a name a change removes or misspells while other sections still use it (ref-removed, ref-unknown, with a "did you mean" for a case mismatch), and a change that turns off the Wi-Fi network your own session is connected through (radio-in-use). Something already wrong before the change is not reported again. A real apply does not repeat them, so run the dry run first.

The management path follows your session. Besides the LAN, its bridge, the SSH listener and the zone and rule for SSH, the interface your own SSH connection arrives through counts as the management path (the daemon resolves the client address with ip route get), so changes to a WireGuard tunnel you are connected over need a probe or force=true like changes to the LAN.

Before you rename or delete an interface, zone or device. uci_get refs=lan lists what defines the name (a network interface, a firewall zone, a device, a radio, an mwan3 member or policy) and every reference field that uses it: zone network, rule/forwarding/redirect src and dest, dhcp interface, wireless network and device, network device, ports, route.interface, sqm and mwan3 when installed. "defined as: nothing" means no section has that name (a typo or a case mismatch). Only these fields are read, so the search cannot be used to look for a key. It needs the scope refs, which @readonly and @operator include; config=firewall narrows it to one config.

Adding and removing WireGuard peers is a normal, rollback-armed change. The peer is written to /etc/config/network and netifd loads it, so other peers' sessions stay up. Both tools wait for the peer to appear on (or leave) the running interface and say what they verified. Nothing is permanent until uci_confirm: otherwise, after the timeout or a restart, the peer is taken out again and a new client's key file is deleted. Only one change can wait for confirmation at a time. Removing the peer your own session arrives through needs force=true.

Add-on status. service_list detail=NAME reads an add-on that is installed (its init script exists) and prints a fixed set of fields, read-only: it never echoes a config file or a command's raw output, because those hold login hashes, proxy links, node keys and tokens. A grant needs the service's scope (tailscale.detail, or * as in @readonly); the plain list needs none. Text that someone else chose, such as a tailnet peer's host name, is clipped, sanitised and marked untrusted.

Add-onWhat it reportsVerified
tailscalestate, tailnet DNS suffix, this node's addresses, advertised routes, exit node, health, peers (online, direct or relayed, traffic)GL-MT6000, 25.12
AdGuard Homerunning, listen addresses, protection and filtering switches, upstreams (scheme and host only), bootstrap, filter list and rule counts, whether dnsmasq forwards to itGL-MT6000, 25.12
podkopversion, sing-box running, nft table, dnsmasq path, settings, one line per section (type, interface, community lists, size of dynamic lists)GL-MT6000, 25.12
adblockquery=<domain>: blocked by the merged list, or allowlisted. Status: procd instance, status, version, blocked domain count, active feeds, DNS backend, last run (from /var/run/adb_runtime.json)after a real run on 24.10.8 (VM, adblock 4.4.2-r4, 187,749 domains), status and query
adblock-fastquery=<domain>: blocked by which list, or allowlisted. Status: procd service data: status, the package's stats line, error and warning codes (not their info text), config summary24.10.8 and 25.12.6 (VMs, adblock-fast 1.2.4-r4): failed, running with 239,581 domains, query
banIPquery=<ip>: which active sets hold it. Status: version, element count, active feeds, WAN interfaces (warns when none), last run24.10.8 (banip 1.5.6-r7) and 25.12.6 (1.9.1) VMs: disabled, running, query, unban
ddnsservice_control action=update clears the last-update record and restarts the updaters. Per section: domain, provider, registered address, WAN address from netifd, age of the last update; warns on a stale record and on a WAN address in 100.64.0.0/1024.10.8 (VM, ddns-scripts 2.8.2): stock config and a real update
unboundrunning, listen port, DHCP link, DNSSEC validator, recursive or forwarding, cache statistics when unbound-control works, whether dnsmasq forwards to it24.10.8 and 25.12.6 VMs at stock config
stubbylisten addresses, upstream hosts with their TLS names (pinsets never printed), whether dnsmasq forwards to it24.10.8 and 25.12.6 (stubby 0.4.3) VMs at stock config
smartdnslisten port, redirect mode, upstream servers as host only, whether dnsmasq forwards to it24.10.8 and 25.12.6 VMs at stock config
watchcat, nextdns, qosify, travelmate, zerotier, netbirdrules, profile set or not, interfaces and classes, travelmate's status, uplink in use (SSID untrusted) and its subnet clash or failed internet check, networks and addresses, management and peer counts; no keys, ids or names24.10.8 and 25.12.6 VMs at stock config (25.12: watchcat 1, qosify 2024.09.20): installed, not connected to a peer or a login; zerotier 1.16.2 (25.12) joined to a private network (OK, ACCESS_DENIED) and to one that answers NOT_FOUND; netbird 0.82.0 status as a connected cloud peer (taken from a container: the 0.59.13 feed package failed to dial on the 24.10 VM); travelmate (2.2.1 and 2.4.9) associated to a virtual access point
openvpninstances and role; for an enabled instance the status file the init script asks for: connected clients (name, virtual address, traffic, since; never the client's public address) on a server, tunnel counters on a client25.12.6 VM, OpenVPN 2.7.8: a TLS server with a client connected from a namespace; the client-mode file from the same build
ipsec/swanctl (strongSwan)IKE and child SA counts; per SA its state, age, child state and traffic (no addresses; peer ids are marked as the peer's); a configured connection with no SA now25.12.6 VM, strongSwan 6.0.7: two charon daemons in network namespaces, PSK, IKEv2, listing from the responder; idle with one connection loaded
cloudflared, frpc, frps, collectdtoken and password set or not, server and proxy list (type, local port, remote port, never the token), data directory (RAM or flash) and enabled plugins; system_status history= reads the RRD filescollectd on GL-MT6000 (status); history on a 25.12.6 VM with luci-app-statistics and rrdtool 1.0.50, a few minutes of data (25.12; collectd 5.12.0); cloudflared on 24.10.8 and 25.12.6 VMs at stock config; frpc and frps (0.66.0) on the 25.12.6 VM at stock config, where the section is common, no connection between them
samba4, ksmbd, transmission, aria2, minidlna, mosquitto, tor, acme, nut-monitorshares and guest access, RPC bind and auth, listeners and anonymous access, Tor ports, certificate days left, UPS status; secrets only as set or notsamba4 on GL-MT6000 (25.12) and on the 25.12.6 VM with a real login; tor on GL-MT6000 and VMs; ksmbd, transmission, aria2, minidlna, mosquitto, acme on 24.10.8 and 25.12.6 VMs at stock config; nut-monitor fixture-tested
wifischedule, vnstat, hd-idle, keepalived, lldpd, nlbwmonschedules, tracked interfaces, disks and idle timers, VRRP config (not live state), ports with a neighbour, database path and whether it is in RAMnlbwmon and lldpd on GL-MT6000 (25.12); the others on 24.10.8 and 25.12.6 VMs at stock config
OpenClashbest effort: clash process, mode, subscription count, dashboard secret set or not; no node names, links or secretsluci-app-openclash 0.48.002 (project apk or ipk) with mihomo as its core on the 25.12.6 and 24.10.8 VMs, running with a local profile; its rules live in inet fw4
zapretbest effort: nfqws/tpws running, nft table zapret loadedzapret v72.13 (project openwrt-embedded bundle, x86_64 binaries) on the 25.12.6 and 24.10.8 VMs, nfqws mode running
v2rayAbest effort: process, enabled flag, API addressv2rayA from the official feeds, running with the stock config on 24.10.8 (2.2.7.3) and 25.12.6
passwall, passwall2best effort: xray or sing-box running, nft table loaded, enabled flag, DNS mode (passwall) or remote DNS protocol (passwall2), node and shunt-rule counts; no node names or linkspasswall and passwall2 26.11.3: the stock config layout read on the 25.12.6 and 24.10.8 VMs (unpacked, never started: their dependencies are not in the official feeds)
nikkibest effort: mihomo running, nft table nikki, enabled flag, TCP mode, subscription countnikki 2026.10.10 with mihomo-meta 1.19.32 (project apk or ipk) on the 25.12.6 and 24.10.8 VMs, running; real traffic sent through a proxy rule on 25.12.6
homeproxybest effort: sing-box running, routing mode, DNS strategy, node count, the last error lines of homeproxy's log when it stopped (marked untrusted)luci-app-homeproxy on the 24.10.8 VM (26.187, sing-box 1.12.22): running; on the 25.12.6 VM (26.298, sing-box 1.13.21) it does not start, and the detail shows why
youtubeUnblockbest effort: process, its chain in inet fw4, config strategy, queue number, packet mark, profile count; no domain listsyoutubeUnblock 1.3.1 (project apk or ipk) on the 25.12.6 and 24.10.8 VMs, running
https-dns-proxyinstances: resolver host only (no path, so no NextDNS id), listen address and port, bootstrap set or not; whether dnsmasq forwards to a local proxy port24.10.8 and 25.12.6 (VMs, 25.12: 2026.05.06), running with two instances
miniupnpdsettings (warns when secure mode is off) and the live mappings: protocol, external port, client, description (marked untrusted); service_control action=unmap arg=tcp:PORT removes one24.10.8 (VM, 2.3.9): a real mapping made with upnpc; 25.12.6: a mapping from a LAN client in a namespace and unmap on it (the mapping gone from the lease file and the rules, the others kept)
mwan3per interface: status, link, tracking state, track IPs up, time online; per policy: members and weights, warns when no member is online (from ubus call mwan3 status). query=<ip>: the first rule whose dest_ip or src_ip holds it, its policy and the policy's members now24.10.8 (VM, mwan3 2.11.16-r5), stock config
pbrgateways with routing table, fwmark and priority, error and warning codes, settings incl. firewall mask, policy names and interfaces (not their addresses or domains); policies whose interface has no gateway are marked. query=<ip>: the policies whose src_addr or dest_addr hold it, and their interface24.10.8 and 25.12.6 (VMs, pbr 1.2.2-r20): a policy that built nft rules, and one pbr rejected; 25.12.6 with a second uplink (wan2): its gateway, routing table, fwmark and rule priority as pbr built them (packets were not forwarded through it)
usteer (2025.10.04)policies on and off (band steering, load balancing, roaming, minimum-SNR kick), the interface it exchanges state over, local nodes, how many other usteer hosts and clients it sees; no client addresses25.12.6 VM idle (no access point, no peer); 24.10.8 VM with a real radio (RTL8852BE passed through), one 5 GHz AP and a phone associated; with a second host (the 25.12.6 VM, a virtual hwsim AP) seen from the 24.10.8 side only
DAWN (2025.11.07)AP discovery mode, whether traffic between APs is encrypted (warns on the shipped key; keys never printed), hostapd interfaces on ubus, entries in the network view and hearing map25.12.6 VM idle; 24.10.8 VM with a real radio, one AP and a phone associated; a second AP (25.12.6 VM, hwsim) shows in the network view of the 24.10.8 side only
openNDSversion, uptime, managed interface, clients now and authenticated since start, FAS level and host (not its path), idle timeouts, binauth script; the FAS key only as set25.12.6 VM (10.3.1), no clients
sqmper queue: interface, rates, qdisc, script, live packets, drops and backlog from tc -s; warns when flow offloading bypasses the shaper24.10.8 (VM)
ttydper instance: port, interface (warns when it listens on every interface), whether a credential is set (never its value), TLS, read-onlyGL-MT6000, 25.12

"Fixture-tested" means the parser is tested against inputs written from the add-on's upstream source (its init script, rpcd plugin or runtime file), not against a capture from a router. "Source-checked" adds one step: option, process and nft table names were compared with the project's own default config and init script at the version shown. Everything else was run on a real OpenWrt (ROADMAP 9.7; the captures are in testdata/captured/): the GL-MT6000 (25.12.6, read-only), and 24.10.8 (opkg) and 25.12.6 (apk) x86 VMs. "Stock config" means installed and started with the package's default settings, so a state that needs a peer or a login (a connected VPN, a travelmate uplink, an SMB login) is not covered. The wave 4 proxy adapters other than podkop are not in the official feed: they are checked against each project's own default config and init scripts (named in the table), not run on a router.

Deliberately not read: AdGuard Home's web API (it needs the UI login), podkop's proxy_string, selector and outbound settings, and the user's domain and subnet lists.

Install

On the router, from a release (nothing needed beyond a default 25.12 image):

wget -O /tmp/install-router.sh https://github.com/stanislav-testhub/openwrt-mcp/releases/latest/download/install-router.sh
sh /tmp/install-router.sh

It picks the archive for the router's DISTRIB_ARCH, checks it against the release's SHA256SUMS (refusing on a mismatch), and installs. VERSION=v1.2.0 selects a release other than the latest. Each release file also carries a build attestation: gh attestation verify <file> --repo stanislav-testhub/openwrt-mcp.

From a PC, building from source (needs Go, ssh and tar; Git Bash works on Windows):

git clone https://github.com/stanislav-testhub/openwrt-mcp
cd openwrt-mcp
ROUTER=root@192.168.1.1 SSH_PORT=22 SSH_KEY=~/.ssh/id_ed25519 ./install.sh install

ROUTER, SSH_PORT and SSH_KEY are your router's root login (defaults: root@192.168.1.1, 22, your ssh defaults). ./install.sh install --release [vX.Y.Z] skips the build and has the router fetch a verified release instead; that is also what happens when no Go toolchain is found.

Either way the same installer runs on the router.

  • It installs:
    • /usr/bin/openwrt-mcp;
    • the init script;
    • the default config, never overwriting an existing one;
    • the keep.d entry;
    • the LuCI page.
  • It then enables and starts the service.
  • It refuses to restart the daemon while a uci_apply awaits confirmation, because that would roll it back, unless FORCE=1.
  • It checks that the binary fits on the overlay first.

./install.sh uninstall [--purge] reverses it.

Updating. openwrt-mcp version --check on the router asks GitHub once (with wget) whether a newer release exists; nothing checks on its own. ./install.sh upgrade runs that check over ssh and, if a newer release exists, installs it with the router-side installer, which verifies the release's checksums. A daemon older than 1.8 cannot check, so it gets the latest release without asking.

As an apk package (25.12). Each release has openwrt-mcp-X.Y.Z-r1_<arch>.apk for the common architectures (the router's DISTRIB_ARCH). Copy the right one over and run apk add --allow-untrusted ./openwrt-mcp-X.Y.Z-r1_<arch>.apk; it is not signed, so check it against SHA256SUMS first. The package starts the daemon, keeps an edited /etc/config/openwrt-mcp (the shipped one lands as openwrt-mcp.apk-new), and apk del openwrt-mcp stops it but leaves /etc/openwrt-mcp (tokens, audit log). Not for 24.10: that uses opkg.

Approve from LuCI

After install, Services -> MCP Server in LuCI shows the daemon (running or stopped, version, HTTP listener, stdio socket), a pending uci_apply with its automatic-rollback deadline, the paired HTTP clients, the standing policies and the audit log. It is also where you answer an agent, so nobody has to open a shell to paste an allow line.

The MCP Server page in LuCI with four requests waiting: three from one assistant with Allow all, one for a root command with a warning

The page with four requests waiting, on an OpenWrt 25.12.6 virtual machine (the figures here are that machine's).

  1. The agent calls a tool it has no grant for. The call is refused and a request is recorded: client, tool, the exact scope that failed and the redacted arguments, all derived by the daemon, with no text from the agent.
  2. The request shows at the top of the MCP page and in a widget on Status -> Overview, which appears only while something is pending.
  3. Allow writes a grant, Deny refuses it. The default grant is the narrowest one (this tool on this exact scope, 1 hour). A select widens it (the scope's family, every scope, the @operator preset) and sets 15 minutes to 7 days. A request for a root-shell tool shows a warning and needs a second confirmation.
  4. With option request_wait '300' (seconds, 0 to 600, default 300; 0 refuses at once) the denied call is held and continues by itself when a grant covers it, so the agent does not retry. Without it, or when the wait runs out, the agent gets POLICY_DENIED with the request id, and a retry after approval works. The allow line is still printed, and the CLI releases a held call the same way the button does.

Requests are deduplicated, capped (5 open per client, 50 in all) and expire after request_ttl (10 minutes by default). They live in RAM, so a reboot clears them. A LuCI user with only the read ACL sees requests but no buttons; writes need luci-app-openwrt-mcp-write.

Status, Overview with the MCP Server block: requests waiting with Allow and Deny, and what is currently allowed

Other tabs: Permissions (presets, tools in groups with a risk badge, Revoke), Activity (the audit log with filters), Settings (request wait and TTL, the optional channels, second-factor state).

The Permissions tab: presets, one row per ability with a risk badge, and the Permit all section

Permit all. The Permissions tab ends with a red section that grants a client every tool on every scope, exec included: a root shell. It is capped at 24 hours (no "never"), needs a checkbox and the client's name typed in, is refused for a client with a second factor enrolled, and shows a red banner on both pages with End now while it lasts. Calls it authorises are marked "via":"permit-all" in the audit log. The CLI equivalent is openwrt-mcp allow <client> @all 1h --shell-equivalent. Prefer approving requests one by one.

Optional channels are off after install; each is a switch on Settings, with a notice beside it saying how it can harm you, and each switch is audited.

ChannelOptionWhat it doesHow it can harm you
Pair from LuCIpairingA Clients tab: paste the key that openwrt-mcp connect prints, name the client, pick a starting preset (Read-only by default). Writes the same forced-command line as authorize-key.Anyone with LuCI write access can add a key that reaches the router over SSH.
Push hookpush_hookEach new request fires the ubus event openwrt-mcp.request and runs the executables in /etc/openwrt-mcp/hooks.d/ with the redacted request as JSON on stdin (10 s limit; group- or world-writable, non-executable and dot files are skipped). For Telegram, ntfy or Home Assistant; examples/hooks/telegram and examples/hooks/ntfy are ready to copy, with credentials read from UCI. A notification does not approve; it points at LuCI.Request details leave the router, and a hook runs as root.
Approve in chatchat_approve, list chat_approve_clientA client that negotiates elicitation also shows the request in its own prompt. Exact scope only, 15 minutes, 1 hour or 8 hours, never for a root-shell tool or Permit all.The client relays your answer. A client or agent that auto-answers prompts would grant itself.

Documentation truncated — see the full README on GitHub.

Reviews

No reviews yet

Be the first to review this server!