Complete development toolkit for Home Assistant with 17 MCP tools for file access, template testing, entity management, and system information. Eliminates copy/paste friction with direct HA API integration.
This Kiro Power provides a comprehensive set of tools for Home Assistant development, enabling you to:
- Manage Configuration Files: Read, write, and list HA configuration files remotely
- Test Templates: Render and validate Jinja2 templates with entity checking
- Query Entity States: Get current and historical state data
- Call Services: Control devices and trigger automations
- Access System Information: View HA config, services, events, and diagnostics
- Debug Issues: Access logs, error logs, and logbook entries
- Develop Locally: Download files to your workspace, edit with your IDE, upload with validation
File Access Tools (6)
list_config_files- List configuration files in your HA instanceread_config_file- Read configuration file contentget_file_metadata- Get file metadata for version trackingbatch_get_metadata- Get metadata for multiple files efficientlywrite_config_file- Write configuration files with validationget_logs- Retrieve HA logs with filtering
Entity & State Tools (2)
get_states- Get current entity statesget_history- Get historical state data
Service & Control Tools (3)
call_service- Call Home Assistant servicesrender_template- Render Jinja2 templates with HA contextvalidate_template- Validate template syntax
System Information Tools (4)
get_config- Get HA configuration detailslist_events- List available event typeslist_services- List available services with schemasget_logbook- Get logbook entries
Configuration Tools (1)
check_config- Validate HA configuration
Diagnostics Tools (1)
get_error_log- Retrieve error logs
- Direct API Integration: No copy/paste needed - tools interact directly with your HA instance
- Version Tracking: Detect file conflicts before uploading changes
- YAML Validation: Automatic syntax validation before writing files
- Entity Validation: Check entity references in templates
- Local Development: Download files, edit locally, upload with safety checks
- Comprehensive Debugging: Access logs, errors, and state history
- Python 3.12+ installed on your system
- Running Home Assistant instance (local or remote)
- Long-lived access token from Home Assistant
- Kiro IDE installed
- Open Kiro IDE
- Open the Powers panel (Command Palette → "Kiro: Open Powers")
- Search for "Home Assistant Development"
- Click "Install"
You need to provide your Home Assistant URL and access token. There are two methods:
-
Create a long-lived access token in Home Assistant:
- Go to your HA profile (click your name in sidebar)
- Scroll to "Long-Lived Access Tokens"
- Click "Create Token"
- Name it (e.g., "Kiro MCP Server")
- Copy the token immediately
-
Add environment variables to your shell configuration (
~/.zshrcor~/.bashrc):export HA_URL="http://192.168.1.100:8123" export HA_TOKEN="your-long-lived-access-token-here"
-
Reload your shell:
source ~/.zshrc # or ~/.bashrc
-
Restart Kiro to pick up the environment variables
-
Create a long-lived access token (same as Method A, step 1)
-
Edit the MCP configuration:
- Open
~/.kiro/powers/installed/ha-development-power/mcp.json - Replace the variable references with your actual values:
{ "mcpServers": { "ha-dev-tools": { "command": "uvx", "args": ["--from", "ha-dev-tools-mcp", "ha-dev-tools-mcp"], "env": { "HA_URL": "http://192.168.1.100:8123", "HA_TOKEN": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } } } } - Open
-
Reconnect the MCP server in Kiro
The custom integration is required for file access tools. Without it, you'll still have access to 11 official HA API tools (templates, states, services, etc.).
-
Download the integration:
- Clone or download from: https://github.com/username/ha-dev-tools
-
Copy to Home Assistant:
cp -r custom_components/ha_dev_tools /path/to/homeassistant/custom_components/
-
Configure in
configuration.yaml:ha_dev_tools: security: allowed_paths: - /config/configuration.yaml - /config/automations.yaml - /config/scripts.yaml - /config/packages/* - /config/.storage/lovelace*
-
Restart Home Assistant
-
Activate the power in Kiro
-
Try a simple command:
Get the state of sun.sun -
Kiro will use the
get_statestool to query your HA instance
Test a Template:
Test this template: {{ states('sensor.temperature') | float + 5 }}
List Configuration Files:
List my Home Assistant configuration files
Read a Configuration File:
Show me my automations.yaml
Check Entity State:
What's the state of light.living_room?
Turn On a Light:
Turn on light.bedroom with brightness 200
This power should be used when working with Home Assistant files and entities. Key indicators:
- User mentions "Home Assistant", "HA", or "homeassistant"
- User references HA files (configuration.yaml, automations.yaml, etc.)
- User wants to test templates or check entity states
- User needs to debug automations or scripts
Use MCP tools from this power when:
- Working with HA configuration files
- Testing Jinja2 templates
- Querying entity states
- Calling HA services
- Accessing HA logs or diagnostics
Use local file tools when:
- User explicitly says "local" or "locally"
- Working with non-HA files (package.json, README.md, etc.)
- The file is not part of your HA instance
Workflow 1: Edit Configuration Locally
- Download file: "Download my automations.yaml"
- Edit locally in your IDE
- Upload with validation: "Upload my edited automations.yaml"
- Verify: "Check my Home Assistant configuration"
Workflow 2: Debug a Template
- Test template: "Test this template: {{ states('sensor.temp') }}"
- Check entity: "Get the state of sensor.temp"
- Fix and retest
Workflow 3: Investigate Errors
- Check errors: "Show me recent Home Assistant errors"
- Check logs: "Get logs with level ERROR"
- Check state history: "Get history for light.living_room"
This power includes comprehensive steering files with detailed workflows:
- getting-started.md - Setup and installation guide
- file-management.md - Working with configuration files
- local-development.md - Local workspace setup and workflows
- version-management.md - Version checking and conflict resolution
- workflow-patterns.md - Complete development workflow patterns
- template-testing.md - Template development and validation
- debugging.md - Troubleshooting automations and scripts
- MCP Server: ha-dev-tools-mcp - The Python package that provides the MCP tools
- HA Integration: ha-dev-tools - The custom integration for file access
Check environment variables:
echo $HA_URL
echo $HA_TOKENIf empty, set them and restart Kiro.
Verify HA is accessible:
curl -H "Authorization: Bearer $HA_TOKEN" $HA_URL/api/Should return JSON with "message": "API running."
Check custom integration:
- Verify integration is installed in
custom_components/ha_dev_tools/ - Check
allowed_pathsinconfiguration.yaml - Restart Home Assistant
Use validation first:
Validate this template: {{ states('sensor.temp') }}
Check for syntax errors before rendering.
- Only admin users can access the API
- Files must be explicitly allowed in
allowed_paths - Sensitive files are automatically blocked
- Write operations include automatic YAML validation
- Rate limiting prevents abuse
- Use environment variables for tokens (don't commit to git)
- Limit
allowed_pathsto only necessary files - Use
expected_hashparameter when uploading to prevent conflicts - Always validate configuration after making changes
- Keep your access token secure
- Check the steering files for detailed workflows
- Review the troubleshooting section above
- Check Home Assistant logs for integration errors
- Verify environment variables are set correctly
- Test with simple commands first
If you encounter issues:
- Check the MCP server logs
- Check Home Assistant logs
- Verify your configuration
- Report issues to the appropriate repository:
- Power issues: This repository
- MCP server issues: ha-dev-tools-mcp
- Integration issues: ha-dev-tools
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT License - See LICENSE for details.
Built for the Kiro IDE ecosystem to enhance Home Assistant development workflows.