CanopiiCanopiiAll serversEnterprise →

ha-mcp MCP Server Security Report

io.github.homeassistant-ai/ha-mcp

Comprehensive Model Context Protocol server for managing Home Assistant through AI assistants.

Security Trust Score
Grade F · Serious issues
Tier 1 · Public sourceHigh confidence · 92%latest v8.3.0 Repository Publisher-verified
Declared MCP capabilities
ResourcesPrompts

Run it securely

This server scored F. Run it behind runtime policy enforcement so one bad tool call can't become an incident.

Are you the maintainer?

Verify with GitHub to get alerted whenever homeassistant-ai/ha-mcp changes score — and claim the badge for your README.

Claim this server
2 issues capping this score
  • criticalNo command-injection sinks1 occurrence
  • criticalNo dynamic code execution1 occurrence

The short answer

Is ha-mcp safe to use?
ha-mcp scores 14/100 (grade F) on the Canopii Trust Index, and carries 2 confirmed security failures that cap its score: No command-injection sinks and No dynamic code execution. It passes 14 of the 25 controls that apply to it.
What security issues does ha-mcp have?
ha-mcp fails 2 controls: No command-injection sinks and No dynamic code execution. Each failure on this page carries the evidence behind it — the file and line, dependency, or CVE that decided it.
How reliable is the security score for ha-mcp?
We could evaluate 92% of the controls that apply to ha-mcp. Scores are deterministic — the same source always produces the same score — and a partially-scannable server cannot present a high one, because confidence caps the result. The scanner is open source, so this score can be reproduced independently.
How was ha-mcp scored?
Its published source was scanned against a fixed catalog of weighted security controls covering code safety, committed secrets, dependency vulnerabilities, tool-description integrity, authentication and transport, and maintenance. A confirmed flaw caps the score outright regardless of what else passes. The full rubric is published.
Reputation4.4kstars191forks5open issues9d agolast commit<1yage

Security controlslatest scored version v8.3.0

Each control is evaluated deterministically with evidence. The score is earned from passing controls; a failed guard caps it.

Model–MCP Runtime Guardrails

  • Warn
    Strict JSON Schema Enforcementschemas not strict

    Tool inputs are constrained (additionalProperties:false), so unexpected arguments can't be smuggled in.

    Fix: Set additionalProperties:false and require explicit parameters on every tool.

  • Pass
    Indirect Prompt Injection (IPI) Defensesguardno injection markers

    Tool/prompt/resource text is free of hidden instructions that could hijack the agent.

  • Pass
    Tool Definition Integrityguardtool definitions stable; no risky changes in version history

    Every consecutive version pair is diffed for new injection markers or destructive scope — a risky diff anywhere in history is a rug-pull (fail, durable); benign description drift warns.

  • Pass
    User-in-the-Loop / Approval Scopeguardno destructive tool scope

    No over-broad or destructive tools (arbitrary shell, bulk-delete) that warrant human approval.

