================== /// MCP /// /// MCP /// ================== [server:online] [protocol:ready]
mcp-server-home-assistant
by allenporter
A Model Context Protocol Server that connects to a Home Assistant instance via Web-Socket and exposes it through the Model Context Protocol.
57
7
SpecializedInstallation
1. Prerequisites
• Running Home Assistant instance (2023.12 or newer recommended)
• Python 3.11+ installed on the same host or virtual-env
• Long-lived Home Assistant access token that grants read access to the HA API
2. Clone the repository
git clone https://github.com/allenporter/mcp-server-home-assistant.git
cd mcp-server-home-assistant
3. Install Python dependencies (editable mode shown; omit -e for normal install)
python -m venv .venv && source .venv/bin/activate
pip install -U pip
pip install -e .
(If the package is published to PyPI you can instead do:
pip install mcp-server-home-assistant)
4. Configuration
Create a YAML (or .env) file called config.yaml in the project root:
home_assistant:
url: "http://YOUR_HA_HOST:8123"
token: "YOUR_LONG_LIVED_ACCESS_TOKEN"
server:
host: 0.0.0.0 # listen on all interfaces
port: 3000 # MCP default port
5. Run the server
python -m mcp_server_home_assistant --config config.yaml
The service will start an HTTP/WS listener on http://<host>:3000 compliant with the Model Context Protocol.
6. (Optional) Docker
docker build -t mcp-ha .
docker run -d -p 3000:3000 -e HA_URL=http://your_ha:8123 -e HA_TOKEN=token mcp-ha
Documentation
License: Apache License 2.0
Updated 7/30/2025