Home assistant mcp integration

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

Custom MCP server for Home Assistant (@coolver/home-assistant-mcp) works correctly when run from the terminal with HA_AGENT_URL and HA_AGENT_KEY set, but fails to initialize in Cursor:

  • MCP panel is stuck on “Loading tools…”.
  • MCP log repeatedly shows “No server info found” and Client closed for command.
  • No tools are ever listed for the server.

This looks like a Cursor–MCP handshake / timeout issue on macOS rather than a config problem.

Steps to Reproduce

  1. On macOS, install Node + npx.

  2. Set up a Home Assistant Cursor Agent reachable at http://<ha-agent-host>:<port> with a matching HA_AGENT_KEY.

  3. Confirm the agent + MCP work from terminal:

    export HA_AGENT_URL=“http://:”
    export HA_AGENT_KEY=“”
    npx -y @coolver/home-assistant-mcp@latest
    → “Connected to HA Cursor Agent” + “MCP Home Assistant server running”.

  4. Add the MCP server in ~/.cursor/mcp.json as shown above (name user-home-assistant), restart Cursor.

  5. In Settings → Tools & MCP, open the Home Assistant server.

  6. Observe:

    • MCP panel says Loading tools… indefinitely.
    • No tools/resources are listed.
    • MCP logs show repeated No server info found / Client closed for command.

Expected Behavior

  • Expected: Cursor completes the MCP initialization, lists tools from @coolver/home-assistant-mcp, and allows interaction with Home Assistant.
  • Actual: MCP server is healthy when run via terminal, but in Cursor:
    • MCP process appears to start and then Cursor logs Client closed for command.
    • ListOfferings always fails with server stored: false / No server info found.
    • No tools are visible in the MCP UI.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

  • OS: macOS (Darwin 24.5.0, MacBook Air)
  • Cursor version: (fill in from Cursor → About)
  • Node.js: (version from node --version)
  • npx installed and working.

Additional Information

MCP server config (~/.cursor/mcp.json)

{
“mcpServers”: {
“GitKraken”: {
“command”: “/Users/…/gk”,
“type”: “stdio”,
“name”: “GitKraken”,
“args”: [
“mcp”,
“–host=cursor”,
“–source=gitlens”,
“–scheme=cursor”
],
“env”: {}
},
“user-home-assistant”: {
“command”: “npx”,
“args”: [
“-y”,
@coolver/home-assistant-mcp@latest”
],
“env”: {
“HA_AGENT_URL”: “http://:”,
“HA_AGENT_KEY”: “”
}
}
}
}> Note: I’ve also tried using home-assistant as the key; logs consistently refer to user-home-assistant.


Home Assistant agent status

When running the MCP server manually from the terminal with the same env vars, it works:

export HA_AGENT_URL=“http://:”
export HA_AGENT_KEY=“”

npx -y @coolver/home-assistant-mcp@latestOutput:

:white_check_mark: Connected to HA Cursor Agent v2.9.17
:file_folder: Config path: /config
:counterclockwise_arrows_button: Git enabled: true
:rocket: MCP Home Assistant server runningThe HA agent log shows:

… - ha_cursor_agent - INFO - :electric_plug: MCP Client connected: v3.2.6 from
INFO: : - “GET /api/health HTTP/1.1” 200 OKSo the agent + MCP npm package are healthy and connect fine outside Cursor.


Cursor MCP logs

From anysphere.cursor-mcp.MCP user-home-assistant after restarting Cursor and trying to use the server:

2025-12-01 14:30:23.722 [info] Handling DeleteClient action
2025-12-01 14:30:26.290 [info] Handling CreateClient action
2025-12-01 14:30:26.291 [info] Starting new stdio process with command: npx -y @coolver/home-assistant-mcp@latest
2025-12-01 14:31:25.568 [info] Handling ListOfferings action, server stored: false
2025-12-01 14:31:25.569 [error] No server info found
2025-12-01 14:31:26.293 [info] Client closed for command
2025-12-01 14:31:26.309 [info] Handling ListOfferings action, server stored: false
2025-12-01 14:31:26.310 [error] No server info found
2025-12-01 14:31:26.316 [info] Client closed for commandThis pattern repeats: Cursor starts the process, then later logs Client closed for command and server stored: false / No server info found. In the MCP UI, I see “Loading tools…” indefinitely and no tools are listed.


Wrapper script test (shows env is correct under Cursor)

To verify what Cursor actually runs, I pointed the MCP server to a wrapper:

#!/bin/zsh
{
echo “===== HA MCP START $(date) =====”
echo “ENV:”
env | grep ‘^HA_AGENT’ || echo “NO HA_AGENT VARS”
echo “RUN:”
npx -y @coolver/home-assistant-mcp@latest
echo “===== HA MCP END $(date) =====”
} >> /tmp/ha-mcp.log 2>&1When invoked, /tmp/ha-mcp.log shows:

===== HA MCP START Mon 1 Dec 2025 15:09:48 GMT =====
ENV:
HA_AGENT_URL=http://:
HA_AGENT_KEY=
RUN:
…So Cursor is passing the correct environment into the process, but from Cursor’s perspective it still never gets the expected server info / tool offerings.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. From the logs, Cursor launches the npx process but doesn’t get a response from the MCP server within ~60 seconds, then closes the client with “No server info found”.

The issue looks like a timeout in initializing the stdio connection between Cursor and @coolver/home-assistant-mcp - the server works in the terminal but doesn’t respond to the MCP protocol when launched from Cursor.

Could you please share:

  • Exact Cursor version from Help > About Cursor > Copy (the report says “fill in from Cursor → About”)
  • Result of the command npx -y @coolver/home-assistant-mcp@latest < /dev/null (to check if the server works correctly without stdin)
  • Try adding to mcp.json for user-home-assistant: "type": "stdio" (explicitly specify the transport type)

Possible solution:

  • Install the package globally: npm i -g @coolver/home-assistant-mcp
  • Update mcp.json: specify the absolute path to the installed binary in “command” (find it via npm list -g @coolver/home-assistant-mcp)
  • Check that the server sends JSON-RPC only to stdout, and logs to stderr (if logs go to stdout, it breaks the MCP protocol)

Share the details - if it doesn’t help, I’ll pass it to the team.

ersion: 2.1.46

VSCode Version: 1.105.1

Commit: ab326d0767c02fb9847b342c43ea58275c4b1680

Date: 2025-12-02T03:59:29.283Z (1 day ago)

Electron: 37.7.0

Chromium: 138.0.7204.251

Node.js: 22.20.0

V8: 13.8.258.32-electron.0

OS: Darwin arm64 24.5.0

npx -y @coolver/home-assistant-mcp@latest < /dev/null

:white_check_mark: Connected to HA Cursor Agent v2.9.17

:file_folder: Config path: /config

:counterclockwise_arrows_button: Git enabled: true

:rocket: MCP Home Assistant server running

I’ve added the explicit type, it didn’t change anything.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.