Skip to main content

MCP server exposing Home Assistant REST API functionality

Project description

mcp-homeassistant

MCP server exposing Home Assistant 2026.4.1 REST API functionality.

PyPI Python Ruff

mcp-name: io.github.daedalus/mcp-homeassistant

Install

pip install mcp-homeassistant

Configuration

Set the following environment variables:

  • HA_URL: Home Assistant URL (default: http://localhost:8123)
  • HA_TOKEN: Long-Lived Access Token (required)

Usage

export HA_URL="http://homeassistant:8123"
export HA_TOKEN="your_long_lived_access_token"
mcp-homeassistant

Tools

The MCP server exposes the following tools:

  • get_api_status - Check if the API is running
  • get_config - Get HA configuration
  • get_components - List loaded components
  • get_events - List event types and listener counts
  • get_services - List available services by domain
  • get_states - Get all entity states
  • get_state - Get a specific entity state
  • set_state - Update or create an entity state
  • delete_state - Delete an entity state
  • fire_event - Fire a custom event
  • call_service - Call a Home Assistant service
  • render_template - Render a Jinja template
  • get_history - Get historical state changes
  • get_logbook - Get logbook entries
  • check_config - Validate configuration.yaml
  • handle_intent - Handle an intent
  • get_error_log - Get error log
  • get_calendars - List calendar entities
  • get_calendar_events - Get calendar events

Resources

  • homeassistant://config - Current config
  • homeassistant://states - All entity states
  • homeassistant://services - Available services
  • homeassistant://components - Loaded components

Development

git clone https://github.com/daedalus/mcp-homeassistant.git
cd mcp-homeassistant
pip install -e ".[test]"

# run tests
pytest

# format
ruff format src/ tests/

# lint
ruff check src/ tests/

# type check
mypy src/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_homeassistant-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_homeassistant-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_homeassistant-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_homeassistant-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_homeassistant-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42ab7f4ace22b871b15783cbd616ff9d71ba48f8e8af26097bf0c32b6d96e624
MD5 842c1173e92376d3d414d247e0a4808c
BLAKE2b-256 c6390a4fb6f3ad763091d11d6e8b7b85cd0b3f27a71c35d1c1ac8f8049e93e44

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_homeassistant-0.1.0.tar.gz:

Publisher: pypi-publish.yml on daedalus/mcp-homeassistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_homeassistant-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_homeassistant-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 192d64a6a625588b252c81480084be7456071d25c028547e78d479ed0d6060bc
MD5 3e3f0191b700480a81c7020943789f7d
BLAKE2b-256 9e978b8b77914fa4ebcc32dd32cbc42495d8d82a431dec6435e3bee40c06c93c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_homeassistant-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on daedalus/mcp-homeassistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page