finds.dev← search

// the find

mihai-dinculescu/tapo

★ 815 · Rust · MIT · updated Oct 2026

🦀 Rust API, 🐍 Python API, and 🤖 MCP Server for TP-Link Tapo smart devices

A Rust client for TP-Link Tapo plugs, bulbs, strips, hubs, sensors and cameras that talks to each device directly over the LAN by IP address. It ships with a Python package built on the same crate and an MCP server that exposes devices as tools for AI agents, and it suits people who want to script their Tapo gear without the vendor app.

The Python package is a binding over the same Rust implementation (tapo-py/src sits next to tapo/src), so there is one protocol codebase to fix and audit rather than two ports that drift apart. The protocol layer covers more than on/off: tapo/src/api/protocol includes KLAP, an AES SSL path, a TPAP SPAKE2+ handshake, and a media stream downloader for cameras. Handlers are split by device family (light, plug, energy monitoring, camera hub, hub child devices), so adding a model usually means one new file instead of edits across the crate. The repo runs a cargo audit workflow, and the MCP server has its own auth module with a test file.

The protocol is reverse-engineered, and the three handshake generations in the tree (KLAP, AES, TPAP) show TP-Link has changed the wire format more than once; each change is a window where new firmware can break the library. The README's tested-with list is what the maintainer owns, not a promise for your firmware, so check SUPPORTED_DEVICES.md before buying. The MCP server gives an LLM direct control over physical devices, including take_snapshot on cameras, and the README says nothing about token scope or what a prompt-injected agent can do with a valid session. The crate is at 0.11 with no stated stability policy, so expect breaking changes between minor versions, and the examples pass account credentials as plain strings without saying how long a session lasts or when to refresh it, which matters for any long-running daemon.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →