Skip to main content

deco-mcp

An MCP server for managing a TP-Link Deco mesh network from an AI assistant, so you rarely need the Deco app: see what the network is doing, find what is eating the bandwidth, block devices, hand out fixed IPs, forward ports, switch guest Wi-Fi on and off, check HomeShield, firmware and logs, and diagnose a slow connection.

It talks to the Deco directly on your home network, never through TP-Link's cloud. The Deco has two ways in, and the server uses both, with its own client for each (no third-party router library):

What it is How it logs in What it covers
Web API The interface behind the Deco's admin page at https://192.168.68.1 The Deco's local admin password Status, clients, blocking, fixed IPs, logs, firmware, reboot
App protocol The connection the Deco mobile app makes to the Deco on your network (port 30001) The Deco owner's TP-Link ID, the same email and password you use in the Deco app Everything the admin page can't do: port forwarding, guest Wi-Fi, HomeShield, parental controls, QoS and other app-only settings

Tools marked 📱 below use the app protocol, so they only work once the TP-Link ID is set up (see Setup). The rest need only the admin password.

Tested on a Deco BE25 running firmware 1.1.8. Other Deco models speak the same protocols but may support fewer features.

Tools

Read-only tools are always available. Tools marked ✎ change something and only exist when the server runs with DECO_ALLOW_WRITES=1; ⚠ marks ones that delete something, expose a device or cut the network.

Network and mesh

Tool
deco_get_network Internet state, WAN/LAN addressing, IPv6, mode, main Deco CPU/memory
deco_list_units Each Deco unit: role, IP, mesh/internet status, uplink signal, firmware
deco_diagnose_path Packet loss/latency to the first hops and public resolvers, plus macOS networkQuality. Runs on your machine, needs no Deco login
deco_list_port_forwards 📱 Port forwarding rules
deco_add_port_forward 📱✎⚠ / deco_remove_port_forward 📱✎⚠ Expose a LAN device's port to the internet, or stop
deco_reboot ✎⚠ Reboot one unit or the whole mesh

Wi-Fi

Tool
deco_get_wifi Main, guest, IoT and MLO networks per band. Passwords are never returned
deco_set_wifi_network 📱✎ Turn the guest, IoT or MLO network on or off

Clients

Tool
deco_list_clients Devices with live download/upload rates in kbit/s, busiest first
deco_list_blocked_clients Devices blocked from the internet
deco_block_client ✎ / deco_unblock_client ✎ Block or restore a device's internet access
deco_list_reservations Configured fixed IPs
deco_add_reservation ✎ / deco_remove_reservation ✎⚠ Give a device a fixed IP, or remove it
deco_list_dhcp_leases 📱 Addresses handed out right now

Security, parental controls and QoS

Tool
deco_get_security 📱 HomeShield protections and recent security events
deco_get_parental_controls 📱 Parental-control profiles
deco_get_qos 📱 QoS mode, priorities and bandwidth limits

System and settings

Tool
deco_get_system_log Recent log lines by severity, with optional search
deco_check_firmware Installed firmware per unit and whether an update is available
deco_get_speedtest / deco_run_speedtest ✎ The Deco's own internet speed test
deco_get_time_settings Clock and time zone
deco_get_setting 📱 One of: DHCP pool, UPnP, SIP ALG, LED, eco mode, Wi-Fi schedule, reboot schedule, auto-update, client isolation, access control, DDNS, IPTV, IPv6 firewall, static routes, VPN client/server, CWMP, WPS
deco_set_switch 📱✎ Turn the status LEDs, UPnP or SIP ALG on or off

Not covered yet: editing parental-control profiles, QoS, HomeShield, Wi-Fi names/passwords/schedules, and firmware upgrades.

