LibreChat/client/src/components
Atef Bellaaj 95a69df70e
🔒 feat: Add MCP server domain restrictions for remote transports (#11013)
* 🔒 feat: Add MCP server domain restrictions for remote transports

* 🔒 feat: Implement comprehensive MCP error handling and domain validation

- Added `handleMCPError` function to centralize error responses for domain restrictions and inspection failures.
- Introduced custom error classes: `MCPDomainNotAllowedError` and `MCPInspectionFailedError` for better error management.
- Updated MCP server controllers to utilize the new error handling mechanism.
- Enhanced domain validation logic in `createMCPTools` and `createMCPTool` functions to prevent operations on disallowed domains.
- Added tests for runtime domain validation scenarios to ensure correct behavior.

* chore: import order

* 🔒 feat: Enhance domain validation in MCP tools with user role-based restrictions

- Integrated `getAppConfig` to fetch allowed domains based on user roles in `createMCPTools` and `createMCPTool` functions.
- Removed the deprecated `getAllowedDomains` method from `MCPServersRegistry`.
- Updated tests to verify domain restrictions are applied correctly based on user roles.
- Ensured that domain validation logic is consistent and efficient across tool creation processes.

* 🔒 test: Refactor MCP tests to utilize configurable app settings

- Introduced a mock for `getAppConfig` to enhance test flexibility.
- Removed redundant mock definition to streamline test setup.
- Ensured tests are aligned with the latest domain validation logic.

---------

Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
2025-12-18 13:57:49 -05:00
..
Agents 🪪 style: Improve a11y of Agent Cards in Marketplace (#10957) 2025-12-13 09:10:43 -05:00
Artifacts 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
Audio ️ fix: Accessibility, UI consistency, dialog & avatar refactors (#9975) 2025-10-07 14:12:49 -04:00
Auth ⛓️💥 feat: More Accessible Login Page Links (#10997) 2025-12-16 17:28:25 -05:00
Banners 📌 feat: Add Support for Persistable (Non-Dismissible) Banners (#10730) 2025-12-11 16:37:22 -05:00
Bookmarks 🧩 refactor: Decouple MCP Config from Startup Config (#10689) 2025-12-11 16:36:34 -05:00
Chat 👁️ fix: Return Focus on My Files Modal Close (#11032) 2025-12-18 13:36:19 -05:00
Conversations Revert "⌨️ feat: Add Shift-Key Shortcuts for Instant Conversation Actions (#10732)" 2025-12-15 17:02:16 -05:00
Endpoints 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
Files 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
Input 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
MCP 📦 chore: Bump MCP SDK: Fix Types and MCP OAuth due to Update (#10811) 2025-12-11 16:38:40 -05:00
MCPUIResource 👨‍✈️ chore: Minor MCP-UI Logic Cleanup (#10950) 2025-12-12 17:10:57 -05:00
Messages 🔧 chore: Update ESLint Config & Run Linter (#10986) 2025-12-15 17:55:25 -05:00
Nav 👁️ fix: Return Focus on My Files Modal Close (#11032) 2025-12-18 13:36:19 -05:00
OAuth 🪟 feat: DataTable update + Various UI enhancements (#9698) 2025-12-11 16:39:06 -05:00
Plugins/Store 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
Prompts ☰ fix: Side Panel Accessibility Improvements (#10830) 2025-12-11 16:39:31 -05:00
Share 🔧 chore: Update ESLint Config & Run Linter (#10986) 2025-12-15 17:55:25 -05:00
SharePoint 🎨 style: Theming in SharePointPickerDialog, PrincipalAvatar, and PeoplePickerSearchItem 2025-08-13 16:24:23 -04:00
Sharing 🏗️ feat: Dynamic MCP Server Infrastructure with Access Control (#10787) 2025-12-11 16:38:37 -05:00
SidePanel 🔒 feat: Add MCP server domain restrictions for remote transports (#11013) 2025-12-18 13:57:49 -05:00
System feat: Prevent Screen Sleep During Response Generation (#10597) 2025-11-21 09:14:32 -05:00
Tools 🏗️ feat: Dynamic MCP Server Infrastructure with Access Control (#10787) 2025-12-11 16:38:37 -05:00
ui 🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety 2025-08-13 16:24:20 -04:00
Web 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
index.ts 🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety 2025-08-13 16:24:20 -04:00