fix(api): fix MCP OAuth connection through reverse proxy
Merged
SA
9mo ago+0+0+0123456789-2-2-0123456789
Summary
- Remove hardcoded
resourceUrlfromprotectedResourceHandlerin both.well-known/oauth-protected-resourceroutes so mcp-handler auto-derives it fromX-Forwarded-Host/X-Forwarded-Protoheaders — fixes URL mismatch when connecting through Caddy (https://localhost:3050vshttp://localhost:3041) - Add
sessionIdGeneratortocreateMcpHandlerconfig to fix@modelcontextprotocol/sdkv1.26.0 breaking change where stateless transports can no longer be reused across requests
Test plan
- Verified MCP OAuth connection works through Caddy in local dev (
/mcp→ "Authentication successful. Reconnected to superset") - Tested all MCP tools:
list_tasks,list_members,list_task_statuses,create_task,delete_task,list_devices,list_projects,list_workspaces,create_workspace,navigate_to_workspace,start_claude_session,delete_workspace - Lint, typecheck, and tests all pass
Summary by CodeRabbit
- Chores
- Simplified OAuth protected resource endpoint configuration by removing an unused parameter.