Tapo MCP — Claude Code MCP server: what it does, how to install
Controls TP-Link Tapo smart home hardware through the Model Context Protocol. Lets AI agents switch plugs, tweak lighting, query sensors, and grab camera frames.
Open on GitHubWhat Tapo MCP does
Built in Rust using the tapo crate and the rmcp SDK, the server runs as an HTTP service with Streamable HTTP transport on 127.0.0.1:3000. It exposes local network hardware to AI agents through structured tools. Discovered hardware also maps to the tapo://devices resource in JSON format.
Supported actions include toggling power, setting light brightness, and picking color presets. For energy monitoring plugs such as P110 or P115, agents can inspect power draw history across hours, days, or months. Temperature and humidity records from T310 and T315 sensors cover the previous 24 hours. Hub sensor event logs are also readable.
Without TAPO_MCP_USERNAME, TAPO_MCP_PASSWORD, and a valid subnet target in TAPO_MCP_DISCOVERY_TARGET, the server cannot start. Capturing camera stills through take_snapshot requires dedicated camera credentials in TAPO_MCP_CAMERA_USERNAME and TAPO_MCP_CAMERA_PASSWORD.
What it helps with
- toggle Tapo smart plugs and lighting fixtures via chat
- query historical energy consumption metrics from P110 and P115 plugs
- retrieve 24-hour temperature and humidity logs from T310 sensors
- capture JPEG still images directly from Tapo security cameras
- audit trigger event logs from smart buttons and motion sensors
Example prompts for the agent
- List all Tapo smart devices discovered on my local network.
- Turn off the office light and set the bedroom lamp brightness to 50%.
- Check the power draw of the TV plug over the last 6 hours.
How to install Tapo MCP
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Tapo MCP
How to install Tapo MCP in Claude Code?
The tool runs as a standalone HTTP process. Start the binary with your environment variables configured and add http://127.0.0.1:3000 to your MCP client configuration.
What does Tapo MCP do?
It exposes Tapo smart home devices to AI models, allowing them to inspect device state, control power and brightness, fetch sensor metrics, and grab camera frames.
Which environment variables are required to run Tapo MCP?
You must provide TAPO_MCP_USERNAME, TAPO_MCP_PASSWORD, and your network target in TAPO_MCP_DISCOVERY_TARGET. Taking camera snapshots also requires setting TAPO_MCP_CAMERA_USERNAME and its password.