sandraschi/tapo-camera-mcp
If you are the rightful owner of tapo-camera-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Tapo Camera MCP is a FastMCP 2.10-compliant server designed to control TP-Link Tapo cameras, offering a unified interface for seamless integration with other MCP-compliant systems.
🏠 Home Security Dashboard MCP
🚀 PRODUCTION READY: Unified home security dashboard with comprehensive device onboarding, dual MCP architecture - serving as both individual camera MCP servers AND a complete security and energy monitoring platform.
🏗️ DUAL ARCHITECTURE OVERVIEW
This repository has evolved into a sophisticated dual-role platform:
🎯 Role 1: Individual MCP Servers
Standalone MCP servers for specific device types that can run independently:
- Tapo Camera MCP: TP-Link camera control and monitoring
- USB Webcam MCP: Direct webcam management
- Ring MCP: Doorbell and security camera integration
- Nest Protect MCP: Smoke/CO detector monitoring
🎯 Role 2: Unified Security Dashboard
Multi-MCP orchestration platform that coordinates multiple MCP servers:
- Single Interface: Monitor all cameras + sensors + alarms in one dashboard
- Cross-System Integration: Correlate events across different security systems
- Real-time Monitoring: Live status updates from all integrated devices
- Remote Access: Mobile monitoring via Tailscale VPN
The dashboard serves as the "conductor" that brings together multiple specialized "instruments" (MCP servers) into a cohesive security symphony.
🏆 MAJOR ACHIEVEMENT - LIVE DASHBOARD WORKING!
✅ BREAKTHROUGH ACCOMPLISHED:
- Unified Security Dashboard: Single interface monitoring cameras + security sensors
- Live Web Interface: Real-time monitoring at
http://localhost:7777 - USB Webcam Support: Auto-detection and display in dashboard
- Claude Desktop Integration: MCP server starts successfully in Claude
- Multi-MCP Architecture: Foundation for integrating Nest Protect, Ring, and other security MCPs
🎯 Current Status: USB webcam recognized, security dashboard operational, Tapo cameras pending auth resolution, Nest Protect & Ring MCP integration ready.
🚀 DUAL ARCHITECTURE CAPABILITIES (October 2025)
🎯 ASPECT 1: INDIVIDUAL MCP SERVERS
✅ WORKING NOW
- 🎥 Tapo Camera MCP: TP-Link Tapo camera control and monitoring
- 📹 USB Webcam MCP: Auto-detection and management
- 🤖 Claude Desktop Integration: MCP protocol compliance for AI assistants
- 🔧 Camera Management Tools: Add, configure, and control cameras
- 📊 Real-time Status: Camera connection health and diagnostics
🎯 CORE MCP FEATURES
- MCP 2.12.0 Protocol: Full Model Context Protocol compliance
- Modular Camera Types: Extensible architecture for new camera brands
- Asynchronous Operations: High-performance async I/O
- Type-Safe APIs: Full type hints and Pydantic validation
🎯 ASPECT 2: UNIFIED SECURITY DASHBOARD
✅ WORKING NOW
- 🏠 Live Security Dashboard: Single interface at
localhost:7777 - 🔗 Multi-MCP Integration: Connect multiple security MCP servers
- 📊 Real-time Monitoring: Cameras + sensors + alarms in one view
- 🚨 Alert Aggregation: Unified security event display
- 📱 Mobile Access: Works on iPad/iPhone via Tailscale
🎯 CORE DASHBOARD FEATURES
- Multi-Server Coordination: Nest Protect, Ring, and other MCPs
- Security Event Correlation: Cross-system alert analysis
- Professional UI/UX: Responsive design with real-time updates
- Remote Monitoring: Access anywhere via secure VPN
📷 SUPPORTED CAMERA TYPES
- ✅ USB Webcams: Auto-detected and monitored (WORKING)
- 🔄 Tapo Cameras: TP-Link Tapo series (pending auth resolution)
- 📋 Ring Cameras: Experimental support for Ring devices
- 🐱 Petcube Cameras: Petcube pet cameras with full API access (READY)
⚠️ UNSUPPORTED CAMERAS
- 🚫 Furbo Cameras: NOT SUPPORTED - Furbo intentionally blocks third-party API access. Use official Furbo app only.
🐾 PETCUBE INTEGRATION ⭐
Petcube Bites 2 Lite is now fully supported as an excellent Furbo replacement!
🎥 Camera Features:
- 1080p Full HD video with night vision
- 160° wide-angle lens
- Two-way audio with noise cancellation
- Motion detection with smart alerts
- Cloud storage (30 days free)
🍖 Smart Features:
- Dual treat compartments (vs Furbo's single)
- Laser pointer for interactive play
- Auto-play mode with built-in toys
- Custom feeding schedules
- Medication dispensing capability
🔋 Battery & Connectivity:
- 12-hour battery life (rechargeable)
- WiFi + Bluetooth connectivity
- Mobile app for iOS/Android
- Alexa/Google Home integration
💰 Pricing & Value:
- Price: $199-249 (vs Furbo's $249-349)
- Better value: More features, lower price
- API access: Full third-party integration
- Where to buy: Amazon, Petcube website, pet stores
🔧 MCP Configuration:
cameras:
my_petcube:
type: petcube
params:
email: "your_petcube_account@example.com"
password: "your_password"
device_id: "optional_device_id" # Auto-detected if not specified
🎮 MCP Features:
- ✅ Live video streaming
- ✅ Remote treat dispensing
- ✅ Motion/sound alerts
- ✅ Battery monitoring
- ✅ Status tracking
- ✅ Automated pet care
🚀 Why Petcube Over Furbo:
| Feature | Furbo ❌ | Petcube ✅ |
|---|---|---|
| API Access | Blocked | ✅ Official API |
| Treat Compartments | 1 | 2 |
| Interactive Toys | Limited | Laser + Auto-play |
| Third-party Apps | Forbidden | ✅ Allowed |
| Price | $249-349 | $199-249 |
| MCP Integration | ❌ Impossible | ✅ Full support |
Petcube is the clear winner for API-accessible pet cameras! 🐱✨
🎥 CAMERA CONTROLS (Next Phase)
- Live Streaming: RTSP, RTMP, and HLS streaming support
- PTZ Control: Pan, tilt, and zoom (where supported)
- Motion Detection: Configurable motion detection settings
- Snapshot Capture: Capture still images from video streams
- Audio Support: Two-way audio where available
🔌 INTEGRATIONS
🔗 MCP SERVER ECOSYSTEM (Dual Role)
This repository serves dual purposes:
- 🎥 Individual MCP Servers: Standalone camera control (Tapo, USB, Ring)
- 🏠 Unified Security Dashboard: Multi-MCP orchestration platform
🔗 Multi-MCP Coordination (Dashboard Role)
- Nest Protect MCP: Real-time smoke/CO detector monitoring
- Ring MCP: Doorbell and security camera integration
- Unified Dashboard: Single interface for all security devices
- Cross-System Alerts: Correlated security events and notifications
- Health Monitoring: Real-time status of all integrated MCP servers
🤖 Claude Desktop Integration (MCP Server Role)
- ✅ MCP 2.12.0 Protocol: Seamless Claude Desktop integration (WORKING)
- 🔧 Camera Management Tools: Add, configure, and control cameras
- 📊 Real-time Status: Camera connection health and diagnostics
- 🎯 AI Assistant Ready: Full MCP compliance for intelligent camera control
🌐 Web & API Interfaces (Dashboard Role)
- 🏠 Live Security Dashboard: Real-time monitoring at
localhost:7777 - 🔌 REST API: HTTP endpoints for remote control and monitoring
- 📊 Grafana Dashboards: Real-time monitoring and visualization (planned)
- 📱 Mobile Access: Works on iPad/iPhone via Tailscale
📺 VIDEO STREAMING DASHBOARD (Next Phase)
- Live Video Streams: Real-time MJPEG streaming from USB webcams
- RTSP Integration: Direct streaming from Tapo cameras
- Dynamic Camera Management: Add/remove cameras on the fly
🎯 DEVICE ONBOARDING SYSTEM (NEW - January 2025)
- Progressive Discovery: Automatic scanning for Tapo P115, Nest Protect, Ring devices, and USB webcams
- Smart Configuration: User-friendly device naming, location assignment, and settings
- Authentication Integration: OAuth setup for Nest Protect and Ring devices
- Cross-Device Integration: Intelligent recommendations for device combinations
- Beautiful Progressive UI: Step-by-step onboarding with real-time progress tracking
- Error Recovery: Comprehensive error handling with user guidance
- API-First Design: Full programmatic access to onboarding functionality
⚡ ADVANCED FEATURES (NEW - January 2025)
🔋 Energy Management Dashboard
- Tapo P115 Smart Plugs: Energy monitoring and control
- Real-time Power Consumption: Live wattage, voltage, and current monitoring
- Cost Analysis: Daily, monthly, and annual energy cost tracking
- Smart Scheduling: Automated power management based on usage patterns
- Energy Saving Mode: Intelligent power optimization
- Historical Data: Limited to current day (P115 limitation) with Home Assistant integration recommended
🚨 Alarm System Integration
- Nest Protect: Smoke and CO detector monitoring
- Ring Alarms: Door/window sensors and motion detectors
- Alert Correlation: Cross-system event analysis with camera feeds
- Battery Monitoring: Device health and maintenance alerts
- Test Scheduling: Automated device testing and validation
📊 AI-Powered Analytics
- Scene Analysis: Computer vision-based scene understanding
- Object Detection: People, vehicles, and activity recognition
- Performance Analytics: System health and optimization recommendations
- Smart Automation: Intelligent scheduling and predictive maintenance
- Pattern Recognition: Usage pattern analysis and optimization
📈 Advanced Dashboard Components
- Energy Charts: Lightweight Chart.js-based energy consumption visualization
- Real-time Updates: Live data refresh every minute
- Interactive Controls: Device management and automation configuration
- Mobile Responsive: Optimized for tablet and smartphone access
- Export Capabilities: Chart and data export functionality
🚀 QUICK START (What Works Now)
1. Start the Web Dashboard
# Start dashboard with auto-USB webcam detection
python start.py dashboard
Result: Dashboard at http://localhost:7777 with USB webcam monitoring
2. Check Claude Desktop Integration
# MCP server should load automatically in Claude Desktop
# Look for Tapo Camera tools in Claude
3. Current Working Features
- ✅ USB Webcam Detection: Auto-discovered on dashboard load
- ✅ Real-time Status: Camera connection monitoring
- ✅ Professional UI: Clean, responsive dashboard interface
- ✅ MCP Tools: 30+ tools available in Claude Desktop (FastMCP 2.12 compliant)
- Device Onboarding: Progressive discovery and configuration tools
- Energy Management: Tapo P115 smart plug control and monitoring
- Security Integration: Nest Protect and Ring device management
- AI Analytics: Performance monitoring and intelligent automation
4. Next Steps (Tapo Camera Integration)
# Once we resolve authentication:
# Add your C200 cameras with correct credentials
# Enable live video streaming in dashboard
# Full camera control through Claude
- Stream Controls: Start/stop streaming per camera
- Responsive Design: Works on desktop and mobile browsers
- Real-time Status: Live camera status and health monitoring
- Snapshot Capture: Instant image capture from any camera
- Multi-camera View: Grid layout for multiple camera feeds
🛠 Development Tools
- CLI Interface: Command-line tools for administration
- Mock Camera: Simulated camera for testing
- Comprehensive Logging: Structured logging throughout codebase
- Unit Tests: Complete test suite with 100% pass rate
- CI/CD Pipeline: GitHub Actions with multi-version testing (Python 3.8-3.13)
- Security Scanning: Automated vulnerability and dependency scanning
- Code Quality: Ruff linting and formatting, mypy type checking, pylint linting
🚀 Getting Started
🎯 Device Onboarding (NEW!)
Progressive device setup for any combination of devices:
# Start the server
python -m tapo_camera_mcp.web.server
# Open the onboarding dashboard
open http://localhost:7777/onboarding
Supported Device Types:
- Tapo P115 Smart Plugs: Energy monitoring and control
- Nest Protect Devices: Smoke and CO detector monitoring
- Ring Devices: Doorbell, motion sensors, and contact sensors
- USB Webcams: Video streaming and capture
Features:
- Automatic Discovery: Network scanning for all supported devices
- Smart Configuration: User-friendly naming and location assignment
- Cross-Device Integration: Intelligent automation recommendations
- Progressive UI: Step-by-step guided setup process
Installation Options
Option 1: MCPB Package (Recommended for Claude Desktop)
One-click installation for Claude Desktop users:
- Download the latest
.mcpbpackage from GitHub Releases - Drag the
.mcpbfile to Claude Desktop - Configure camera settings when prompted:
- Tapo Camera IP Address (optional)
- Tapo Camera Username (optional)
- Tapo Camera Password (optional)
- Web Dashboard Port (default: 7777)
- Restart Claude Desktop
- All 26+ tools are now available!
Quick Start with MCPB:
"Connect to my USB webcam using add_camera tool"
"Start the dashboard and show me the camera feed"
Option 2: Manual Installation
Prerequisites
- Python 3.10 or higher
- pip (Python package manager)
- OpenCV (for webcam support)
- TP-Link Tapo camera(s), Ring doorbell, or USB webcam
Installation
-
Install from source (recommended):
git clone https://github.com/yourusername/tapo-camera-mcp.git cd tapo-camera-mcp pip install -e . -
Install dependencies:
pip install -r requirements.txt
Configuration
-
Copy the example configuration file:
cp config.example.yaml config.yaml -
Edit
config.yamlwith your camera details:cameras: living_room: type: tapo host: 192.168.1.100 username: your_username password: your_password webcam: type: webcam device_id: 0
🚀 Usage
Starting the MCP Server
# Start MCP server for Claude Desktop integration
python -m tapo_camera_mcp.server_v2 --direct
# Start with debug logging
python -m tapo_camera_mcp.server_v2 --direct --debug
Starting the Web Dashboard
# Start the web dashboard (separate terminal)
python -m tapo_camera_mcp.web.server
# Dashboard will be available at: http://localhost:7777
Quick Start Script
# Check dependencies
python start.py check
# Test webcam
python start.py test
# Start MCP server only
python start.py mcp
# Start dual interface server (MCP + REST API)
python start.py dual
# Start web dashboard only
python start.py dashboard
# Start both services
python start.py both
# Test webcam and start dashboard
python start.py webcam
Using the CLI
# List all available commands
tapo-camera-mcp --help
# Camera Management
tapo-camera-mcp camera list # List all cameras
tapo-camera-mcp camera status <camera_name> # Get camera status
tapo-camera-mcp camera info <camera_name> # Get detailed camera info
# PTZ Controls
tapo-camera-mcp camera ptz move --direction up --speed 0.5
tapo-camera-mcp camera ptz preset save --name "Home"
tapo-camera-mcp camera ptz preset goto --name "Home"
# Media Controls
tapo-camera-mcp camera snapshot # Take a snapshot
tapo-camera-mcp camera record start # Start recording
tapo-camera-mcp camera record stop # Stop recording
# System Management
tapo-camera-mcp system status # Check system status
tapo-camera-mcp system restart # Restart the server
tapo-camera-mcp system update # Update to the latest version
API Reference
Web Dashboard Endpoints
GET /- Main dashboard pageGET /api/cameras- Get list of all camerasGET /api/cameras/{camera_id}/stream- Get video stream (MJPEG/RTSP)GET /api/cameras/{camera_id}/snapshot- Get camera snapshotGET /api/status- Get server status
MCP Tools
Camera Management
list_cameras- List all registered camerasadd_camera- Add a new camera to the systemconnect_camera- Connect to a specific cameradisconnect_camera- Disconnect from cameraget_camera_info- Get detailed camera informationget_camera_status- Get camera status and health
PTZ Controls
move_ptz- Move PTZ camera (pan, tilt, zoom)get_ptz_position- Get current PTZ positionsave_ptz_preset- Save current position as presetrecall_ptz_preset- Move to saved preset positiongo_to_home_ptz- Return to home positionstop_ptz- Stop PTZ movement
Media Operations
capture_image- Capture still image from camerastart_recording- Start video recordingstop_recording- Stop video recordingget_recording_status- Get recording status
System Management
get_system_info- Get camera system informationreboot_camera- Reboot the cameraget_logs- Get system logsset_motion_detection- Configure motion detectionset_led_enabled- Control LED statusset_privacy_mode- Enable/disable privacy mode
🛠 Development
Project Structure
src/tapo_camera_mcp/
├── core/ # Core server implementation
├── camera/ # Camera implementations
│ ├── base.py # Base camera class
│ ├── tapo.py # Tapo camera implementation
│ └── ...
├── api/ # API endpoints
│ └── v1/ # API version 1
├── tools/ # MCP tools
│ ├── camera/ # Camera-related tools
│ ├── ptz/ # PTZ controls
│ └── system/ # System tools
├── web/ # Web interface
└── cli_v2.py # Command-line interface
Setting Up Development Environment
-
Fork and clone the repository:
git clone https://github.com/yourusername/tapo-camera-mcp.git cd tapo-camera-mcp -
Create and activate a virtual environment:
# On Windows python -m venv venv .\venv\Scripts\activate # On macOS/Linux python3 -m venv venv source venv/bin/activate -
Install development dependencies:
pip install -e ".[dev]" pre-commit install
Building MCPB Package
To build an MCPB package for distribution:
# Windows (PowerShell)
.\scripts\build-mcpb-package.ps1 -NoSign
# Or build manually
mcpb pack . dist/tapo-camera-mcp.mcpb
The package will be created in dist/tapo-camera-mcp.mcpb (approximately 280KB).
For automated builds: Push a version tag to trigger GitHub Actions:
git tag v1.0.0
git push origin v1.0.0
Running Tests
# Run unit tests with coverage
pytest tests/unit/ --cov=tapo_camera_mcp --cov-report=html
# Run all tests
pytest tests/ -v
# Run MCP protocol tests
pytest tests/test_mcp_protocol.py
# Run with specific Python version (in CI/CD)
python -m pytest --cov=tapo_camera_mcp --cov-report=xml
Code Style
This project uses ruff for code linting and formatting. Before committing, run:
ruff check src/ tests/
ruff format src/ tests/
pylint tapo_camera_mcp/
📦 MCPB Packaging
This project supports MCPB (MCP Bundle) packaging for one-click installation in Claude Desktop.
For Users:
- Download
.mcpbfile from Releases - Drag to Claude Desktop
- Configure and enjoy!
For Developers:
- See
- Build with
.\scripts\build-mcpb-package.ps1 -NoSign - Full guide in
License
This project is licensed under the MIT License - see the file for details.
Acknowledgments
- TP-Link for their Tapo camera products
- FastMCP for the MCP framework
- Anthropic for Claude Desktop and MCPB toolkit
- Ring for Ring doorbell integration
Note: Furbo cameras are not supported due to their intentional API restrictions. Use the official Furbo app for Furbo camera access.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.