Root-caused the Windows connection failures from the client logs:
1. mcp-remote OAuth 404'd because the 401 from /mcp/ advertised only
`WWW-Authenticate: Bearer realm="FUSION MCP"` with no resource_metadata
pointer. Clients couldn't discover the auth server, so they guessed
wrong registration paths → 404. Now the 401 includes
resource_metadata="<base>/.well-known/oauth-protected-resource"
(derived from x-forwarded-* so it's correct on any deploy).
2. Newer clients try the path-aware well-known URL first
(/.well-known/oauth-protected-resource/mcp) which 404'd. Added that
variant plus /.well-known/oauth-authorization-server/mcp (and trailing
-slash forms) returning the same metadata.
3. mcp_proxy.py was silent on failure. Added stderr diagnostics (startup
banner, explicit 401/429/network messages, missing/malformed key
warning) that surface in Claude Desktop's MCP log — so the next setup
problem is self-explaining instead of a blank disconnect.
The pr…
feat: OAuth 2.0 MCP auth + one-click connect for all devices
Backend (api/oauth.py):
- /.well-known/oauth-authorization-server — MCP discovery endpoint
- /.well-known/oauth-protected-resource — resource metadata
- POST /oauth/register — dynamic client registration (PKCE S256)
- GET /oauth/authorize — redirects to frontend consent page
- POST /oauth/callback — verifies Firebase token, issues one-time code
- POST /oauth/token — exchanges code for fus_<uid> access token
The issued token is identical to the personal MCP key, so no changes to
the existing auth middleware or memory graph isolation are needed.
Frontend (pages/oauth.tsx):
- Clean consent page: Firebase Google sign-in → OAuth code → redirect
- Auto-completes if already signed in, works on all browsers/OS
Settings (SettingsView.tsx):
- New "Claude.ai ★ Best" tab: 3-step connect flow, copy URL + open claude.ai
One connection syncs to Claude Desktop, web, and mobile automatically
- Claude Desktop tab: switched to native url+headers format — works on
Windows/Mac/Linux identically, no…