A VS Code extension that provides Model Context Protocol (MCP) server integration for Fibaro Home Center 3 (HC3) smart home systems. This extension allows AI assistants in VS Code to interact with your Fibaro HC3 devices, scenes, and system information through natural language commands.
- Complete Fibaro HC3 REST API Integration: Access all major HC3 endpoints
- VS Code Extension Integration: Seamlessly registers as an MCP server in VS Code
- Configuration Management: Easy setup via VS Code settings or environment variables
- Comprehensive API Coverage: 66+ tools covering all aspects of HC3 management
- QuickApp Development: Full file manipulation capabilities for QuickApp development
- Plugin Management: Complete plugin configuration, UI interaction, and lifecycle management
- Intelligent Context: System analysis, automation suggestions, and device relationships
- Programming Documentation: Built-in HC3 programming guides and examples
- Error Handling: Robust error handling with detailed error messages
- Type Safety: Full TypeScript implementation with proper types
- Fibaro Home Center 3: A running HC3 system with network access
- VS Code: Version 1.103.0 or higher
- Network Access: Your VS Code environment must be able to reach your HC3 system
- HC3 User Account: Valid username and password for your HC3 system
- Install the Extension:
- Install from VS Code Marketplace (coming soon)
- Or install from
.vsix
file usingExtensions: Install from VSIX...
command
-
Configure via Command Palette:
- Open Command Palette (
Cmd+Shift+P
/Ctrl+Shift+P
) - Run
HC3 MCP: Configure Fibaro HC3 Connection
- Follow the prompts to enter your HC3 details
- Open Command Palette (
-
Manual Settings:
- Go to VS Code Settings
- Search for "HC3 MCP"
- Configure:
- Host: IP address of your HC3 (e.g.,
192.168.1.57
) - Username: Your HC3 username
- Password: Your HC3 password
- Port: HC3 port (default: 80)
- Host: IP address of your HC3 (e.g.,
Create a ~/.env
file in your home directory with:
HC3_URL=http://192.168.1.57
HC3_USER=your_username
HC3_PASSWORD=your_password
Note: The extension will automatically use environment variables as fallback if VS Code settings are not configured.
- Run
HC3 MCP: Test Fibaro HC3 Connection
command - Verify successful connection to your HC3 system
For GitHub Copilot to use the MCP server, you need to configure it manually:
-
Open User Settings (JSON) in VS Code:
- Press
Cmd+Shift+P
/Ctrl+Shift+P
- Type "Preferences: Open User Settings (JSON)"
- Press
-
Add MCP Server Configuration:
{
"github.copilot.chat.experimental.mcpServers": {
"hc3-smart-home": {
"command": "node",
"args": ["/path/to/your/extension/out/mcp/hc3-mcp-server.js"],
"env": {
"FIBARO_HOST": "192.168.1.57",
"FIBARO_USERNAME": "admin",
"FIBARO_PASSWORD": "your_password",
"FIBARO_PORT": "80"
}
}
}
}
-
Replace the configuration values:
- Update the path to your compiled MCP server
- Set your HC3 IP address, username, and password
- Restart VS Code
-
Test in Copilot Chat:
- Important: Start a new chat session after configuring the extension
- "List my HC3 devices"
- "@hc3-smart-home get all devices"
Note: If the MCP server tools are not immediately available, start a new GitHub Copilot chat session to allow it to discover the MCP server.
This extension contributes the following settings:
hc3McpServer.host
: Fibaro HC3 IP address or hostnamehc3McpServer.username
: Fibaro HC3 usernamehc3McpServer.password
: Fibaro HC3 password (stored securely)hc3McpServer.port
: Fibaro HC3 port number (default: 80)
Once configured, the extension automatically provides an MCP server that AI assistants can use. You can interact with your HC3 system using natural language commands like:
- "Show me all devices in the living room"
- "Turn on the kitchen lights"
- "Set the bedroom dimmer to 50%"
- "Turn off all lights in the house"
- "Show me all Z-Wave devices"
- "Get detailed information about device 25"
- "Set the RGB light to blue color"
- "Turn on the garden sprinkler for 10 minutes with a 5-minute delay"
- "List all scenes in the master bedroom"
- "Run the movie night scene"
- "Stop the current scene"
- "Show me all Alexa-enabled scenes"
- "Show energy consumption for device 15"
- "Get total energy usage for today"
- "Which devices are consuming the most power?"
- "What's the current weather?"
- "Show HC3 system information"
- "What's the current home status?"
- "Set home mode to Away"
- "Create an automation to turn off all lights when I leave"
- "Show me all motion sensors and their current state"
- "What's the temperature in each room?"
- "Show me the files for QuickApp 926"
- "Get the content of the main.lua file for device 145"
- "Create a new helper.lua file for QuickApp 82"
- "Update the main file for QuickApp 67 with new code"
- "Export QuickApp 45 as an encrypted file for specific gateways"
- "Delete the old_function.lua file from QuickApp 29"
- "Show me all installed plugins"
- "Get the configuration interface for device 75"
- "Update the label text for button_1 on device 45"
- "Trigger the onReleased event for switch_main on device 33"
- "Create a child device for multi-channel switch 88"
- "Add energy interface to device 156"
- "Restart the malfunctioning plugin on device 92"
- "Update the temperature property for device 64"
- "Show available IP camera types for installation"
The MCP server provides 66+ tools organized into the following categories:
get_system_info
- Get basic HC3 system informationget_devices
- List all devices with filtering optionsget_device
- Get specific device detailscontrol_device
- Control device actions (turnOn, turnOff, setValue, etc.)get_rooms
- List all rooms and sectionsget_scenes
- List all scenesget_scene
- Get specific scene detailsstart_scene
- Execute scenesstop_scene
- Stop running scenes
get_device_actions
- Get available actions for devicesget_device_events
- Get device event historyget_global_variables
- Manage global variablesset_global_variable
- Set global variable valuesdelete_global_variable
- Delete global variables
get_climate_panels
- Climate control panel informationget_climate_zones
- Climate zones and settingsget_climate_schedules
- Heating/cooling schedulesupdate_climate_schedule
- Modify climate schedulesget_weather_data
- Current weather information
get_alarm_partitions
- Alarm system partitionsget_alarm_zones
- Alarm zones configurationget_alarm_devices
- Security devices listarm_alarm_partition
- Arm specific alarm partitionsdisarm_alarm_partition
- Disarm alarm partitionsget_users
- System users and permissionsget_user_locations
- User location tracking
get_network_status
- Network connectivity statusget_wifi_networks
- Available Wi-Fi networksget_network_devices
- Connected network devices
get_sprinkler_zones
- Irrigation system managementcontrol_sprinkler_zone
- Sprinkler zone controlget_custom_events
- Custom event definitionsemit_custom_event
- Trigger custom eventsget_system_backups
- System backup managementcreate_system_backup
- Create new backupsget_system_diagnostics
- System health diagnosticsget_ios_devices
- iOS device managementget_quickapps
- Quick Apps managementget_quickapp_logs
- Quick App log analysis
get_system_context
- Comprehensive system overviewget_device_relationships
- Device relationships and room assignmentsget_automation_suggestions
- AI-powered automation recommendationsget_device_usage_patterns
- Device usage analytics and patternsexplain_device_capabilities
- Detailed device capability explanations
get_hc3_configuration_guide
- Complete HC3 configuration documentationget_hc3_quickapp_programming_guide
- Quick Apps programming referenceget_hc3_lua_scenes_guide
- Lua Scenes programming documentationget_hc3_programming_examples
- Practical code examples and snippets
list_quickapp_files
- Get list of all source files for a QuickAppget_quickapp_file
- Get detailed information about a specific QuickApp file including contentcreate_quickapp_file
- Create new source files for QuickAppsupdate_quickapp_file
- Update existing QuickApp source filesupdate_multiple_quickapp_files
- Update multiple QuickApp files at oncedelete_quickapp_file
- Delete QuickApp source files (main files cannot be deleted)export_quickapp
- Export QuickApp to .fqa file format (open source or encrypted)import_quickapp
- Import QuickApp from .fqa/.fqax file (requires file upload)
get_plugins
- Get all available plugins including installed and available pluginsget_installed_plugins
- Get list of installed plugins on the systemget_plugin_types
- Get information about all plugin types with categoriesget_plugin_view
- Get plugin view/configuration interface for devicesupdate_plugin_view
- Update plugin view component propertiescall_ui_event
- Trigger UI events on plugin interface elementscreate_child_device
- Create child devices for plugins (multi-channel devices)manage_plugin_interfaces
- Add or remove interfaces from devicesrestart_plugin
- Restart plugins/devicesupdate_device_property
- Update device property values directlypublish_plugin_event
- Publish various system events through plugin systemget_ip_cameras
- Get available IP camera types for installationinstall_plugin
- Install plugins by typedelete_plugin
- Delete/uninstall plugins by type
Each tool includes comprehensive input validation, error handling, and detailed response data to help AI assistants understand and work with your Fibaro HC3 system effectively.
# Clone the repository
git clone <repository-url>
cd hc3-mcp-server
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Package the extension
npm run package
- Open the project in VS Code
- Press
F5
to run the Extension Development Host - Test the extension in the new VS Code window
# Run tests
npm test
# Run with coverage
npm run test:coverage
- Local Network: This extension communicates with your HC3 system over your local network
- Credentials: Passwords are stored in VS Code's secure credential store
- API Access: The extension uses HC3's REST API with standard HTTP Basic Authentication
- No Cloud: All communication is direct between VS Code and your HC3 system
- Verify HC3 System: Ensure your HC3 is powered on and accessible on the network
- Check Network Settings: Verify IP address, port, and network connectivity
- Test Credentials: Ensure username/password are correct and user has API access
- Test Connection: Use the "HC3 MCP: Test Fibaro HC3 Connection" command to verify settings
- VS Code Settings: Check that all required fields are filled in VS Code settings
- Environment Variables: If using ~/.env, ensure the file exists and has correct format:
HC3_URL=http://192.168.1.57 HC3_USER=admin HC3_PASSWORD=your_password
- File Permissions: Ensure ~/.env file is readable
- Restart Required: Restart VS Code after changing ~/.env file
- Check Extension Activation: Verify the extension is enabled and activated
- Check Output Panel: Look for error messages in VS Code Developer Console
- Verify MCP Registration: Ensure the MCP server appears in AI assistant settings
- Restart VS Code: Sometimes a restart resolves registration issues
- "Fibaro HC3 not configured": Configure settings or check ~/.env file
- "Connection refused": Check network connectivity and HC3 system status
- "Authentication failed": Verify username and password
- "HTTP 404": Check HC3 firmware version and API availability
- "Configuration incomplete": Ensure all required settings are provided
- IPv6 addresses are not yet supported
- HTTPS connections require additional configuration
- Some advanced device types may need specific action commands
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Initial release
- Basic MCP server integration
- Core HC3 device and scene management
- Configuration and testing commands
For issues and questions:
Enjoy controlling your smart home with AI assistance! 🏠🤖