LibreChat/api/server/services/Config
Danny Avila dcd9273700
🔄 refactor: MCP Server Init and Stale Cache Handling (#10984)
* 🔧 refactor: Update MCP connection handling to improve performance and testing

* refactor: Replace getAll() with getLoaded() in MCP.js to prevent unnecessary connection creation for user-context servers.
* test: Adjust MCP.spec.js to mock getLoaded() instead of getAll() for consistency with the new implementation.
* feat: Enhance MCPServersInitializer to reset initialization flag for better handling of process restarts and stale data.
* test: Add integration tests to verify re-initialization behavior and ensure stale data is cleared when necessary.

* 🔧 refactor: Enhance cached endpoints config handling for GPT plugins

* refactor: Update MCPServersInitializer tests to use new server management methods

* refactor: Replace direct Redis server manipulation with registry.addServer and registry.getServerConfig for better abstraction and consistency.
* test: Adjust integration tests to verify server initialization and stale data handling using the updated methods.

* 🔧 refactor: Increase retry limits and delay for MCP server creation

* Updated MAX_CREATE_RETRIES from 3 to 5 to allow for more attempts during server creation.
* Increased RETRY_BASE_DELAY_MS from 10 to 25 milliseconds to provide a longer wait time between retries, improving stability in server initialization.

* refactor: Update MCPServersInitializer tests to utilize new registry methods

* refactor: Replace direct access to sharedAppServers with registry.getServerConfig for improved abstraction.
* test: Adjust tests to verify server initialization and stale data handling using the updated registry methods, ensuring consistency and clarity in the test structure.
2025-12-15 16:46:56 -05:00
..
__tests__ 🏷️ fix: Add user ID to MCP tools cache keys (#10201) 2025-10-30 17:09:56 -04:00
app.js 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
EndpointService.js 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
getCachedTools.js 🏷️ fix: Add user ID to MCP tools cache keys (#10201) 2025-10-30 17:09:56 -04:00
getEndpointsConfig.js 🔄 refactor: MCP Server Init and Stale Cache Handling (#10984) 2025-12-15 16:46:56 -05:00
index.js 🧰 refactor: Decouple MCP Tools from System Tools (#9748) 2025-09-21 07:56:40 -04:00
ldap.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
loadAsyncEndpoints.js 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
loadConfigModels.js 🧵 refactor: Migrate Endpoint Initialization to TypeScript (#10794) 2025-12-11 16:37:16 -05:00
loadConfigModels.spec.js 🧵 refactor: Migrate Endpoint Initialization to TypeScript (#10794) 2025-12-11 16:37:16 -05:00
loadCustomConfig.js 🛠️ feat: Add Config Validation Bypass & Improve Error Handling (#10733) 2025-12-11 16:37:25 -05:00
loadCustomConfig.spec.js 🛠️ feat: Add Config Validation Bypass & Improve Error Handling (#10733) 2025-12-11 16:37:25 -05:00
loadDefaultEConfig.js 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
loadDefaultModels.js 🧵 refactor: Migrate Endpoint Initialization to TypeScript (#10794) 2025-12-11 16:37:16 -05:00
mcp.js 🐛 fix: Error Handling in MCP Tool List Controller (#10570) 2025-11-18 18:28:57 -05:00