anthropics / anthropics/claude-ai-mcp
Bug: Custom Connector OAuth-Flow löst relative Discovery-URLs nicht korrekt auf
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 471
- Fork
- 77
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### MCP server URL or name
https://:8443/api/mcp
### How are you connecting to this server?
From a custom connector URL I entered manually
### Where does the issue occur?
When pressing the Connect button
### When did you last reproduce this?
2026-07-28
### Browser and OS
_No response_
### Describe the issue
**Bug: Custom Connector OAuth-Flow löst relative Discovery-URLs nicht korrekt auf**
Beim Verbinden eines Custom Connectors zu einem selbst gehosteten Home-Assistant-MCP-Server (offizielle „Model Context Protocol Server"-Integration) schlägt die Verbindung mit **„404: Not Found"** fehl.
**Setup:**
- MCP-Server-URL: `https://:8443/api/mcp`
- OAuth Client ID (manuell gesetzt): `https://claude.ai`
- Client Secret: leer
**Was ich geprüft habe:**
- Discovery-Endpunkt `https://:8443/.well-known/oauth-authorization-server` antwortet korrekt mit HTTP 200 und folgendem JSON:
```json
{"authorization_endpoint":"/auth/authorize","token_endpoint":"/auth/token","revocation_endpoint":"/auth/revoke","client_id_metadata_document_supported":true,"response_types_supported":["code"],"service_documentation":"https://developers.home-assistant.io/docs/auth_api"}
```
- Die darin enthaltenen Endpunkte sind **relative Pfade** (z. B. `/auth/authorize`), keine absoluten URLs.
- Rufe ich `https://:8443/auth/authorize?...` **manuell** im Browser auf, erscheint korrekt die Home-Assistant-Login-Seite – der Endpunkt selbst funktioniert also einwandfrei.
- Beim Klick auf „Verbinden" im Claude-Connector kommt jedoch sofort „404: Not Found", ohne dass die HA-Login-Seite angezeigt wird.
**Vermutete Ursache:** Der Connector scheint die relativen Pfade aus der Discovery-Antwort nicht korrekt zur vollständigen URL (Origin + Pfad) aufzulösen und ruft dadurch eine falsche/unvollständige URL auf.
**Erwartetes Verhalten:** Der Connector sollte relative Pfade aus der `/.well-known/oauth-authorization-server`-Antwort relativ zum Origin der Discovery-URL auflösen (gemäß RFC 8414), auch wenn der Server sie nicht als absolute URLs zurückgibt.
### Error details
```shell
-
```
### Expected behavior
-
### Additional context
_No response_
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start at the Connect flow and the OAuth authorization-server discovery response at /.well-known/oauth-authorization-server; reproduce against the supplied MCP URL and inspect how authorization_endpoint, token_endpoint, and revocation_endpoint are resolved. Done means relative paths resolve against the discovery origin and Connect reaches the Home Assistant login page without a 404.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- api, authentication
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100