MCP client, OpenRouter provider, Copilot bridge, and a storage fallback - one large bundled commit
wearefaces landed a 3,344-line commit that adds per-user MCP server federation, two new LLM providers (OpenRouter and a local Copilot bridge), and a storage fallback that makes R2 optional. Four threads, no separation.
The MCP client in backend/src/lib/mcp.ts speaks Streamable-HTTP JSON-RPC 2.0 (protocol 2025-06-18). It initialises per-user servers in parallel, prefixes tool names as mcp__<srvId>__<tool> to avoid collisions, and isolates failures per server. chatTools.ts splits dispatch on that prefix: MCP calls go to mcpRuntime.callTool, native calls use the existing path, results merge back by tool_call_id. A new Supabase table (user_mcp_servers) stores configs with masked auth tokens; a 652-line integrations page handles the frontend.
OpenRouter is a production provider sending to openrouter.ai/api. The Copilot adapter is explicitly local-only - it talks to an OpenAI-compatible proxy at COPILOT_BRIDGE_URL (default http://localhost:4141) and is gated behind a copilotEnabled flag. The storage change is quieter but more broadly consequential: storageEnabled is now always true and the backend silently uses .local-storage/ when R2 env vars are absent. Callers lose the ability to detect "no storage configured".
The same commit also drops ChatShortcuts.tsx, GherkinScenarioViewer.tsx, request-logging middleware, and a .mcp.json hardcoding this fork's Supabase project_ref=lonjaurpxqaaxswyzpbq. That file is fork-specific and must not be carried across.
None of the four threads were committed separately, so cherry-picking any one of them requires manual splitting.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?