-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
🔑 refactor: MCP Settings Rendering Logic for OAuth Servers #8718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…stomUserVars - removes the subtle reinitialize button from config components of servers without customUserVars or OAuth - adds a placeholder message for components where servers have no customUserVars configured
6 tasks
jhrozek
pushed a commit
to StacklokLabs/LibreChat
that referenced
this pull request
Jul 31, 2025
…la#8718) * feat: add OAuth servers to conditional rendering logic for MCPPanel in SideNav * feat: add startup flag check to conditional rendering logic * fix: correct improper handling of failure state in reinitialize endpoint * fix: change MCP config components to better handle servers without customUserVars - removes the subtle reinitialize button from config components of servers without customUserVars or OAuth - adds a placeholder message for components where servers have no customUserVars configured * style: swap CustomUserVarsSection and ServerInitializationSection positions * style: fix coloring for light mode and align more with existing design patterns * chore: remove extraneous comments * chore: reorder imports and `isEnabled` from api package --------- Co-authored-by: Danny Avila <[email protected]>
xycjscs
pushed a commit
to xycjscs/LibreChat
that referenced
this pull request
Aug 9, 2025
…la#8718) * feat: add OAuth servers to conditional rendering logic for MCPPanel in SideNav * feat: add startup flag check to conditional rendering logic * fix: correct improper handling of failure state in reinitialize endpoint * fix: change MCP config components to better handle servers without customUserVars - removes the subtle reinitialize button from config components of servers without customUserVars or OAuth - adds a placeholder message for components where servers have no customUserVars configured * style: swap CustomUserVarsSection and ServerInitializationSection positions * style: fix coloring for light mode and align more with existing design patterns * chore: remove extraneous comments * chore: reorder imports and `isEnabled` from api package --------- Co-authored-by: Danny Avila <[email protected]>
miguelwon
pushed a commit
to miguelwon/LibreChat
that referenced
this pull request
Aug 10, 2025
…la#8718) * feat: add OAuth servers to conditional rendering logic for MCPPanel in SideNav * feat: add startup flag check to conditional rendering logic * fix: correct improper handling of failure state in reinitialize endpoint * fix: change MCP config components to better handle servers without customUserVars - removes the subtle reinitialize button from config components of servers without customUserVars or OAuth - adds a placeholder message for components where servers have no customUserVars configured * style: swap CustomUserVarsSection and ServerInitializationSection positions * style: fix coloring for light mode and align more with existing design patterns * chore: remove extraneous comments * chore: reorder imports and `isEnabled` from api package --------- Co-authored-by: Danny Avila <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request enhances the MCP Settings panel rendering logic to show when servers need user interaction for configuration, authentication, or initialization. The panel will now render if a server is detected that:
startup: false
configured inlibrechat.yaml
This replaces the previous filtering logic which only checked for customUserVars.
Server-side changes:
api/server/routes/config.js
: Added dependency ongetMCPManager
and updated the route handler to include three new properties in the payload:isOAuth
: Determines if server requires OAuth by checkinggetMCPManager().getOAuthServers()
startup
: Includes the startup configuration flag from server configClient-side changes:
client/src/hooks/Nav/useSideNavLinks.ts
: Updated navigation logic to render MCPPanel when servers meet any of the previously mentioned criteria.client/src/locales/en/translation.json
: Added new localization string for empty state handling:com_sidepanel_mcp_no_custom_vars
Configuration updates:
packages/data-provider/src/config.ts
: Added new optional properties toTStartupConfig
type:isOAuth
: Boolean indicating OAuth requirement detectionstartup
: Boolean reflecting server startup configurationUX/UI Improvements:
Enhanced empty state handling:
CustomUserVarsSection
now displays "No custom user variables set for {serverName}" instead of rendering nothing when no variables are configured.Improved section organization: Reordered MCP panel sections to show Custom User Variables first, followed by Server Initialization, creating a more logical user flow.
Better visual design: Updated
ServerInitializationSection
styling:Smarter initialization controls: The subtle reinitialize button now only appears for connected servers that actually need it (servers with OAuth requirements or custom user variables), preventing unnecessary UI clutter.
Bug Fixes:
Fixed reinitialize endpoint: Corrected improper handling of failure states in the MCP server reinitialize endpoint to prevent misleading success toasts.
Enhanced component props: Added
hasCustomUserVars
prop toServerInitializationSection
to enable conditional rendering of initialization controls.Change Type
Testing
Manual verification of MCP Settings Panel presence/absence in SideNav with various MCP server configurations:
startup: false
Checklist