Cannot connect Claude or Cursor to HA MCP_Server

Hi all -

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: []
}

Any guidance?

Hi, please don’t ping folks directly.

This looks like the configuration for claude desktop is not matching the instructions.

Apologies. Wasn’t aware. Removed the ping.

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:

Claude:
{
  "mcpServers": {
    "Home Assistant": {
      "command": "mcp-proxy",
      "args": ["http://192.168.[xxx].[yyy]:8123/mcp_server/sse"],
      "env": {
        "API_ACCESS_TOKEN": "<my token>" 
      }
    }
  }
}

… the error as in my first post appears.

I also tried having the URL in both the “args” and the “SSE_URL” line, and also that gives the same error as in my first post.

The Cursor config is exactly as per the documentation. No green light…

Final bit of info: modelcontextprotocol/inspector runs fine, connects to my server and lists 6 HA tools.

I have found my issue…

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!

Ronald

1 Like