I have installed the MCP_Server integration in my HA test environment and following the detailed instructions by its author.
Whatever I try, I cannot get Claude or Cursor to connect to the MCP_Server. I have checked, double-checked and tripple-checked the json config files but no luck.
Using curl, I CAN connect. Using Postman, I can also connect. So my prelim conclusion is that my server is configured ok, my long-lived security token is ok
I cannot find any logging in Cursor, just the red dot in my MCP config section.
Claude says “Could not attach to MCP server Home Assistant” (as per the documentation, that would mean it can actually find my mcp-proxy, but mcp_proxy does not call the MCP server properly). In Claude logging, I see this:
2025-04-06T21:32:39.111Z [Home Assistant] [info] Initializing server...
2025-04-06T21:32:39.185Z [Home Assistant] [info] Server started and connected successfully
2025-04-06T21:32:39.186Z [Home Assistant] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
could not start the proxy Error: spawn http://192.168.[xxx].[yyy]:8123/mcp_server/sse ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn http://192.168.[xxx].[yyy]:8123/mcp_server/sse',
path: 'http://192.168.[xxx].[yyy]:8123/mcp_server/sse',
spawnargs: []
}
For Claude:
When I follow the configuration as per the documentation, I get the following error:
2025-04-06T20:30:36.737Z [Home Assistant] [info] Initializing server...
2025-04-06T20:30:36.817Z [Home Assistant] [info] Server started and connected successfully
2025-04-06T20:30:37.089Z [Home Assistant] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
mcp-proxy <command> [args...]
Run a command with MCP arguments
Positionals:
command The command to run [string]
args The arguments to pass to the command [string]
Options:
--version Show version number [boolean]
--debug Enable debug logging [boolean] [default: false]
--endpoint The endpoint to listen on for SSE [string] [default: "/sse"]
--port The port to listen on for SSE [number] [default: 8080]
--help Show help [boolean]
Not enough non-option arguments: got 0, need at least 1
When I then change it and give the (apparently missing for mcp-proxy) URL as an argument:
Turns out that I picked up “another” mcp-proxy from somewhere, which was causing the issue.
After removing the incorrect “mcp-proxy”, installed “uv” on my Mac and the installing the mcp-proxy as per the mcp-proxy documentation (at the time of this writing: “uv tool install mcp-proxy”), I could connect to Cursor to my HA server’s MCP Server.
Still working out why Claude does not want to connect yet. Once I’ve resolved that, I’ll post it here in case anyone ever runs into this later.
Many thanks for your efforts into getting this mcp-server integrated into HA, Allen. Much appreciated!