Skip to main content
Glama

tplink-router-mcp

English | 日本語

An MCP server for TP-Link routers, meant to be launched over stdio from Claude Code or other MCP clients. It talks to the router's web API directly via tplinkrouterc6u (no Playwright needed). Development and hardware testing are done on an Archer AX11000 V1, but other TP-Link routers work too (see "Supported routers" below).

Checked on hardware: GET http://192.168.0.1/ → /webpages/index.html (gaming theme, tpEncrypt.js family).

Supported routers

Router communication is handled by tplinkrouterc6u. TplinkRouterProvider.get_client detects the model when connecting, so no per-model configuration is needed. Any model supported by that library (Archer AX / BE / C / MR / VR series, Deco, MERCUSYS, and 100+ others) should basically work with this MCP server. For the full list, see "Supported routers" in the tplinkrouterc6u README.

The available tools do depend on the model (i.e. which client implementation the library uses internally). The table below reflects what was confirmed from the tplinkrouterc6u 5.35.0 source.

Tool

Coverage

router_overview, list_devices, get_firmware, get_ipv4_status, set_wifi, reboot_router

Almost all models

get_dhcp_leases, list_reservations

Some models, such as the Archer AX/C series

raw_request

Some models, such as the Archer AX/C series and Deco

get_mesh_nodes

Archer AX/C series (EasyMesh capable), Deco

get_wifi, add_reservation, delete_reservation

Archer AX/C series (C6U-family client) only

  • Calling a tool on an unsupported model does not crash the server; it returns supported: false or an error message

  • Some Wi-Fi bands do not exist on every model (e.g. 6 GHz is only on Wi-Fi 6E / 7 models)

  • The second 5 GHz band (wireless_5g_2) on tri-band models (such as the AX11000) is not supported by tplinkrouterc6u, so get_wifi / set_wifi cannot handle it. You can read it with raw_request(path="admin/wireless?form=wireless_5g_2")

  • Only the Archer AX11000 V1 has been tested on real hardware. Reports from other models are welcome via Issues

  • The default router address is 192.168.0.1. If your router uses a different IP (e.g. 192.168.1.1), set ROUTER_IP

Related MCP server: openwrt-mcp

Setup

cd /path/to/tplink-router-mcp  # the cloned directory
uv sync --group dev

Credentials are stored in a file. The simplest way is to put a .env in the root of the cloned repository (.env is already in .gitignore).

cp .env.example .env
# Edit: set ROUTER_PASSWORD to the web admin Local Password (a TP-Link ID does not work)

Variables: ROUTER_IP (default 192.168.0.1), ROUTER_USERNAME (default admin), ROUTER_PASSWORD (required), ROUTER_TIMEOUT (seconds, minimum 1)

Sources and precedence (low → high):

  1. ~/.config/tplink-router-mcp/.env (if you want to keep it outside the repository)

  2. .env in the repository root

  3. The file pointed to by $TPLINK_ENV (e.g. to switch between multiple routers)

  4. Environment variables

The repository .env is located relative to this repository, not the current directory at startup. Whatever project Claude Code is opened in, that project's .env will never be read by mistake. If you install it as a package (e.g. with uvx), there is no repository, so only 1, 3 and 4 are used.

Checking that it starts

uv run pytest -q
uv run ruff check . && uv run ruff format --check .
ROUTER_PASSWORD=dummy uv run tplink-router-mcp --help || echo "stdio server (no --help is expected)"

Registering with Claude Code

{
  "mcpServers": {
    "tplink-router": {
      "command": "uv",
      "args": ["--directory", "/path/to/tplink-router-mcp", "run", "tplink-router-mcp"],
      "env": {}
    }
  }
}

Credentials are read from .env, so env can stay empty. Only if you want to hard-code the password, add "env": {"ROUTER_PASSWORD": "..."}.

Available Tools

16 tools
add_reservationB

DHCP予約追加。書き換えのため confirm=true が必須。

例: add_reservation(macaddr="AA:BB:CC:DD:EE:FF", ipaddr="192.168.0.50", confirm=True)

Inputs: ipaddr (required), macaddr (required), enable, comment, +1 more.

delete_reservationB

DHCP予約削除。confirm=true が必須。

Inputs: macaddr (required), confirm.

get_dhcp_leasesB

DHCPリース一覧。未対応の場合は supported=false。

