mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* 🙈 feat: Let Config Profiles Hide librechat.yaml MCP Servers and Remove Their Fields Config profiles are the `__base__`, role, group and user documents written through `/api/admin/config`. A profile can tombstone `mcpServers.<name>`, and the merge then removes that server from the principal's resolved `mcpConfig`. * 🛡️ fix: Apply MCP Hiding to Server Instructions, Failed Removals and the Startup Audit - Server instructions bound for the model now leave out librechat.yaml servers hidden from the acting user, including one a model spec pins. `applyContextToAgent` passes the request user through `formatInstructionsForContext`, which drops the user's hidden set from the user-less catalog it reads. - A config-tier candidate that removes a librechat.yaml value (a field, or a key of a record such as `headers`) and fails inspection now stands as a failed config-source entry instead of falling back to the librechat.yaml base that still carries the removed value. A failed change that removes nothing still falls back, and an entry with no transport (fields written over a hidden server) keeps the documented librechat.yaml fallback. - The startup tombstone report reads every tenant's profiles in the system tenant scope, so it also runs from entry points without an outer system scope under strict tenant isolation, and names each profile's tenant. * 🗂️ fix: Project the Startup MCP Tombstone Report Query and Run It Alongside Connections * 🔑 fix: Keep Removed OAuth Headers Out of the MCP OAuth Callback * 📝 docs: Note That Removed OAuth Headers Stay Out of MCP Sign-In * 🔐 fix: Recheck the MCP OAuth Flow's Server Before Initiation Redirects OAuth initiation redirected to a flow's stored authorization URL, or started a new authorization from the flow's stored server URL, without resolving the server again, so a principal whose profile hid the server after the flow was created could still be sent to its authorization endpoint. The callback's active-server check and its OAuth header fallback lived in the CJS route. resolveMCPOAuthTarget (packages/api/src/mcp/oauth/target.ts) now owns both: it resolves the server in the principal's current config with a strict read, refuses a flow admitted for another server, a server the principal can no longer use, or a redefined one, and selects the headers the flow sends (the initiation snapshot, else the principal's config). Initiation calls it before either redirect (404 or 400); the callback calls it before the exchange and from the token-store fence. * 📝 docs: Note That a Hidden MCP Server Ends OAuth Sign-Ins Already Started * 🚩 feat: Publish the yamlMcpHide Admin Config Meta Flag Profiles can hide librechat.yaml MCP servers and a hidden server is an access boundary, so GET /api/admin/config/meta now reports features.yamlMcpHide for the admin panel to gate its hide UI on. The meta.spec probe checks the behaviour itself: the admin API stores an mcpServers.<name> tombstone, the merged config drops the server, the registry withholds it from principal lookups and checkout but not from app-level lookups, process-backed servers stay, and an unreadable principal config withholds every hideable server. * 🧪 test: Align MCP Tombstone Specs With the Portable Config Store The admin config handlers now write whole documents through writeConfigDocument, so the end-to-end tombstone spec wires it in place of the removed upsertConfig/patchConfigFields deps. A reset of a whole MCP record now also prunes the parents it leaves empty. |
||
|---|---|---|
| .. | ||
| AssistantService.logging.spec.js | ||
| MCP.spec.js | ||
| toolCapabilityGates.spec.js | ||
| ToolService.spec.js | ||