custom-component

custom-component is an agent for coding agents from homeassistant-ai/ha-mcp. It costs 0 tokens per session (1,165 once invoked), scanned A, original, MIT.

A repository guide for developing a Home Assistant custom component and keeping it compatible with a separate server. A custom component is an add-on that extends Home Assistant, the open-source home-automation platform.

In plain words
What is it for?
Use it when changing the custom component, updating related server features, checking version parity, or preparing a component release.
Why use it?
It documents versioning and compatibility rules that prevent the component and server from getting out of sync.

Agent

About the project

ha-mcp is an unofficial Model Context Protocol server that lets AI assistants interact with Home Assistant, including controlling devices, checking states, running services, and managing automations. Home Assistant users can connect it through the HA-MCP custom component or another supported setup. The catalogue entries are skills, agents, instructions, settings, and an MCP configuration for working with it.

homeassistant-ai/ha-mcp · 4,623 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/homeassistant-ai/ha-mcp/custom-component
Clone the repo
git clone --depth 1 https://github.com/homeassistant-ai/ha-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for custom-component

README.md
[![agentmods](https://agentmods.dev/badge/agents/homeassistant-ai/ha-mcp/custom-component.svg)](https://agentmods.dev/agents/homeassistant-ai/ha-mcp/custom-component)
Your own site
<a href="https://agentmods.dev/agents/homeassistant-ai/ha-mcp/custom-component"><img src="https://agentmods.dev/badge/agents/homeassistant-ai/ha-mcp/custom-component.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01165
Opus 5 $0.00000 $0.00583
Sonnet 5 $0.00000 $0.00233
Haiku 4.5 $0.00000 $0.00117

Measured 3d ago against content hash 23236ef496cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

custom-component scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/custom-component.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Custom component development

Read this document before changing custom_components/ha_mcp_tools/ or a server feature that depends on the component. The HACS component and the ha-mcp server ship through separate installation paths, so compatibility must hold in both update directions.

Version cycle

The component version in manifest.json and COMPONENT_VERSION in const.py must stay identical. The version rides the stable release cycle; do not bump it once per pull request or push. test_manifest_version_parity in tests/src/unit/test_component_ws_search.py enforces the lockstep.

Compare master with the last stable release:

git show stable:custom_components/ha_mcp_tools/const.py \
  | grep COMPONENT_VERSION

Apply these rules:

  • If master is level with stable, bump once—patch by default—to open the pending version.
  • If master already leads stable, do not bump; the change rides in that pending version.
  • Raise an existing pending version only to escalate the required bump level, such as patch to minor. Do not create never-shipped intermediate versions.
  • The PR Component Version Gate requires a changed component to lead the mirror's released stable version. The mirror release workflow separately rejects content drift under an already-tagged component version. In the PR gate, equal means a bump is needed to open the pending version; behind means a stale tree or bad merge resurrected an older version.

The mirror drift check prevents changes from being stranded under a version that already shipped and therefore has no new installable release. The gap it catches is a pull request opened while a version was pending but merged after that version became stable: no PR check reruns at merge time, so only the mirror can detect that the already-tagged content changed.

One exception overrides the shared pending-version rule: if a change adds a component service or argument that the server depends on, open a fresh pending component version even when one already exists, then raise MIN_COMPONENT_VERSION in src/ha_mcp/tools/tools_filesystem.py to that same version. The floor must identify only builds that contain the capability. Never use a released or previously opened pending version that also exists without the new behavior; callers on that build would pass the gate and then hit a raw missing-service failure. get_caller_token reports the component manifest version used by this gate. The issue #1946 failure is the precedent: the floor was set to an already shipped 1.1.0, so builds reporting 1.1.0 existed both with and without the required behavior and the gate could not distinguish them.

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 116 lines · 0 tokens per session scan A 23236ef496cc

Subscribe to this mod's changes

custom-component is an agent published in the GitHub repository homeassistant-ai/ha-mcp (4,623 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,165 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-02.

Related

Other agents, from other repositories

network-architect

Designs enterprise or multi-site network architecture from requirements, using existing network skills for focused routing, validation, automation, and troubleshooting detail.

affaan-m/ECC · 31 tokens

network-config-reviewer

Reviews router and switch configurations for security, correctness, stale references, risky change-window commands, and missing operational guardrails.

affaan-m/ECC · 29 tokens

network-troubleshooter

Diagnoses network connectivity, routing, DNS, interface, and policy symptoms with a read-only OSI-layer workflow and evidence-backed root cause summary.

affaan-m/ECC · 34 tokens

agent_types

This document describes how the unified three-layer Device Agent architecture is implemented across different platforms. While the core framework (State, Processor, Command layers) remains consistent, each platform implements specialized agents optimized for their native control mechanisms and hierarchies.…

microsoft/UFO · 0 tokens

server_client_architecture

Device agents in UFO are partitioned into server and client components, separating high-level orchestration from low-level execution. This architecture enables safe, scalable, and flexible task execution across heterogeneous devices through the Agent Interaction Protocol (AIP).

microsoft/UFO · 0 tokens

brain-computer-interface-engineer

Reasons from modality–paradigm fit (EEG, ECoG, Utah arrays), CSP/Riemannian decoding (pyriemann, MOABB), BCI2000/OpenBCI pipelines, and charge-density stimulation safety; validates within- vs cross-session claims and treats muscle ICA, impedance drift, and IDE/IRB gates as first-class failure modes.

K-Dense-AI/scientific-agents · 82 tokens