inteno-mcp
by oscnord
README.md
# inteno-mcp
MCP server for Inteno/iopsys routers running the JUCI web UI (tested on an EG400 with firmware
`EG400-WU21U_STOSN3.16.9`). It talks to the router's local ubus API over the owsd WebSocket the web UI
itself uses. No cloud, no third-party router libraries.
## Safety
An ISP router is usually the network's only way out to the internet, so the server is deliberately narrow:
- Every request is checked against an allowlist of ubus `(object, method)` pairs before it is sent.
Factory reset, firmware upgrade, shell exec, password changes, WPS pairing and interface or network
restarts are not on it, even with writes on.
- Write tools only exist with `INTENO_ALLOW_WRITES=1`, can only touch the `firewall`, `dhcp`, `wireless`
and `upnpd` configs (never `network`, `system` or `passwords`), and preview unless called with
`confirm=true`. A change is staged and committed the same way the router's web UI does it
(`uci set/add/delete`, then `uci commit` of that one config); anything left staged in the session is
discarded first, and staged changes are discarded again if a step fails before the commit.
- Nothing that carries the link to the network behind the Inteno can be changed: no WAN, LAN
addressing or DHCP pool. A DHCP reservation that an enabled port forward points at cannot be removed.
- Hostnames for ping and traceroute must be a bare IPv4 address or hostname, since the router puts
them on its own command line.
- A refused login is never retried, and Wi-Fi keys, WPS PINs, factory credentials and session tokens
never leave the server.
## Tools
✎ write, only with `INTENO_ALLOW_WRITES=1`, previews unless `confirm=true` · ⚠ can cut access or expose a device
| Tool | What it does |
|---|---|
| `inteno_get_status` | Online check, WAN link (protocol, public IP, uptime, ISP DNS), model, firmware, router uptime, CPU and memory |
| `inteno_ping` / `inteno_traceroute` | Ping or traceroute from the Inteno itself, so the ISP link is tested without anything behind it in the way |
| `inteno_list_clients` | Devices directly behind the Inteno (often a single mesh or router) with port, link speed and open connections |
| `inteno_list_dhcp_leases` | DHCP leases on the Inteno's LAN |
| `inteno_list_reservations` | Fixed IPs by MAC |
| `inteno_add_reservation` ✎ / `inteno_remove_reservation` ✎⚠ | Pin a device to an IP, or remove a pin (refused while a port forward points at it) |
| `inteno_list_port_forwards` | Port forwards and whether NAT loopback is on for each |
| `inteno_add_port_forward` ✎⚠ / `inteno_remove_port_forward` ✎⚠ | Expose a LAN address's port to the internet, or stop (overlapping external ports are refused) |
| `inteno_set_port_forward` ✎⚠ | Turn a forward, or its NAT loopback, on or off |
| `inteno_get_wifi` | The Inteno's own Wi-Fi networks: whether each radio is actually broadcasting, config state, encryption, WPS push-button |
| `inteno_set_wifi_network` ✎ | Turn one of the Inteno's networks, or its WPS push-button, on or off |
| `inteno_get_upnp` | UPnP / NAT-PMP state and the port mappings devices have opened |
| `inteno_set_upnp` ✎⚠ | Turn UPnP or NAT-PMP on or off |
| `inteno_reboot` ✎⚠ | Reboot the Inteno; everything behind it is offline for a few minutes |
The ISP's customer account (`user`) cannot read logs, so there is no logs tool.
## Setup
```sh
python3 -m venv .venv && .venv/bin/pip install -e .
security add-generic-password -s inteno-mcp -a <username> -w # macOS; or INTENO_USERNAME / INTENO_PASSWORD
```
Use the account you log in to the web UI with. On ISP firmware that is usually the pre-filled `user`, not
`admin`; the router's login page shows it.
| Variable | Default |
|---|---|
| `INTENO_HOST` | `http://192.168.1.1` |
| `INTENO_USERNAME`, `INTENO_PASSWORD` | from the Keychain item `inteno-mcp` |
| `INTENO_KEYCHAIN_SERVICE` | `inteno-mcp` |
| `INTENO_ALLOW_WRITES` | unset (read-only) |
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues