MCP add-on: Claude.ai and ChatGPT OAuth login fails with unauthorized_client since 5.2.2 (still on 5.2.3)

Since openHAB 5.2.2 I can no longer connect external AI clients to the openHAB MCP server via the openHAB Cloud. The main UI login at myopenhab.org works again with 5.2.3, but the OAuth flow of the clients still fails.

Setup: openHAB 5.2.3 (Docker, TrueNAS SCALE), MCP Server add-on, openHAB Cloud connector online, connector URL on connect.myopenhab.org.

What happens: Adding the server as a custom connector in Claude.ai redirects to openHAB Cloud - Log in … and returns only “unauthorized_client”. A user in the 5.2.2 thread ( Openhab 5.2.2 -> https://myopenhab.org/ -> unauthorized_client (While trying to login in Openhab Cloud) ) reports the same with ChatGPT on 5.2.3. It worked before 5.2.2.

Questions:

  1. Is the rejection of a cross-origin redirect_uri an intended part of the 5.2.2 security changes?
  2. If yes, is there a setting to allow trusted redirect URIs for external clients (Claude, ChatGPT)?
  3. Is a fix planned? Does openHAB Cloud forward X-Forwarded-Proto / X-Forwarded-Host, which another user needed on his own proxy?

Screenshot of the error and URL attached.
grafik

@digitaldan

So i can reproduce this, just now seems to be broken for the MCP connection, I’ll look into today.

Uhg, this is not going to be a simple fix, i’ll have something, but is going to require changes to core and the MCP addon… stay tuned…

Thx for reporting: during my first attempt to connect claude to openHAB I yesterday tried for hours to get rid of “unauthorized_client” :sweat_smile:
openHAB 5.3.0.M3

PR for a fix

Thanks Dan. I’ve read the fix has been merged. However I haven’t seen an update available for my openHAB installatie (I’m on the stable version). Is there any guidance how to install this fixed version (Noob question probably)