Install this extension from the VS Code Marketplace.
Set your Home Assistant URL in Settings → homeAssistantMcp.url (e.g., http://homeassistant.local:8123).
Set your access token by running the command "Home Assistant MCP: Set Access Token" from the Command Palette (Ctrl+Shift+P).
The MCP server will appear in Copilot Chat automatically. Ask Copilot to control your smart home!
Configuration
Setting
Description
Required
homeAssistantMcp.url
Home Assistant URL
Yes
homeAssistantMcp.ssh.host
SSH host for SFTP file operations
No
homeAssistantMcp.ssh.port
SSH port (default: 22)
No
homeAssistantMcp.ssh.user
SSH username
No
homeAssistantMcp.ssh.keyPath
Path to SSH private key file
No
Commands
Command
Description
Home Assistant MCP: Set Access Token
Securely store your HA Long-Lived Access Token
Home Assistant MCP: Delete Access Token
Remove the stored access token
Home Assistant MCP: Set SSH Password
Securely store your SSH password (for SFTP file operations)
How It Works
This extension is a thin wrapper that registers the @jarahkon/hass-mcp-server npm package as an MCP server via VS Code's mcpServerDefinitionProviders API. The actual MCP server runs as a child process using npx.
Sensitive credentials (access token, SSH password) are stored using VS Code's built-in SecretStorage API, ensuring they are encrypted at rest.