Home Assistant Automation MCP Server

Home Assistant Automation MCP Server

Enables creation, editing, listing, and management of Home Assistant automations through the REST API, extending basic device control with full automation CRUD operations.

Category
Visit Server

README

Home Assistant Automation MCP Server

This is a custom MCP (Model Context Protocol) server that extends Home Assistant capabilities to support creating, editing, and listing automations.

Overview

The existing Home Assistant MCP server provides device control but doesn't support automation management. This server wraps Home Assistant's REST API to provide automation CRUD operations.

Architecture

┌─────────────────┐
│   Cursor/IDE    │
│   (MCP Client)  │
└────────┬────────┘
         │ MCP Protocol
         │
┌────────▼─────────────────────────┐
│  Custom HA Automation MCP Server  │
│  (Python - this project)          │
└────────┬─────────────────────────┘
         │ HTTP REST API
         │
┌────────▼────────┐
│ Home Assistant   │
│ REST API        │
│ /api/automation │
└─────────────────┘

Home Assistant REST API Endpoints

Home Assistant provides these automation endpoints:

  • GET /api/automation - List all automations
  • GET /api/automation/{automation_id} - Get specific automation
  • POST /api/automation - Create new automation
  • PUT /api/automation/{automation_id} - Update automation
  • DELETE /api/automation/{automation_id} - Delete automation
  • POST /api/automation/{automation_id}/trigger - Trigger automation manually

Implementation Options

Option 1: Extend Existing MCP Server (Recommended)

If you have access to the Home Assistant MCP server source code, add new tools directly.

Option 2: Create Standalone MCP Server (This Implementation)

Create a separate MCP server that only handles automations, running alongside the existing HA MCP server.

Option 3: Fork and Extend

Fork the existing Home Assistant MCP server and add automation tools.

Prerequisites

  • Python 3.10+
  • Home Assistant instance with REST API enabled
  • Long-lived access token from Home Assistant
  • MCP SDK (for Python)

Setup Instructions

  1. Install dependencies:
pip install mcp aiohttp python-dotenv
  1. Configure environment variables:
export HA_URL="http://homeassistant.local:8123"
export HA_TOKEN="your_long_lived_access_token"
  1. Run the MCP server:
python mcp_ha_automations/server.py
  1. Configure Cursor to use this MCP server (add to Cursor settings)

MCP Tools Provided

  1. list_automations - List all automations
  2. get_automation - Get details of a specific automation
  3. create_automation - Create a new automation from YAML
  4. update_automation - Update an existing automation
  5. delete_automation - Delete an automation
  6. trigger_automation - Manually trigger an automation
  7. enable_automation - Enable an automation
  8. disable_automation - Disable an automation

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured