Provides tools for version control operations including committing changes, viewing history, and rolling back to previous versions of Home Assistant configurations.
Enables control and management of Home Assistant through natural language, providing tools for managing entities, automations, scripts, input helpers, configuration files, and system operations like config validation and reloading.
MCP Home Assistant
Control your Home Assistant through natural language in Cursor AI ๐ ๐ค
MCP (Model Context Protocol) server that enables Cursor AI to interact with Home Assistant through the HA Cursor Agent.
๐ฏ What can you do?
Talk to Cursor AI in natural language to control your smart home:
๐ฌ "Show me all my lights"
๐ฌ "List my climate automations"
๐ฌ "What's the temperature in the bedroom?"
๐ฌ "Create a new automation"
๐ฌ "Show the agent logs"
Cursor AI will use this MCP server to communicate with your Home Assistant!
๐ Prerequisites
Before installing, you need:
Home Assistant running (any version)
HA Cursor Agent installed as add-on
Long-Lived Access Token from Home Assistant
Cursor AI editor installed
๐ Quick Start (5 minutes)
Step 1: Install HA Cursor Agent
Install the agent in your Home Assistant:
Go to Settings โ Add-ons โ Add-on Store
Click โฎ โ Repositories
Add:
https://github.com/Coolver/home-assistant-cursor-agentInstall HA Cursor Agent
Start the agent
Step 2: Get Access Token
In Home Assistant, click your Profile (bottom left)
Scroll to Long-Lived Access Tokens
Click CREATE TOKEN
Name it
Cursor AIand copy the token
Step 3: Install MCP Server
Or install globally:
Step 4: Configure Cursor
Add to your ~/.cursor/mcp.json:
Or if installed globally:
Step 5: Restart Cursor
Restart Cursor AI and start chatting!
๐ฌ Usage Examples
Once configured, just talk to Cursor AI:
๐ Query Information
๐ Check Status
๐ Read Configuration
๐ ๏ธ Manage Home Assistant
๐ง Configuration
Environment Variables
Variable | Description | Required | Default |
| URL of HA Cursor Agent | Yes |
|
| Long-Lived Access Token | Yes | - |
Custom Agent URL
If your agent runs on a different URL:
๐ ๏ธ Available Tools
The MCP server provides these tools to Cursor AI:
๐ Files
ha_read_file- Read configuration filesha_write_file- Write configuration filesha_list_files- List files in directoryha_delete_file- Delete files
๐ Entities
ha_list_entities- List all entities (with domain filter)ha_get_entity_state- Get specific entity state
๐ง Helpers
ha_list_helpers- List all input helpersha_create_helper- Create new input helperha_delete_helper- Delete helper
๐ค Automations
ha_list_automations- List all automationsha_create_automation- Create new automationha_delete_automation- Delete automation
๐ Scripts
ha_list_scripts- List all scriptsha_create_script- Create new scriptha_delete_script- Delete script
๐ System
ha_check_config- Check configuration validityha_reload_config- Reload configurationha_get_logs- Get agent logs
๐พ Backup
ha_git_commit- Commit changes to githa_git_history- View git historyha_git_rollback- Rollback to previous version
๐ Troubleshooting
"Invalid token" error
Check your token is correct in
mcp.jsonMake sure HA Cursor Agent is running
Verify agent is accessible:
curl http://homeassistant.local:8099/api/health
"Connection refused"
Check HA Cursor Agent is started in Home Assistant
Verify the URL in
HA_AGENT_URLMake sure port 8099 is not blocked by firewall
Check Agent Logs
Ask Cursor AI:
This will display what's happening in the agent.
๐ Security
โ All communication goes through HA Cursor Agent (port 8099)
โ Agent validates your token against Home Assistant
โ Agent uses internal SUPERVISOR_TOKEN for operations
โ Your token is stored only in local config file
โ ๏ธ Never commit
๐ค Related Projects
HA Cursor Agent - Home Assistant add-on (required)
Model Context Protocol - Protocol specification
๐ License
MIT ยฉ Vladimir Eremeev
๐ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
๐ฌ Support
๐ Issues: GitHub Issues
๐ก Discussions: GitHub Discussions
โญ Show your support
Give a โญ๏ธ if this project helped you control your smart home with AI!
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables natural language control of Home Assistant smart home devices through Cursor AI, supporting entity queries, automation management, configuration file editing, and system operations.