Skip to content

Conversation

dustinhealy
Copy link
Collaborator

Summary

This pull request changes the behavior of the MCP UI elements in chat so that they will now always appear if there are any MCP servers configured in librechat.yaml that do not have chatMenu set to false in order to address the issue raised in [Enhancement]: Stop hiding MCP Servers badge when all servers are "oauth" or "customUserVars"

Previously, startup: false and OAuth servers would not cause the MCP UI to render on their own, requiring users to initialize them in the MCP Settings Panel before the badge / tools dropdown would appear. In order to accomplish this change, the mcpServerNames property has been removed from the context in favor of using the more comprehensive mcpServerManager, which provides access to configuredServers directly. This has the added benefit of streamlining server configuration checks and improving maintainability.

Context refactoring:

  • Removed the mcpServerNames property and its associated logic from BadgeRowContext.tsx, replacing it with mcpServerManager for more robust server configuration handling. [1] [2] [3] [4]

Component updates for server configuration:

  • Updated MCPSelect.tsx and ToolsDropdown.tsx components to use configuredServers from mcpServerManager instead of relying on mcpServerNames, ensuring consistent server availability checks and rendering logic. [1] [2] [3]

  • Simplified conditional rendering in MCPSelectContent by removing checks for isPinned and mcpValues, relying solely on configuredServers for display logic. [1] [2]

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

Verified absence of MCPSelect and ToolsDropdown when only github-mcp with startup: false or spotify mcp server (OAuth) configured in YAML

Verified presence of aforementioned elements with same YAML configuration after changes

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@dustinhealy dustinhealy changed the base branch from main to dev September 10, 2025 20:22
@danny-avila danny-avila merged commit a2ff661 into dev Sep 10, 2025
6 checks passed
@danny-avila danny-avila deleted the fix/mcp-badge-visibility branch September 10, 2025 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Stop hiding MCP Servers badge when all servers are "oauth" or "customUserVars"
2 participants