vegarwaage/homeassistant-mcp-http
If you are the rightful owner of homeassistant-mcp-http 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.
The Home Assistant MCP HTTP Server is an add-on that integrates Model Context Protocol (MCP) with Home Assistant, enabling control and monitoring through Claude iOS and web access.
Home Assistant MCP HTTP Server
HTTP-based MCP server addon for Home Assistant with OAuth authentication.
Enables Claude iOS and web apps to access your Home Assistant instance via the Model Context Protocol.
Features
- 17 MCP tools for controlling and monitoring Home Assistant
- OAuth 2.0 authentication using Home Assistant accounts
- Respects Home Assistant user permissions
- Encrypted session storage
- Automatic token refresh
- Works via Home Assistant ingress (no port forwarding needed)
Installation
-
Add this repository to Home Assistant:
- Settings → Add-ons → Add-on Store → ⋮ → Repositories
- Add:
https://github.com/vegarwaage/homeassistant-mcp-server
-
Install "Home Assistant MCP HTTP Server"
-
Configure your DuckDNS URL:
- Go to addon Configuration tab
- Set
oauth_client_urlto your DuckDNS URL (e.g.,https://yourname.duckdns.org)
-
Start the addon
Configuration
oauth_client_url: "https://yourname.duckdns.org"
Important: You must have DuckDNS or another external URL configured for this to work.
Usage with Claude
Claude iOS/Web
-
Go to https://claude.ai → Settings → Connectors → Add Custom Connector
-
Enter:
- Name:
Home Assistant - URL:
https://yourname.duckdns.org/homeassistant_mcp_http(ingress URL)
- Name:
-
Use a tool in Claude (e.g., "List my automations")
-
Click "Authorize" when prompted
-
Log in with your Home Assistant credentials
Available Tools
States & Control:
ha_get_states- Query entity statesha_get_history- Historical dataha_call_service- Control devicesha_get_entity_details- Entity details
Configuration:
ha_read_config- Read config filesha_write_config- Write config files (with backup)ha_list_files- Browse filesha_validate_config- Validate changesha_reload_config- Reload configsha_list_backups- View backups
Automations:
ha_create_automation- Create automationha_update_automation- Update automationha_delete_automation- Delete automationha_list_automations- List automations
System:
ha_system_info- System infoha_get_logs- Fetch logsha_restart- Restart HA
Security
- OAuth tokens encrypted at rest (AES-256-GCM)
- Sessions expire automatically
- Respects Home Assistant user permissions
- All communication via HTTPS (HA ingress)
Troubleshooting
"oauth_client_url not configured" error:
- Go to addon Configuration tab
- Set your DuckDNS URL
- Restart addon
"Authentication failed" error:
- Verify DuckDNS URL is correct and accessible
- Check Home Assistant is accessible from internet
- Try logging out and back in
Tool execution fails:
- Check Home Assistant logs
- Verify user has permission for the action
- Check token hasn't expired
Development
Built with:
- TypeScript
- Express.js
- @modelcontextprotocol/sdk
- Home Assistant OAuth API
License
MIT