tplink-mcp
Provides tools for interacting with TP-Link routers and 4G/LTE gateways, including reading status and cellular signal, managing connected clients and DHCP reservations, inspecting Wi-Fi networks, configuring DNS/IPv6, running diagnostics, reading/sending SMS and USSD, and performing guarded write actions such as cell/band locking, Wi-Fi radio changes, and reboots.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tplink-mcpcheck my router's 4G signal strength and status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TP-Link Router Model Context Protocol (MCP) Server
Universal, Agent-Safe Model Context Protocol (MCP 2.x) Server for TP-Link Routers. Connects TP-Link 4G/LTE gateways and broadband routers directly to autonomous AI copilots (Google Antigravity, Claude Desktop, Cursor, Codex) with 18 typed tools, single-admin session leasing, and disconnection safeguards.
๐จโ๐ป Author & Origin Story
Created & Architected by: Dulith Divisekara
Undergraduate in Information Technology, Sri Lanka Institute of Information Technology (SLIIT), Malabe, Sri Lanka.
Origin: Autonomous 4G LTE Optimization
Built to enable AI coding assistants and autonomous agents to diagnose, monitor, and optimize an active Hutch Sri Lanka 4G LTE unlimited 20 Mbps SIM running on a TP-Link Archer MR200 v5 router in Malabe (near SLIIT Campus).
Equipped with an automatic Network Guard that prevents autonomous AI agents from ever executing commands if the host is connected to university campus Wi-Fi or a mobile hotspot.
Related MCP server: omada-mcp
๐ Quickstart for AI Copilots ($0 Cost)
1. Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"tplink-mcp": {
"command": "npx",
"args": ["-y", "tplink-mcp"],
"env": {
"TPLINK_ROUTER_IP": "http://192.168.1.1",
"TPLINK_PASSWORD": "your_router_password"
}
}
}
}2. Google Antigravity & Cursor Configuration
Configure directly via standard Python stdio transport:
{
"mcpServers": {
"tplink-mcp": {
"command": "python3",
"args": ["-m", "tplink_mcp.server"],
"env": {
"TPLINK_ROUTER_IP": "http://192.168.1.1",
"TPLINK_PASSWORD": "your_router_password"
}
}
}
}3. Docker Container (Zero-Install)
docker run -i --rm --network host \
-e TPLINK_ROUTER_IP="http://192.168.1.1" \
-e TPLINK_PASSWORD="your_router_password" \
ghcr.io/dulithdivisekara/tplink-mcp:latest๐ ๏ธ Complete MCP Tools Catalog (18 Typed Tools)
Following the official MCP Best Practices, tools are categorized into safe read-only inspectors and guarded mutation tools:
Tool Name | Type | Description | Safety Guard |
| Read | Verifies active Wi-Fi SSID & Gateway against target router | Safe |
| Read | Full device info, cellular status, and WAN telemetry | Safe |
| Read | Live 3GPP RSRP, RSRQ, SNR, and tower metadata | Safe |
| Write | Locks or unlocks cellular base station (EARFCN + PCI) | Requires |
| Write | Locks modem to specific LTE frequency band (e.g. Band 3) | Requires |
| Read | Returns monthly data quota, billing reset day, and bandwidth | Safe |
| Write | Sets monthly data limit in MB and billing cycle day | Requires |
| Read | Lists all connected LAN devices (hostname, IP, MAC, lease) | Safe |
| Write | Adds, deletes, or lists static DHCP IP reservations | Requires |
| Read | Returns 2.4 GHz and 5 GHz radio states, SSIDs, and channels | Safe |
| Write | Enables/disables Wi-Fi radio or updates SSID | Requires |
| Read | Queries front panel LEDs and night mode schedule | Safe |
| Write | Configures night mode to turn off router LEDs automatically | Safe |
| Exec | Runs router-side WAN, physical link, and internet test | Safe |
| Write | Configures custom WAN DNS resolvers | Safe |
| Write | Enables or disables IPv6 stack | Safe |
| Exec | Dispatches interactive USSD query to SIM | Safe |
| Read | Reads incoming or sent SMS messages from SIM card | Safe |
| Write | Sends SMS message through SIM card | Safe |
| Exec | Gracefully reboots router hardware | Requires |
๐ Safety Guardrails for Autonomous AI Agents
Atomic Session Leasing (
SafeSession): Automatically authenticates, executes the tool, and releases the session immediately so your browser (192.168.1.1) is never locked out.Disconnection Prevention (
confirm=True): Potentially disruptive actions likerouter_rebootorrouter_set_cell_lockrequire an explicit boolean confirmation flag to prevent an autonomous agent from severing its own active session.Multi-Environment Network Guard: Blocks execution if your laptop is currently on university Wi-Fi or personal hotspot.
๐งช Testing
python3 -m unittest discover tests๐ License
MIT License. Created by Dulith Divisekara.
This server cannot be deployed
Maintenance
Related MCP Connectors
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Build, validate, deploy โ HTTP APIs, cron jobs, webhooks and MCP tools โ from your AI client.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to manage TP-Link routers by listing clients, checking status, controlling Wi-Fi, and rebooting via natural language.332MIT
- AlicenseAqualityCmaintenanceLets an AI assistant inspect and adjust TP-Link Omada WiFi networks by searching, describing, and calling any of roughly 1,650 Omada Open API operations through nine tools. It is read-only by default, refusing every non-GET request unless writes are explicitly unlocked, and even then returning a dry-run preview until a change is confirmed.94MIT
- AlicenseBqualityBmaintenanceEnables Claude Code and other MCP clients to inspect and manage a TP-Link router over stdio, including device lists, DHCP leases and reservations, Wi-Fi settings, firmware and IP status, mesh nodes, and safe raw endpoint requests with confirmation for writes and secret masking.16MIT
- AlicenseNot gradedqualityBmaintenanceEnables 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