[MCP] Lovable initialization fails with null error; support configurable OAuth callback
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- clojure
- Bereich
- authentication, backend, devtools
Rechercherichtung
Start with src/eca/modules/mcp.clj, especially discover-oauth-info and the exception handler at lines 981–985, then read src/eca/oauth.clj around the callback route. Identify and log the direct HTTPS failure safely, and trace how the redirect URI reaches authorization, callback handling, client metadata, and token exchange. Done means regression coverage for the confirmed discovery failure, null-message diagnostics, and both callback shapes with matching routes and token exchange.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
[MCP] Lovable initialization fails with null error; support configurable OAuth callback
Summary
With ECA 0.175.1, configuring only {"mcpServers":{"lovable":{"url":"https://mcp.lovable.dev"}}} causes Lovable to fail at startup:
ERROR [MCP] Unexpected error initializing MCP server lovable: null
The diagnostic does not identify the exception or its cause. Separately, after discovery is fixed, ECA's fixed OAuth redirect URI (http://localhost:<port>/auth/callback) is incompatible with the callback Lovable currently accepts for its documented public client (http://127.0.0.1:<port>/callback). These are two distinct problems; changing the redirect alone is not known to fix the startup error.
Reproduction and evidence
- Run the 0.175.1 binary with
eca server --config-file <isolated-config.json> --log-level debug. Set HOME, XDG_CONFIG_HOME, XDG_CACHE_HOME and XDG_DATA_HOME to empty temporary directories; put only the configuration above in the isolated file. Use no stored OAuth tokens, other servers, or user settings. - Over stdio, send a JSON-RPC
initializerequest withcapabilities: {}and then theinitializednotification (Content-Length framing). Wait for the asynchronous MCP initialization. - Observe the error above and a failed server. DEBUG did not show an MCP transport HTTP request before the error. The same error occurs with the public client ID configured as
clientId.
Further isolation: An isolated local HTTP mock/proxy responding to HEAD and POST with Lovable's 200 and 401 + WWW-Authenticate responses, then pointing discovery at Lovable's real protected-resource metadata, reaches ECA's Using Client ID Metadata Document log. Replaying the other origin response headers locally also reaches that log. An independent request to the remote origin returned HEAD 200 and unauthenticated POST ping 401. In contrast, a local 403/403 response takes ECA's ordinary initialization-failure branch, not this null error. This narrows the failure to ECA's direct interaction with the remote HTTPS origin before successful OAuth discovery, rather than the parsed Lovable metadata or a generic 403 response. The thrown exception class and exact root cause remain unconfirmed: the outer catch logs only .getMessage, and the test binary is a native build. Please identify the exception/stack and fix the underlying pre-discovery failure; it should not be attributed to the redirect mismatch without further evidence.
OAuth callback compatibility
In src/eca/modules/mcp.clj (0.175.1), discover-oauth-info constructs http://localhost:<port>/auth/callback (line 576). The callback server in src/eca/oauth.clj accepts only /auth/callback (near line 207), and the client metadata must also agree. Lovable's open lovablelabs/mcp#7 documents a distinct localhost token-exchange problem and an authorize-stage rejection for its pre-registered public client unless the host is the IP literal 127.0.0.1 and the path is exactly /callback. A preauthorization test with the documented public client ID accepted the latter shape (302 to login) and rejected localhost and /auth/callback (400); no end-to-end login was attempted here.
Please allow a per-server loopback redirect host/path choice, or a 127.0.0.1 + /callback option, while keeping the current default for other providers. The authorization redirect, the local callback route, and any published client metadata must agree; ensure token exchange sends the same URI. A configured clientId should remain usable with this option.
Diagnostics and tests
initialize-server! catches unexpected exceptions at src/eca/modules/mcp.clj:981-985 and logs only .getMessage, which is null for some exception types. Please include at least the exception class and a safe stack/cause in the server log; avoid logging tokens, authorization URLs with state, and response bodies containing credentials. Add regression coverage for the direct Lovable pre-discovery failure after its class is identified, both callback shapes with matching local route/token exchange, and the null-message logging path. This report does not propose changing the user's browser or appending /mcp to the endpoint.
- Vorherrschende Sprache
- Clojure
- Sterne
- 1k
- Forks
- 82
- Ø Merge
- 21 Std. 52 Min.
- Gemergte PRs (30 T.)
- 13
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus editor-code-assistant/eca
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
editor-code-assistant/eca#717 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Models doesn't work when fetchModels: false is usedEvtl. wieder frei @zikajk hat das vor 45 Tagen übernommen, und es ist kein Pull Request offen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
editor-code-assistant/eca#661 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
editor-code-assistant/eca#716 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add delete_file toolOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
editor-code-assistant/eca#708 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 1-2 Tage Anfängerfreundlichkeit 55/100
editor-code-assistant/eca#706 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in editor-code-assistant/eca
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
nextjournal/clerk#830 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
IOP tokens release blocker team qa team qa autotests WG adoption
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
penpot/penpot#13540 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
izhangzhihao/intellij-rainbow-brackets#2903 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100