Skip to content

Conversation

dustinhealy
Copy link
Collaborator

@dustinhealy dustinhealy commented Jun 20, 2025

Related to #7964

Summary

This PR introduces support for configuring the default MCP server selection label via the librechat.yaml interface configuration (using a new mcpServers.placeholder field). This enables the MCPSelect label to be customized directly through YAML-based configuration, supporting better flexibility and future enhancements to MCP server UI configuration.

Changes:

  • Added mcpServers.placeholder to the interface schema (packages/data-provider/src/config.ts)
  • Expanded librechat.example.yaml with a new section for MCP server UI configuration
  • Included mcpServers in the interface configuration loaded by api/server/services/start/interface.js
  • Updated client/src/components/Chat/Input/MCPSelect.tsx to use startupConfig?.interface?.mcpServers?.placeholder

Change Type

Please delete any irrelevant options.

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Translation update

Testing

Test Configuration:

Test Steps:

  1. Add the following to your librechat.yaml interface section:

    interface:
      mcpServers:
        placeholder: "Custom Label"
  2. Start the LibreChat server

  3. Navigate to a conversation with MCP servers available

  4. Verify that the MCP dropdown shows "Custom Label" instead of the default "MCP Servers"

Fallback Testing:

  1. Remove the mcpServers configuration from the YAML
  2. Restart the server
  3. Verify that the MCP dropdown falls back to the localized "MCP Servers" text

Configuration Validation:

  • The YAML configuration should validate correctly without errors
  • The interface configuration should be properly loaded and passed to the frontend

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings

@dustinhealy dustinhealy requested a review from danny-avila June 20, 2025 16:48
@danny-avila
Copy link
Owner

follow up here, need to start from latest dev branch before beginning.

You can do:

git checkout dev
git pull origin dev
git checkout feat-mcp-env
git rebase dev

Also this will need a documentation update:
https://github.com/LibreChat-AI/librechat.ai/pulls

You can use this as a reference:
LibreChat-AI/librechat.ai#336

@danny-avila danny-avila changed the base branch from main to dev June 21, 2025 14:46
@danny-avila danny-avila changed the title ✨Feat: Configurable MCPSelect placeholder text ✨feat: Configurable MCPSelect placeholder text Jun 21, 2025
@danny-avila
Copy link
Owner

Just waiting on docs for this.

Make sure you make dev branch target for PRs
firefox_DCuE7JI03Z

@danny-avila danny-avila changed the title ✨feat: Configurable MCPSelect placeholder text ✨ feat: Configurable MCP Dropdown Placeholder Jun 23, 2025
…components for enhanced configuration management
@danny-avila danny-avila merged commit 2b2f7fe into dev Jun 23, 2025
7 checks passed
@danny-avila danny-avila deleted the feat-mcp-env branch June 23, 2025 17:21
rhonyabdullah pushed a commit to rhonyabdullah/LibreChat that referenced this pull request Jun 27, 2025
* new env  variable for mcp label

* 🔄 refactor: Update MCPSelect placeholderText to draw from interface section of librechat.yaml rather than .env

* 🧹 chore: extract mcpServers schema for better maintainability

* 🔄 refactor: Update MCPSelect and useMCPSelect to utilize TPlugin type for better type consistency

* 🔄 refactor: Pass placeholder from startupConfig to MCPSubMenu for improved localization

* 🔄 refactor: Integrate startupConfig into BadgeRowContext and related components for enhanced configuration management

---------

Co-authored-by: mwbrandao <[email protected]>
Co-authored-by: Danny Avila <[email protected]>
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Aug 4, 2025
* new env  variable for mcp label

* 🔄 refactor: Update MCPSelect placeholderText to draw from interface section of librechat.yaml rather than .env

* 🧹 chore: extract mcpServers schema for better maintainability

* 🔄 refactor: Update MCPSelect and useMCPSelect to utilize TPlugin type for better type consistency

* 🔄 refactor: Pass placeholder from startupConfig to MCPSubMenu for improved localization

* 🔄 refactor: Integrate startupConfig into BadgeRowContext and related components for enhanced configuration management

---------

Co-authored-by: mwbrandao <[email protected]>
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants