mcp-server-home-assistant
A Model Context Protocol Server for Home Assistant
Overview
The mcp-server-home-assistant is a Model Context Protocol Server designed to integrate with Home Assistant to enhance home automation capabilities.
To use mcp-server-home-assistant, install the required custom component in your Home Assistant instance, create a Long Lived Access Token, and configure your local environment using the provided JSON example.
- Integration with Home Assistant using Model Context Protocol. - Real-time communication via WebSocket. - Detailed logging for monitoring server activity.
- Enabling smarter automation scenarios based on context-aware data.
- Interacting with Home Assistant devices using custom commands.
- Facilitating advanced home automation projects and setups.
Add to your AI client
Use these steps to connect mcp-server-home-assistant in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-server-home-assistant-allenporter": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-home-assistant-allenporter"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-server-home-assistant-allenporter": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-home-assistant-allenporter"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-server-home-assistant-allenporter": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-home-assistant-allenporter"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-server-home-assistant-allenporter": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-home-assistant-allenporter"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-server-home-assistant-allenporter": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-home-assistant-allenporter"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-server-home-assistant-allenporter": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-home-assistant-allenporter"
]
}
}
}FAQ
What is Model Context Protocol?
Model Context Protocol is a method for creating and managing contexts in home automation systems, enhancing the communication between devices and services.
Do I need any special prerequisites to use this project?
Yes, you need to have Home Assistant set up and be familiar with creating and configuring custom components.
Is there support for troubleshooting?
Yes, you can view logs in the specified directory to troubleshoot issues with the setup.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":143,"uuid":"2fd62b37-e820-4b76-9e0b-9f4e406ad244","name":"mcp-server-home-assistant","title":"mcp-server-home-assistant","description":"A Model Context Protocol Server for Home Assistant","avatar_url":"https://avatars.githubusercontent.com/u/6026418?v=4","created_at":"2024-12-13T09:01:26.133Z","updated_at":"2024-12-13T12:28:10.414Z","status":"created","author_name":"allenporter","author_avatar_url":"https://avatars.githubusercontent.com/u/6026418?v=4","tags":"home-assistant,model-context-protocol","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/allenporter/mcp-server-home-assistant","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"53\",\"license\":\"Apache-2.0 license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-02 14:04:37\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]