Install
$ agentstack add mcp-alexandresanlim-home-assistant-switch-mcp-server ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
🚀 Home Assistant MCP Server
A Model Context Protocol (MCP) server providing Home Assistant integration for controlling smart home devices and getting entity states. Use this server as a tool provider in your MCP-compatible clients (like Claude, Cursor, and others) to interact with your Home Assistant instance. This is an unofficial repository.
One of the main motivations for this MCP server is security and control. Instead of exposing your entire Home Assistant REST API (which includes hundreds of endpoints and full system access), this server provides a curated set of specific tools that you can safely share with AI assistants.
🏠 Home Assistant Switch Tool
Example Usage:
https://github.com/user-attachments/assets/e7061d6a-faac-4d62-8a73-1449e7d156af
🤖 What is MCP?
Model Context Protocol (MCP) is a standard for tool providers to communicate with AI clients via standard input/output. This server lets you plug Home Assistant tools into any MCP-compatible client.
⚡ Quick Start: Use in Your MCP Client
You can configure this server as a tool provider in your MCP Client such as Claude, Cursor, VsCode and others:
"home-assistant-mcp-server-switch-local": {
"command": "npx",
"args": [
"@sanlim/home-assistant-mcp-server"
],
"env": {
"HOME_ASSISTANT_URL": "your_host:8123",
"HOME_ASSISTANT_TOKEN": "your_long_lived_access_token_here"
}
}
🛠️ Using a Local Build
- Clone this repository:
git clone https://github.com/alexandresanlim/home-assistant-switch-mcp-server.git
- Install and build:
npm install
npm run build
npm run server
- Configure your MCP client:
"home-assistant-mcp-server-debug": {
"command": "node",
"args": [
"...replace_to_path_of_project/home-assistant-switch-mcp-server/build/main.js"
],
"env": {
"HOME_ASSISTANT_URL": "http:/localhost:8123",
"HOME_ASSISTANT_TOKEN": "your_long_lived_access_token_here"
}
}
The server will start and listen for MCP requests via standard input/output. 🎉
🔧 Configuration
Environment Variables
HOME_ASSISTANT_URL: Your Home Assistant instance URL (default:http://localhost:8123)HOME_ASSISTANT_TOKEN: Your Home Assistant Long-Lived Access Token
Getting a Home Assistant Token
- Log into your Home Assistant frontend
- Go to your profile:
http://YOUR_HA_URL/profile - Scroll down to "Long-Lived Access Tokens"
- Create a new token and copy it
📚 Reference & Troubleshooting
- Full API reference: Home Assistant REST API docs
- If you have issues, make sure your build is up to date and your MCP client is configured to use stdio.
- For questions or contributions, feel free to open an issue or pull request!
Made with ❤️ by a Home Assistant enthusiast. Enjoy!
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: alexandresanlim
- Source: alexandresanlim/home-assistant-switch-mcp-server
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.