ClaudeCodeMod

All shelves / MCP servers

Tapo MCP

io.github.mihai-dinculescu/tapo-mcp · 764 stars · Rust · MIT

MCP server MCP server for discovering and controlling TP-Link Tapo smart home devices via AI Agents

Install

In your shell
npx clawhub install tapo

These repos do not share one command. When an entry shows a command, it was copied as published. Check the repo's README before you run it.

Published as

  • Dockerghcr.io/mihai-dinculescu/tapo-mcp:0.5.3Streamable HTTP

From the server's entry in the official MCP Registry.

Configuration

NameSet asWhat it is
TAPO_MCP_USERNAMERequired · SecretEnv varTP-Link Tapo account email
TAPO_MCP_PASSWORDRequired · SecretEnv varTP-Link Tapo account password
TAPO_MCP_DISCOVERY_TARGETRequiredEnv varNetwork target for device discovery (e.g. 192.168.1.255)
TAPO_MCP_API_KEYOptional · SecretEnv varOptional Bearer token for API authentication
TAPO_MCP_DISCOVERY_TIMEOUTOptionalEnv varDevice discovery timeout in seconds
OTEL_EXPORTER_OTLP_ENDPOINTOptionalEnv varOptional OpenTelemetry collector endpoint for tracing

Files

README.md

tapo-mcp

MCP server that exposes Tapo smart-home devices as AI-callable tools and resources via the Model Context Protocol.

Built on the tapo crate and the rmcp SDK. Runs as an HTTP server (Streamable HTTP transport).

Example Prompts

"List all my Tapo devices" "Turn off the office light" "Turn on smart plug 4 on the power strip" "Is the office light on?" "Set the bedroom light to 50% brightness" "Change the living room light to Coral" "Take a snapshot from the baby monitor" "What's the temperature in the kitchen?" "Show me the last 24 hours of temperature from the living room temperature and humidity sensor" "List the 5 most recent events on the smart button"

Tools

Resources

Capabilities

Devices and child devices expose separate lists of set and get capabilities they support.

Set Capabilities

Get Capabilities

Configuration

All configuration is via environment variables prefixed with TAPO_MCP_:

[^camera]: Set on each camera in the Tapo app under Camera Settings > Advanced Settings > Camera Account. Distinct from your TP-Link cloud account.

Authentication

When TAPO_MCP_API_KEY is set, the server requires all HTTP requests to include an Authorization: Bearer <key> header. Requests with a missing or invalid token receive a 401 Unauthorized response.

When the variable is unset (or empty/whitespace-only), the server runs without authentication.

Network exposure

The server enforces the MCP Streamable HTTP DNS-rebinding protection. By default only loopback Host headers (localhost, 127.0.0.1, ::1) are accepted, which prevents a malicious web page from reaching a locally running server via DNS rebinding. Requests with any other Host receive a 403 Forbidden response.

To reach the server over the LAN or from another host, set TAPO_MCP_ALLOWED_HOSTS to the exact hostname(s) or host:port authorities clients connect to, for example TAPO_MCP_ALLOWED_HOSTS="tapo-mcp.lan:3000,192.168.1.50:3000". This replaces the loopback default, so include loopback entries as well if you still need them.

To avoid shipping unauthenticated smart-home control, the server refuses to start when it binds to a non-loopback address (for example 0.0.0.0:3000) without TAPO_MCP_API_KEY set. Set an API key, or bind to a loopback address.

Deployment

Docker

docker run --rm \
  --network host \
  -e TAPO_MCP_USERNAME="you@example.com" \
  -e TAPO_MCP_PASSWORD="<YOUR_TAPO_PASSWORD>" \
  -e TAPO_MCP_CAMERA_USERNAME="<YOUR_CAMERA_ACCOUNT_USERNAME>" \
  -e TAPO_MCP_CAMERA_PASSWORD="<YOUR_CAMERA_ACCOUNT_PASSWORD>" \
  -e TAPO_MCP_DISCOVERY_TARGET="192.168.1.255" \
  -e TAPO_MCP_API_KEY="<YOUR_TAPO_MCP_API_KEY>" \
  ghcr.io/mihai-dinculescu/tapo-mcp:latest

Note: The image binds to 0.0.0.0:3000, so TAPO_MCP_API_KEY is required — the server refuses to start on a non-loopback address without it (see Network exposure). To reach the server by hostname or LAN IP rather than loopback, also set TAPO_MCP_ALLOWED_HOSTS.

Note: --network host is required so the container can reach Tapo devices on your local network via UDP broadcast for discovery. On macOS and Windows, --network host is not supported — you can use -p 3000:3000 instead, but device discovery won't work as Docker Desktop runs containers inside a VM without LAN access.

Kubernetes

Create the Secret and ConfigMap first:

kubectl create secret generic tapo-mcp-secrets \
  --from-literal=TAPO_MCP_USERNAME="you@example.com" \
  --from-literal=TAPO_MCP_PASSWORD="<YOUR_TAPO_PASSWORD>" \
  --from-literal=TAPO_MCP_CAMERA_USERNAME="<YOUR_CAMERA_ACCOUNT_USERNAME>" \
  --from-literal=TAPO_MCP_CAMERA_PASSWORD="<YOUR_CAMERA_ACCOUNT_PASSWORD>" \
  --from-literal=TAPO_MCP_API_KEY="<YOUR_TAPO_MCP_API_KEY>"

kubectl create configmap tapo-mcp-config \
  --from-literal=TAPO_MCP_DISCOVERY_TARGET="192.168.1.255"

Then apply the Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: tapo-mcp
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: tapo-mcp
  template:
    metadata:
      labels:
        app: tapo-mcp
    spec:
      hostNetwork: true
      containers:
        - name: tapo-mcp
          image: ghcr.io/mihai-dinculescu/tapo-mcp:latest
          env:
            - name: TAPO_MCP_USERNAME
              valueFrom:
                secretKeyRef:
                  name: tapo-mcp-secrets
                  key: TAPO_MCP_USERNAME
            - name: TAPO_MCP_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: tapo-mcp-secrets
                  key: TAPO_MCP_PASSWORD
            - name: TAPO_MCP_CAMERA_USERNAME
              valueFrom:
                secretKeyRef:
                  name: tapo-mcp-secrets
                  key: TAPO_MCP_CAMERA_USERNAME
            - name: TAPO_MCP_CAMERA_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: tapo-mcp-secrets
                  key: TAPO_MCP_CAMERA_PASSWORD
            - name: TAPO_MCP_API_KEY
              valueFrom:
                secretKeyRef:
                  name: tapo-mcp-secrets
                  key: TAPO_MCP_API_KEY
            - name: TAPO_MCP_DISCOVERY_TARGET
              valueFrom:
                configMapKeyRef:

Facts

Kind
MCP server
Repo
io.github.mihai-dinculescu/tapo-mcp
Group
Uncategorized
Stars
764
License
MIT
Language
Rust
Last push
2026-10-09
Forks
84
MCP Registry
io.github.mihai-dinculescu/tapo-mcp
Topics
iot, l510, l530, p100, p110, smart-home, tapo

More on this shelf

  1. 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
  2. 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
  3. 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
  4. 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
  5. 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
  6. 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k