mcplocal HTTP mode: project instructions fetched with pod-level client (empty token) → 401 swallowed, initialize serves no instructions #113
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom: an MCP client connecting to
/projects/<name>/mcpgetsServer Instructions: N/Aat initialize even when the project has a non-emptyprompt. Nothing errors anywhere.Cause:
src/mcplocal/src/http/project-mcp-endpoint.ts:181(at deployed rev35d506d) fetches/api/v1/projects/:name/instructionswithmcpdClient— the pod-level client whose token is an empty string in HTTP mode — instead of the per-requestrequestClientbuilt ~100 lines earlier precisely for this reason (its own comment: "Every downstream call from this request … has to use the CALLER's McpToken … thread it everywhere"). mcpd answers 401 and thecatch {}around the fetch swallows it, sorouter.setInstructionsis never called.Verified 2026-08-15:
LibreChat log:
Server Instructions: N/Adespite chat-web's prompt being set.Fix: one line —
mcpdClient.get→requestClient.geton that call. (Audit the rest ofgetOrCreateRouterfor othermcpdClientstragglers while there;refreshProjectUpstreamsalready takesauthToken.)Workaround in place: LibreChat's
serverInstructionsis set to a literal string copy of the chat-web prompt in kubernetes-deployment (deployments/librechat/server.ts); flip it totrueonce this ships.