LibreChat/api/server
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
..
controllers 🔧 fix: Express v5 Optional chaining for endpoint retrieval in Assistants Controllers (#10946) 2025-12-12 14:04:28 -05:00
middleware 🏗️ feat: Dynamic MCP Server Infrastructure with Access Control (#10787) 2025-12-11 16:38:37 -05:00
routes 🪟 feat: DataTable update + Various UI enhancements (#9698) 2025-12-11 16:39:06 -05:00
services 🔄 refactor: MCP Server Init and Stale Cache Handling (#10984) 2025-12-15 16:46:56 -05:00
utils 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
cleanup.js 🤖 refactor: Improve Agent Handoff Context Tracking (#10553) 2025-11-17 16:57:51 -05:00
experimental.js 📦 chore: Bump Express.js to v5 (#10671) 2025-12-11 16:36:15 -05:00
index.js 📦 chore: Bump Express.js to v5 (#10671) 2025-12-11 16:36:15 -05:00
index.spec.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
socialLogins.js ⚙️ refactor: Only register OpenID Strategy if Config Succeeded (#9094) 2025-08-16 14:49:03 -04:00