Smart Home Orchestrator MCP Server
by jprbom
README.md
# Smart Home Orchestrator MCP Server
A revolutionary MCP (Model Context Protocol) server that provides unified control for IoT devices across different brands, enables natural language automation, and optimizes your smart home with AI-powered insights.
## Features
- **Unified Device Control**: Control devices from different manufacturers through one interface
- **Natural Language Automation**: Create complex automation scenarios using plain English
- **Energy Optimization**: AI-powered analysis to reduce energy consumption
- **Scene Management**: Create and manage complex multi-device scenes
- **Predictive Automation**: Learn from patterns to suggest and implement automations
- **Voice Control Integration**: Works with multiple voice assistants
- **Security Monitoring**: Unified security dashboard for all smart devices
- **Cross-Platform Support**: Works with Zigbee, Z-Wave, Wi-Fi, and Bluetooth devices
## Supported Ecosystems
- **Philips Hue** - Lighting control
- **Nest** - Thermostats and cameras
- **Ring** - Doorbells and security
- **Sonos** - Audio systems
- **Samsung SmartThings** - General IoT
- **TP-Link Kasa** - Smart plugs and switches
- **Arlo** - Security cameras
- **Ecobee** - Smart thermostats
- **LIFX** - Smart lighting
- **August** - Smart locks
- **Custom MQTT devices** - DIY IoT devices
## Installation
1. Clone this repository:
```bash
git clone https://github.com/[your-username]/smart-home-orchestrator-mcp.git
cd smart-home-orchestrator-mcp
```
2. Install dependencies:
```bash
npm install
```
3. Create a `.env` file with your device credentials:
```bash
cp .env.example .env
# Edit .env with your actual credentials
```
## Configuration
### For Claude Desktop
Add to your Claude Desktop configuration file:
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"smart-home": {
"command": "node",
"args": ["C:/path/to/smart-home-orchestrator-mcp/src/index.js"],
"env": {
"HOME_LOCATION": "Your City, Country"
}
}
}
}
```
## Usage
Once configured, you can control your smart home through Claude:
### Device Control
- "Turn on the living room lights"
- "Set the thermostat to 72 degrees"
- "Lock all doors"
- "Dim the bedroom lights to 30%"
- "Play music in the kitchen"
### Automation Creation
- "Create a bedtime routine that locks doors, turns off lights, and sets the thermostat to 68"
- "When I say 'movie time', dim the lights and turn on the TV"
- "If motion is detected at the front door after 10 PM, turn on the porch light"
### Energy Management
- "Show me my energy usage for this week"
- "Optimize my home for energy savings"
- "Which devices are using the most power?"
- "Create an eco-friendly schedule for my devices"
### Scene Management
- "Create a 'party mode' scene with colorful lights and music"
- "Save the current device states as 'relaxation scene'"
- "Activate morning routine"
## Available Tools
1. **control_device**: Control individual smart devices
2. **create_automation**: Create automation rules with natural language
3. **manage_scene**: Create, update, or activate scenes
4. **get_device_status**: Check status of devices
5. **analyze_energy_usage**: Get energy consumption insights
6. **optimize_energy**: Get AI-powered energy optimization suggestions
7. **discover_devices**: Find new devices on your network
8. **create_routine**: Build complex multi-step routines
9. **security_status**: Get security system overview
10. **predict_usage**: Predict future energy usage and costs
## Tool Examples
### Control Device
```
Input: {
"device_name": "Living Room Light",
"action": "turn_on",
"parameters": {
"brightness": 80,
"color": "warm_white"
}
}
```
### Create Automation
```
Input: {
"name": "Sunset Lights",
"trigger": "sunset",
"actions": [
{
"device": "Porch Light",
"action": "turn_on"
},
{
"device": "Living Room Blinds",
"action": "close"
}
]
}
```
### Energy Analysis
```
Input: {
"period": "last_7_days",
"group_by": "device_type",
"include_costs": true
}
```
## Advanced Features
### Natural Language Processing
The server understands complex commands:
- "When I'm not home, keep the house at an efficient temperature but make sure it's comfortable by the time I usually return"
- "Create a security mode that simulates presence when I'm on vacation"
- "Optimize my home office lighting based on the time of day and weather"
### Learning Capabilities
- Learns your daily routines
- Suggests automations based on patterns
- Adapts to seasonal changes
- Predicts device failures
### Integration with AI
- Works with Claude's sub-agents for complex reasoning
- Can explain why certain automations are suggested
- Provides detailed energy-saving strategies
- Offers troubleshooting assistance
## Security & Privacy
- All device credentials are stored locally
- Communications are encrypted
- No data is sent to external servers without permission
- Supports local-only operation
- Regular security updates
## Troubleshooting
### Common Issues
1. **Device not found**: Ensure the device is on the same network
2. **Authentication failed**: Check credentials in `.env` file
3. **Slow response**: Some devices may have rate limits
4. **Automation not triggering**: Check time zone settings
### Debug Mode
Enable debug logging:
```bash
DEBUG=true npm start
```
## Development
### Project Structure
```
smart-home-orchestrator-mcp/
├── src/
│ ├── index.js # Main server file
│ ├── devices/ # Device integrations
│ ├── automations/ # Automation engine
│ ├── scenes/ # Scene management
│ ├── energy/ # Energy analysis
│ └── utils/ # Helper functions
├── configs/ # Device configurations (gitignored)
├── .env # Environment variables (gitignored)
├── .gitignore # Git ignore file
├── package.json # Project dependencies
└── README.md # This file
```
### Adding New Device Support
1. Create a new integration in `src/devices/`
2. Implement the device interface
3. Add to device registry
4. Update documentation
## Roadmap
- [ ] Matter/Thread protocol support
- [ ] Advanced AI predictions with machine learning
- [ ] Integration with solar panels and battery systems
- [ ] Augmented reality device control
- [ ] Blockchain-based device authentication
- [ ] Integration with electric vehicles
- [ ] Advanced presence detection with AI
- [ ] Multi-home support
## Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Acknowledgments
- Built with the Model Context Protocol SDK
- Inspired by the need for unified smart home control
- Thanks to all IoT device manufacturers for their APIs
## Support
For issues, questions, or suggestions, please open an issue on GitHub.
## Disclaimer
This tool is for personal use. Always follow manufacturer guidelines and local regulations when automating devices. The authors are not responsible for any damage or issues arising from the use of this software.
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo recent community issues