Server data from the Official MCP Registry
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
Remote endpoints: streamable-http: https://server.smithery.ai/@slhad/aha-mcp/mcp
Valid MCP server (3 strong, 1 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry.
4 files analyzed · No issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Available as Local & Remote
This plugin can run on your machine or connect to a hosted endpoint. during install.
From the project's GitHub README.
STDIO
Pretty useful to test it without IDE
This repository implements a Model Context Protocol (MCP) server for Home Assistant, providing a bridge between Home Assistant and MCP clients.
With this server, you can:
The server supports multiple transport methods:
While exploring existing MCP server implementations for Home Assistant, I found that:
This project aims to address these gaps by providing a reliable and fully functional MCP server with straightforward Docker support and a focus on real-world usability.
Special Mention: Most of the documentation in this project is generated or assisted by AI. As this is a side project (even though I work as a developer), I focus on building fun and working features, and prefer to review and accept generated documentation if it's good enough, rather than writing everything by hand.
This MCP server provides comprehensive tools for interacting with Home Assistant, including:
⚠️ TOKEN COST WARNING
Important: Each tool definition consumes tokens in your LLM context, even if unused! Some tools (like
update-lovelace-config) can cost 4,000+ tokens alone. Consider excluding unnecessary tools to minimize token consumption and maximize conversation efficiency.
For a complete list of all available tools with detailed descriptions and parameters, see the Tools Documentation.
The tools documentation is automatically generated from the MCP server:
npm run generate-docs
This command will:
tools.md)Note: The tools documentation shows the server currently provides 39 tools for comprehensive Home Assistant integration.
src/ - Main source code
hass/ - Home Assistant client and helpersserver/ - MCP server implementationsmcpTransports.ts - Transport layer implementations (HTTP, SSE)tests/ - Test files and Home Assistant config examplesscripts/ - Build and documentation generation scriptsDockerfile - Containerization supportpackage.json - Project dependencies and scriptstsconfig.json - TypeScript configurationvitest.config.ts - Vitest test runner configurationThe MCP server supports multiple transport methods. You can run it using the same command and argument structure as in your mcp_settings.json.
For traditional MCP client integration via stdio (server is launched by MCP client):
{
"type": "stdio",
"command": "tsx",
"args": [
"c:/dev/git/aha-mcp/src/index.ts"
],
"env": {
"LIMIT_RESOURCES": "-1",
"RESOURCES_TO_TOOLS": "true",
"DEBUG": "true",
"HASS_URL": "https://your-home-assistant.local:8123",
"HASS_ACCESS_TOKEN": "<your_token_here>"
}
}
For SSE-based MCP communication, you need to run the server separately and then configure the MCP client to connect via URL.
Step 1: Start the SSE server
# Start the server with SSE transport using npm script
HASS_URL=https://your-home-assistant.local:8123 HASS_ACCESS_TOKEN=<your_token_here> npm run start:local:sse
# Or with additional configuration
RESOURCES_TO_TOOLS=true DEBUG=true HASS_URL=https://your-home-assistant.local:8123 HASS_ACCESS_TOKEN=<your_token_here> npm run start:local:sse
Step 2: Configure MCP client to connect via URL
{
"url": "http://localhost:8081/sse",
"alwaysAllow": [
// your allowed tools here
]
}
For HTTP-based MCP communication, you need to run the server separately and then configure the MCP client to connect via URL.
Step 1: Start the HTTP server
# Start the server with streamable HTTP transport using npm script
HASS_URL=https://your-home-assistant.local:8123 HASS_ACCESS_TOKEN=<your_token_here> npm run start:local:http
Step 2: Configure MCP client to connect via URL
{
"url": "http://localhost:8081/mcp",
"alwaysAllow": [
// your allowed tools here
]
}
Start the SSE server directly with npm scripts:
# Set your Home Assistant credentials first
export HASS_URL=https://your-home-assistant.local:8123
export HASS_ACCESS_TOKEN=<your_token_here>
# Start SSE server with RESOURCES_TO_TOOLS enabled
RESOURCES_TO_TOOLS=true DEBUG=true npm run start:local:sse
Then configure your MCP client with:
{
"url": "http://localhost:3000/sse"
}
For STDIO transport with containers:
{
"type": "stdio",
"command": "podman",
"args": [
"run",
"-i",
"--rm",
"-e",
"HASS_URL=https://your-home-assistant.local:8123",
"-e",
"HASS_ACCESS_TOKEN=<your_token_here>",
"ghcr.io/slhad/aha-mcp:latest"
]
}
For HTTP/SSE transports, run the server separately in a container:
Step 1: Start the server container
# For SSE transport
podman run -p 8081:8081 -e HASS_URL=https://your-home-assistant.local:8123 -e HASS_ACCESS_TOKEN=<your_token_here> ghcr.io/slhad/aha-mcp -- sse
# For HTTP transport
podman run -p 8081:8081 -e HASS_URL=https://your-home-assistant.local:8123 -e HASS_ACCESS_TOKEN=<your_token_here> ghcr.io/slhad/aha-mcp -- http
Step 2: Configure MCP client
{
"url": "http://localhost:3000/sse", // for SSE
// or
"url": "http://localhost:3000/mcp" // for HTTP
}
Replace <your_token_here> with your actual Home Assistant access token.
The following environment variables can be set to configure the MCP server:
HASS_URL (required): The URL of your Home Assistant instance. Example: https://your-home-assistant.local:8123 (default in code: http://localhost:8123)HASS_ACCESS_TOKEN (required): Long-lived access token for Home Assistant. The server will not start without this.DEBUG: Set to true to enable debug logging. Default: false.RESOURCES_TO_TOOLS: Set to true to enable mapping resources to tools. Default: false.
LIMIT_RESOURCES: Set to a number to limit the number of resources returned by the server. Default: unlimited.Note: The server transport method is now controlled by command line arguments (sse or http) rather than environment variables.
npm install
For STDIO transport (launched by MCP client):
# Set environment variables and run with npm
npm start
For HTTP/SSE transports (run server separately):
# Run SSE server on port 8081
npm run start:local:sse
# Run HTTP server on port 8081:8081
npm run start:local:http
# Quick SSE server startup with environment variables
RESOURCES_TO_TOOLS=true DEBUG=true npm run start:local:sse
Then configure your MCP client to connect via URL:
"url": "http://localhost:3000/sse""url": "http://localhost:8080/mcp"npm run test:short
Note: The unit tests currently run against a real Home Assistant instance and are not mocked yet. This means tests require a live Home Assistant server and valid credentials to execute successfully.
Build and run the server in a Docker container:
# Build the container
npm run docker
then follow :
For HTTP/SSE modes, then configure your MCP client with the appropriate URL:
"url": "http://localhost:3000/sse""url": "http://localhost:8081/mcp"Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
See LICENSE for details.
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.