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
-
On macOS, install Node +
npx. -
Set up a Home Assistant Cursor Agent reachable at
http://<ha-agent-host>:<port>with a matchingHA_AGENT_KEY. -
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”. -
Add the MCP server in
~/.cursor/mcp.jsonas shown above (nameuser-home-assistant), restart Cursor. -
In Settings → Tools & MCP, open the Home Assistant server.
-
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. ListOfferingsalways fails withserver stored: false/No server info found.- No tools are visible in the MCP UI.
- MCP process appears to start and then Cursor logs
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) npxinstalled 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:
Connected to HA Cursor Agent v2.9.17
Config path: /config
Git enabled: true
MCP Home Assistant server runningThe HA agent log shows:
… - ha_cursor_agent - INFO -
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