Safety

  • Read-only by default. Write tools are not registered at all unless DECO_ALLOW_WRITES=1 is set, and every tool carries MCP annotations (readOnlyHint, destructiveHint) so clients can ask before running one.
  • Preview first. Write tools return a preview of what they would do and change nothing unless called with confirm=true. That flag is a convention for the assistant, not an approval step: keep your MCP client asking before each write tool call rather than auto-approving them. The app-protocol writes re-read the setting afterwards and say whether it took.
  • Untrusted names. Device names, SSIDs and log lines are chosen by whoever owns the device, including guests. Treat them as data; the server's instructions tell the assistant the same.
  • No lockouts. The Deco locks logins after repeated failures. After a refused login the server makes no further attempt until it is restarted, so fix the credentials and restart it. App-protocol requests are never resent after a failure, since a write may already have happened; web requests are only resent when the Deco says the session had expired, i.e. the request was not applied.
  • Secrets stay out. Wi-Fi passwords are never returned; deco_get_setting removes passwords, keys, usernames and PINs; session tokens are kept out of error messages, and log lines that carry them are filtered out.
  • Privacy. Tool results go to your AI provider like any other conversation content. They can include device names, IPs and MACs (who is home and what they own), your public IP, DDNS hostname, SSIDs, parental-control profiles and log lines.
  • TLS. The Deco's web API uses a self-signed certificate, so that connection is not verified: someone able to intercept traffic on your LAN could capture the admin password. The app protocol authenticates both ends with SPAKE2+ instead, so it does not have this weakness. Only point DECO_HOST at your own Deco.
  • One admin session. The Deco allows a single web admin login, so using the server signs you out of the Deco web page (and vice versa).

Setup

You need uv (or Python 3.11+), the Deco's local admin password (for https://192.168.68.1) and, for 📱 tools, the Deco owner's TP-Link ID (email and password, as used in the Deco app).

Store them in the macOS Keychain, from a regular terminal:

security add-generic-password -s deco-mcp -a admin -w
security add-generic-password -s deco-mcp-tplink -a you@example.com -w

Each prompts for the password, so it never lands in your shell history. Don't run them through an assistant's shell (such as Claude Code's !): with no terminal to read from they store an empty password.

On other systems, set DECO_PASSWORD, DECO_TPLINK_EMAIL and DECO_TPLINK_PASSWORD instead. They then sit in plain text in your MCP client's config.

Claude Code

claude mcp add deco -- uvx deco-mcp

Add -e DECO_ALLOW_WRITES=1 before -- to enable the write tools.

Other MCP clients

{
  "mcpServers": {
    "deco": {
      "command": "uvx",
      "args": ["deco-mcp"],
      "env": { "DECO_ALLOW_WRITES": "0" }
    }
  }
}

Configuration

Variable Default
DECO_HOST https://192.168.68.1 Main Deco, including the scheme
DECO_ALLOW_WRITES unset 1 registers the write tools
DECO_PASSWORD Local admin password; overrides the Keychain
DECO_TPLINK_EMAIL / DECO_TPLINK_PASSWORD Owner's TP-Link ID; overrides the Keychain
DECO_KEYCHAIN_SERVICE deco-mcp Keychain item for the admin password
DECO_TPLINK_KEYCHAIN_SERVICE deco-mcp-tplink Keychain item for the TP-Link ID

deco_diagnose_path needs ping and, for the hop list, traceroute (macOS or Linux).

Development

python3 -m venv .venv && .venv/bin/pip install -e .
.venv/bin/python -m unittest discover -s tests
npx @modelcontextprotocol/inspector .venv/bin/deco-mcp

The app-protocol client was written from a clean-room description of the protocol, not from any existing implementation.

License

MIT

Metadata

Release files for deco-mcp 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deco-mcp 0.3.1
File Size Uploaded Provenance Actions
deco_mcp-0.3.1.tar.gz 25.9 kB With provenance Details for deco_mcp-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deco-mcp 0.3.1
File Interpreter ABI Platform Actions
deco_mcp-0.3.1-py3-none-any.whl Python 3 none any Details for deco_mcp-0.3.1-py3-none-any.whl

Total release size: 56.5 kB

Release files / deco_mcp-0.3.1.tar.gz

Download URL deco_mcp-0.3.1.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
71d713c49439dbcc1eb0db2e6aeeea91978bea5ed521d710812cb889bb2df97d
BLAKE2b-256 checksum
How to use checksums
b252ec9d094ba5ee96dd790309764df22f1e053bfb39f17dbebaefbb8fab3d0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / deco_mcp-0.3.1-py3-none-any.whl

Download URL deco_mcp-0.3.1-py3-none-any.whl
Size 30.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11013323c6d0f5a0ceb61db4d5fe0484ed10287c487685adac534ae39ed5903b
BLAKE2b-256 checksum
How to use checksums
ec45761b3b522b2a1b7927fbc0e3b897f97dcf04a97aa12e13de22fa1aae62cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for deco-mcp 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deco_mcp-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page