Enables control of TP-Link Kasa smart plugs and bulbs through natural language commands, including power control, brightness adjustment, color settings, and predefined lighting scenes
Planned integration for complex workflow automation and advanced smart home device orchestration
Provides control capabilities for TP-Link smart home devices including smart plugs and bulbs, with support for device management, status monitoring, and scene-based lighting control
Smart Home MCP Server
A Model Context Protocol (MCP) server that enables LLMs to control smart home devices through natural language commands.
Features
- Device Control: Control TP-Link Kasa smart plugs and bulbs
- Natural Language Interface: Human-friendly device names and commands
- Scene Management: Predefined lighting scenes (bright, dim, warm, cool, party, relax, bedtime)
- Real-time Status: Get current device states and capabilities
- Room-based Control: Organize devices by room for targeted control
Prerequisites
- REST API Server: The smart home REST API must be running on
http://localhost:3001
- Device Discovery: Devices must be registered in the device registry
- Network Access: Ensure the MCP server can reach your smart home network
Installation
Usage
Claude Desktop Integration
Add this to your Claude Desktop configuration:
Available Tools
1. list_devices
List all smart home devices with their current status.
Example: "Show me all my smart home devices"
2. control_light
Control smart lights with various actions:
- Power: Turn lights on/off
- Brightness: Adjust brightness (1-100%)
- Color: Set RGB color values
- Color Temperature: Set warm/cool white (2500-9000K)
Examples:
- "Turn on the elizabeth night lamp"
- "Set the holiday lights to 50% brightness"
- "Make the bedroom light red"
- "Set the living room light to warm white"
3. control_plug
Control smart plugs (on/off only).
Example: "Turn off the holiday lights plug"
4. set_scene
Apply predefined lighting scenes:
- bright: 100% brightness, 4000K
- dim: 20% brightness, 2700K
- warm: 70% brightness, 2500K
- cool: 80% brightness, 6500K
- party: 100% brightness, magenta color
- relax: 40% brightness, 2200K
- bedtime: 10% brightness, 2000K
Examples:
- "Set a relaxing scene"
- "Apply bedtime lighting"
- "Make it bright in the living room"
5. get_device_status
Get detailed status of a specific device.
Example: "What's the status of the elizabeth night lamp?"
Device Names
The server uses friendly device names from the device registry:
holiday-lights
- HS103 Smart Plugelizabeth-night-lamp
- KL125 Smart Bulbguest-bedroom-lamp
- KL125 Smart Bulb- And more...
API Integration
The MCP server communicates with the REST API at http://localhost:3001/api
:
GET /devices
- List all devicesPOST /devices/{name}/control
- Control devicePOST /devices/{name}/power
- Set power state
Development
Building
Testing
Make sure the REST API server is running:
Debugging
The MCP server logs to stderr, so you can see debug output when running with Claude Desktop.
Example Conversations
User: "Turn on all the lights and set them to a warm, cozy scene"
Assistant: I'll turn on your lights and set them to a warm, cozy ambiance.
Uses set_scene
with "warm" to apply 70% brightness and 2500K color temperature to all lights
User: "What devices do I have available?"
Assistant: Here are your smart home devices:
Uses list_devices
to show all registered devices with their current status
User: "Turn off the holiday lights"
Assistant: I'll turn off the holiday lights for you.
Uses control_plug
to turn off the holiday-lights device
Troubleshooting
- MCP Server Not Found: Ensure the path in Claude Desktop config is correct
- API Connection Failed: Verify the REST API is running on port 3001
- Device Not Found: Check device names in the registry match the friendly names
- Network Issues: Ensure firewall allows communication between networks
Next Steps
- Add Tuya device support
- Implement advanced scene management
- Add device grouping and automation rules
- Integrate with N8N for complex workflows
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables control of TP-Link Kasa smart home devices through natural language commands. Supports device control, lighting scenes, room-based organization, and real-time status monitoring for smart plugs and bulbs.