LibreChat/packages/api/src
Atef Bellaaj 2263931a32
🗃️ refactor: Simplify MCP Server Config to Two-Repository Pattern (#10705)
* refactor(mcp): simplify registry to two-repository architecture with explicit storage

* Chore: address AI Review comments

* Simplify MCP config cache architecture and remove legacy code:
Follow-up cleanup to commit d2bfdd033 which refactored MCP registry to two-repository architecture. This removes leftover legacy abstractions that were no longer used.
 What changed:
  - Simplified ServerConfigsCacheFactory.create() from 3 params to 2 (namespace, leaderOnly)
  - Removed unused scope: 'Shared' | 'Private' parameter (only 'Shared' was ever used)
  - Removed dead set() and getNamespace() methods from cache classes
  - Updated JSDoc to reflect two-repository architecture (Cache + DB) instead of old three-tier system
  - Fixed stale mocks and comments referencing removed sharedAppServers, sharedUserServers, privateServersCache

  Files changed:
  - ServerConfigsCacheFactory.ts - Simplified factory signature
  - ServerConfigsCacheRedis.ts - Removed scope, renamed owner→namespace
  - ServerConfigsCacheInMemory.ts - Removed unused methods
  - MCPServersRegistry.ts - Updated JSDoc, simplified factory call
  - RegistryStatusCache.ts - Removed stale JSDoc reference
  - MCPManager.test.ts - Fixed legacy mock
  - ServerConfigsCacheFactory.test.ts - Updated test assertions

* fix: Update error message in MCPServersRegistry for clarity

---------

Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
2025-12-04 14:34:50 -05:00
..
agents 🦙 fix: Ollama Provider Handling (#10711) 2025-11-28 11:14:13 -05:00
app 📂 refactor: Cleanup File Filtering Logic, Improve Validation (#10414) 2025-11-10 19:05:30 -05:00
auth 📬 refactor: Normalize Email Handling in User Methods (#10743) 2025-12-01 09:41:25 -05:00
cache 📡 refactor: MCP Runtime Config Sync with Redis Distributed Locking (#10352) 2025-12-04 14:34:45 -05:00
cdn 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
cluster 🐛 fix: Redis Cluster Bug + 🧪 Enhance Test Coverage (#10518) 2025-11-16 11:58:52 -05:00
crypto 📎 feat: Upload as Text Support for Plaintext, STT, RAG, and Token Limits (#8868) 2025-08-27 03:44:39 -04:00
db 🔧 refactor: Centralize Collection Checks for Permissions Migration (#9565) 2025-09-10 20:40:58 -04:00
endpoints 🔑 fix: Gemini Custom Endpoint Auth. for OAI-Compatible API (#10806) 2025-12-04 14:09:42 -05:00
files ⏱️ fix: Increase RAG API Text Parsing Timeout (#10562) 2025-11-25 14:54:53 -05:00
flow 🔒 feat: Idempotency Check for OAuth Flow Completion (#10468) 2025-11-12 08:44:45 -05:00
mcp 🗃️ refactor: Simplify MCP Server Config to Two-Repository Pattern (#10705) 2025-12-04 14:34:50 -05:00
memory 🛂 feat: Payload limits and Validation for User-created Memories (#8974) 2025-08-10 14:46:16 -04:00
middleware 🛡️ feat: Add Middleware for JSON Parsing and Prompt Group Updates (#10757) 2025-12-02 00:10:30 -05:00
oauth 🪐 feat: MCP OAuth 2.0 Discovery Support (#7924) 2025-06-17 13:50:33 -04:00
prompts refactor: Optimize & Standardize Tokenizer Usage (#10777) 2025-12-02 12:22:04 -05:00
tools 🧬 refactor: Optimize MCP Tool Queries with Server-Centric Architecture 2025-09-21 20:40:14 -04:00
types 📷 fix: Use 'media' type for Google multimodal attachments (#10586) 2025-11-19 18:31:05 -05:00
utils 📦 refactor: Request Message Sanitization for Smaller Final Response (#10792) 2025-12-03 14:26:49 -05:00
web 🔍 feat: Add Serper as Scraper Provider and Firecrawl Version Support (#9984) 2025-10-05 20:34:05 -04:00
index.ts 🗃️ refactor: Simplify MCP Server Config to Two-Repository Pattern (#10705) 2025-12-04 14:34:50 -05:00