Application Security Checks

  • Fail
    No command-injection sinksguard1 occurrence

    Untrusted tool input reaching a shell yields remote code execution. How many servers fail this?

    src/ha_mcp/_vendor/websockets/cli.py:214

    Fix: Never pass tool arguments to a shell; use argv arrays with shell disabled.

  • Fail
    No dynamic code executionguard1 occurrence

    eval()/exec()/Function() on tool-derived strings allows arbitrary code execution. How many servers fail this?

    src/ha_mcp/utils/python_sandbox.py:386

    Fix: Remove eval/exec; parse and dispatch explicitly.

  • Warn
    No path traversalguard6 occurrences

    Naive path checks let tools read/write outside intended directories (EscapeRoute-class).

    src/ha_mcp/settings_ui/settings.js:120src/ha_mcp/settings_ui/settings.js:1798src/ha_mcp/settings_ui/settings.js:1798src/ha_mcp/settings_ui/settings.js:1798

    Fix: Resolve to a canonical path and verify containment; reject ../ and symlinks.

  • Warn
    No SSRF sinksguard30 occurrences

    Fetching tool-supplied URLs can pivot into internal networks and metadata services.

    homeassistant-addon-webhook-proxy-dev/start.py:208homeassistant-addon-webhook-proxy-dev/start.py:238homeassistant-addon-webhook-proxy-dev/start.py:269homeassistant-addon-webhook-proxy-dev/start.py:306

    Fix: Allow-list destinations; reject arbitrary/loopback/link-local URLs.

  • Warn
    No known-vulnerable dependencies1 of 364 runtime deps vulnerable; worst high

    Runtime dependencies (parsed from the lockfile) are scanned against OSV.dev for published CVEs. Advisory: flagged dependencies lower the score but don't hard-cap it, since transitive reachability is unproven.

    [email protected] — GHSA-2v37-7h3g-55p8

    Fix: Upgrade the flagged dependencies past their fixed versions.

  • Warn
    Established maintainerrecently published

    Brand-new / single anonymous maintainers raise takeover and malware risk.

    Fix: Publish under an established account/org; add multiple maintainers.

  • Pass
    No unsafe deserializationguardno sinks found

    pickle/yaml.load/etc. on untrusted data can execute code.

  • Pass
    No committed secretsguardno secrets found

    Hardcoded keys/tokens in published source are live credentials an attacker can use.

  • Pass
    Credentials sourced from environmentreads credentials from environment

    Reading secrets from env/secret stores avoids hardcoding them.

  • Pass
    Dependencies pinned (lockfile)lockfile present

    A lockfile makes installs reproducible and resistant to silent dependency swaps.

  • Pass
    Package name not typosquattingguarddistinct package name

    Names mimicking popular packages are a common malware delivery vector.

  • Pass
    Actively maintainedrecent commits

    Unmaintained servers don't receive security fixes.

  • Pass
    Repository not archivedguardactive

    Archived repositories will never be patched.

  • Pass
    Declares a licenseMIT

    A clear license is required for legal enterprise use.

  • Pass
    Has a security policySECURITY.md present

    A SECURITY.md gives a private path to report vulnerabilities.

  • Pass
    Adoption & popularityestablished adoption

    A small, capped nudge from stars/downloads — widely-used servers get more eyes on bugs. It can never offset a real security failure.

  • Not checked
    No install/post-install scriptsguardnot determinable from PyPI metadata

    install hooks run arbitrary code on every consumer at install time.

  • Not checked
    Published with provenancenot determinable

    Build provenance attests the artifact was built from the claimed source by CI.

  • Not checked
    Signed releasesnot evaluated

    Signed releases let consumers verify artifacts weren't tampered with.

Transport & Trust Model

  • Warn
    Network Exposurebinds 0.0.0.0

    Binding 0.0.0.0 or exposing debug inspectors widens the attack surface.

    Fix: Bind to 127.0.0.1 by default; never ship open debug endpoints.

  • Pass
    Execution Sandboxingcontainerized

    A container/sandbox image limits blast radius; a server that runs natively has full host access.

  • N/A
    Transport Encryption (TLS)guardno remote endpoints

    Plaintext HTTP exposes traffic and bearer tokens to interception.

  • N/A
    IAM / Authentication Scopingno remote endpoints

    OAuth 2.1 / Protected Resource Metadata gates who can invoke tools.

  • N/A
    Live Endpoint Reachablenot dynamically scanned

    A dynamic scan connected to the declared remote endpoint and it responded — verified live, not a dead URL.

  • N/A
    Authentication Enforced (live)not dynamically scanned

    If the server declares auth is required, it must actually reject anonymous clients. Serving tools to unauthenticated callers is a real exposure.

Embed this score

Add the live badge to your README — it updates automatically on every rescan.

Canopii Trust Score badge preview
markdown[![Canopii Trust Score](https://index.canopii.dev/api/badge/io.github.homeassistant-ai/ha-mcp)](https://index.canopii.dev/server/io.github.homeassistant-ai/ha-mcp)
html<a href="https://index.canopii.dev/server/io.github.homeassistant-ai/ha-mcp"><img src="https://index.canopii.dev/api/badge/io.github.homeassistant-ai/ha-mcp" alt="Canopii Trust Score" /></a>

Versions

VersionScoreStatus
v8.3.0latest14Fscored
v8.2.014Fscored
v8.1.114Fscored
v8.1.014Fscored
v8.0.014Fscored
v7.14.214Fscored
v7.14.114Fscored
v7.13.014Fscored
v7.12.114Fscored
v7.12.014Fscored
v7.11.014Fscored
v7.10.014Fscored
v7.9.014Fscored
v7.8.114Fscored
v7.8.014Fscored

Wondering how this compares? The MCP Security Index tracks grade distribution, committed secrets, and missing authentication across the whole ecosystem, refreshed monthly.

ha-mcp MCP Server Security — Score 14/100, Grade F · Canopii Trust Index