Inputs: no named parameters.

get_firmwareC

ファームウェア情報。

Inputs: no named parameters.

get_ipv4_statusC

WAN/LAN IPv4 状態。

Inputs: no named parameters.

get_ipv6_statusB

IPv6 WAN 状態。未対応の場合は supported=false。

Inputs: no named parameters.

get_mesh_nodesC

EasyMeshノード一覧。

Inputs: no named parameters.

get_wifiA

指定バンドのWi-Fi設定。band: 2g/5g/6g/guest_2g/... 秘密値は既定マスク。

例: get_wifi(band="5g"), get_wifi(band="guest_2g", reveal_secrets=True)

Inputs: band, reveal_secrets.

list_devicesB

接続デバイス一覧 (hostname/IP/MAC/接続種別)。

Inputs: no named parameters.

list_endpointsC

本MCPのツールカタログ。

Inputs: no named parameters.

list_reservationsC

DHCPアドレス予約一覧。

Inputs: no named parameters.

raw_requestA

任意エンドポイント読取。

  • path例: "admin/nat?form=vs", "admin/upnp?form=service"

  • data例: "operation=load" 等。operation指定時は data に operation= が無ければ自動付与

  • 戻り値の秘密値は常にマスク (reveal不可)

  • operation が read/load 以外の場合は書き込みとみなし confirm=true が必須

Inputs: path (required), data, confirm, operation.

reboot_routerB

ルータ再起動。confirm=true が必須。

Inputs: confirm.

router_overviewB

ダッシュボード: firmware/CPU/メモリ/WAN/デバイス台数。

Inputs: no named parameters.

session_infoC

接続設定の安全サマリ (パスワードは出さない)。

Inputs: no named parameters.

set_wifiB

Wi-Fi ON/OFF。無線再起動を伴うため confirm=true が必須。

例: set_wifi(band="guest_2g", enable=True, confirm=True)

Inputs: band (required), enable (required), confirm.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 16 tools

    Disambiguation4/5

    Tools target distinct resources: DHCP leases, reservations, connected devices, mesh nodes, and firmware/IP status are clearly separated, and read vs. write actions (add/delete/set/reboot) are explicit. The main ambiguity is raw_request, which can overlap with any specific read tool, but its escape-hatch role and confirm-gating for writes are clearly described.

    Naming Consistency4/5

    Names follow a mostly predictable snake_case verb_noun pattern (get_*, list_*, add_*, delete_*, set_*, reboot_*). Minor deviations like router_overview, session_info, and raw_request are readable and do not seriously undermine consistency.

    Tool Count4/5

    At 16 tools this is slightly above the typical 3–15 sweet spot, but each tool covers a distinct router management function: telemetry reads, DHCP reservations, Wi-Fi control, reboot, and raw access. There is little obvious filler, though raw_request is a broad catch-all that adds surface area.

    Completeness4/5

    Core read/write lifecycle for DHCP reservations and Wi-Fi on/off is covered, and raw_request provides an escape hatch for unsupported endpoints. Gaps remain for updating an existing reservation and for broader Wi-Fi SSID/password or security configuration, which agents would need to handle via raw_request.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables LLM/MCP clients to read and, when explicitly allowed, modify TP-Link Archer AX53 router settings directly over the LAN using the router's own web protocol, without a browser or cloud account. It is read-first, write-gated, and lockout-aware, with tools for clients, DHCP, Wi-Fi, access control, presence history, and other router operations.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an MCP client such as Claude Code to inspect and change a stock OpenWrt 25.12+ router over SSH, covering system status, logs, clients, firewall, packages, services, and WireGuard peers. Configuration edits are staged, checked, and armed with an automatic rollback that survives a reboot, all behind deny-by-default per-client grants, an audit log, and masked secrets.
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Lets Claude or any MCP client inspect a TP-Link Deco mesh locally — nodes, backhaul, clients, WAN, firmware — and carefully change settings with graded, read-back-verified writes, secrets redacted by default and an optional read-only mode. No cloud or app involved.
      8
      29 PyPI
      1
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI assistants and terminal users to inspect and administer TP-Link routers through typed MCP tools, including live LTE signal and cell/band control, connected clients and DHCP reservations, Wi-Fi and LED settings, diagnostics, SMS/USSD, and guarded disruptive actions.
      39
      MIT