tplink-modem-mcp
v0.2.0MCP server for TP-Link routers and ISP modems: devices, Wi-Fi signal, logs, presence history
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
router_status
Overview: model and firmware, internet connection (status, external IP, uptime), LAN address, Wi-Fi networks that are on, number of devices online.
list_clients
Devices on the network: hostname, IP, MAC, wired or Wi-Fi band and SSID, signal (dBm, closer to 0 is better; below -75 is weak) and link rate where the router reports them.
| Parameter | Type | Description |
|---|---|---|
include_inactive | boolean |
find_client
Devices whose hostname, IP or MAC contains the query (case-insensitive; '-' and ':' both work in MACs).
| Parameter | Type | Description |
|---|---|---|
query * | string |
client_history
Join / leave / IP-change events recorded by this server (routers keep no such log). Shows which device keeps dropping off the network and when. Sampled every TPLINK_PRESENCE_INTERVAL seconds (default 60) while the server runs.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
mac | string | |
since_hours | number |
wifi_networks
Every SSID the router has, with band, channel, standard and whether it is on.
router_logs
System log, newest first. module: e.g. DHCPD, PPP, DHCPC, SYSTEM. contains: text or a MAC to look for. max_severity: 0 emerg, 3 err, 4 warn, 6 info, 7 debug (everything). Note: the router clears it on reboot.
| Parameter | Type | Description |
|---|---|---|
contains | string | |
limit | integer | |
max_severity | integer | |
module | string |
dhcp_leases
Active DHCP leases: hostname, IP, MAC, lease time left.
dhcp_reservations
Fixed IP reservations (address reservation) configured on the router.
ipv6_status
WAN and LAN IPv6 status, if the model supports it.
router_objects
Names of every settings object the router's web UI uses (LAN_WLAN, LAN_DHCP_STATIC_ADDR, WAN_IP_CONN_PORTMAPPING, FIREWALL, ...) and the operations it can run (ACT_REBOOT, ...). Filter with contains.
| Parameter | Type | Description |
|---|---|---|
contains | string |
router_read
Read a settings object: every instance, or the one at stack (e.g. "1,2"). Each row carries its _stack, which router_change needs. Passwords and keys are masked unless TPLINK_SHOW_SECRETS=1.
| Parameter | Type | Description |
|---|---|---|
object * | string | |
attributes | ||
stack | string |
router_change
Change any setting the web UI can change. action: "set" (stack = the row's _stack; omit for single objects), "add" (parent_stack = the parent row's _stack, e.g. "1" for LAN_DHCP_STATIC_ADDR under LAN 1) or "delete". Read the object first so attribute names match. Without confirm=true it only shows what it would do.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
object * | string | |
attributes | ||
confirm | boolean | |
parent_stack | string | |
stack | string |
router_run
Run a router operation from router_objects' list, such as ACT_DHCP_RENEW or ACT_PPP_DISCONN. Without confirm=true it only shows what it would do.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
confirm | boolean |
set_static_ip
Give a device a fixed IP (address reservation): adds it, or updates the existing reservation for that MAC. The device gets the address the next time it renews its lease. Without confirm=true it only shows the plan.
| Parameter | Type | Description |
|---|---|---|
ip * | string | |
mac * | string | |
confirm | boolean |
remove_static_ip
Remove a device's fixed IP reservation. Without confirm=true it only shows the plan.
| Parameter | Type | Description |
|---|---|---|
mac * | string | |
confirm | boolean |
set_wifi
Change a Wi-Fi network (index from wifi_networks): name, password, on/off, hidden. Devices on it drop and must reconnect, with the new password if it changed. Without confirm=true it only shows the plan.
| Parameter | Type | Description |
|---|---|---|
network_index * | integer | |
confirm | boolean | |
enabled | ||
hidden | ||
password | string | |
ssid | string |
reboot_router
Reboot the router. The whole network and the internet drop for a minute or two. Needs confirm=true.
| Parameter | Type | Description |
|---|---|---|
confirm | boolean |