Skip to content

[Bug]: MCP Server Custom Variable Failing to show #8046

Closed
@icariantk

Description

@icariantk

What happened?

Environment:

LibreChat version: v0.7.8

Running mode: Self‑hosted Docker

Configuration file: librechat.yaml

Expected Behavior:

A dialog should appear showing the token_id field (with the configured title and description), allowing users to input the value.
As documented:

“A settings icon will appear … clicking this icon opens a dialog to manage credentials for that server.”

Documentation for MCP CustomUserVars

Actual Behavior:

The settings dialog is either empty, missing the token_id field, or fails to appear altogether.

The variable defined under customUserVars is not shown, thus cannot be configured via the GUI.

Documentation Reference:
From the official docs on MCP server object structure:

“The customUserVars object contains keys … This title is displayed in the configuration UI. … A dedicated ‘MCP Settings’ section in the right panel lists all MCP servers with definable custom variables.”
librechat.ai

Impact/Severity:

Users cannot properly configure per-user tokens or credentials via the UI.

Workarounds require editing YAML and restarting the server, undermining usability.

Additional Notes:

This appears to affect only streamable-http (and possibly sse) tool types.

Suggested Fix or Investigation:

Trace front-end rendering logic for MCP servers to see if it excludes variables for certain types.

Ensure the UI registers customUserVars for all valid MCP types and populates the settings dialog accordingly.

Confirm that the “MCP Settings” panel on the right side reflects these variables too.

Version Information

xxxx@LibreCxxxx:~# docker images | grep librechat
ghcr.io/danny-avila/librechat-dev-api latest 8b27fbd4bdd6 11 days ago 1.13GB
ghcr.io/danny-avila/librechat-dev latest 45865149dbf3 11 days ago 1.06GB
ghcr.io/danny-avila/librechat-rag-api-dev-lite latest 5662d1b3e144 13 days ago 1.47GB

Steps to Reproduce

In config, define an MCP server with type: streamable-http, including customUserVars, for example:

mcpServers:
mcprag:
type: streamable-http
url: "http://xx.x.x.xx/mcp/"
headers:
X-User-ID: "{{LIBRECHAT_USER_ID}}"
x-Thread-ID: "0"
x-Token-ID: "{{token_id}}"
customUserVars:
token_id:
title: "Token Identification"
description: "Enter your personal Identification Token (use ABC for testing)"

Restart LibreChat.

In the chat UI, click the input area → select the “MCP tool” dropdown → choose mcprag.

Click the gear/settings icon next to mcprag (unexist).

What browsers are you seeing the problem on?

No response

Relevant log output

XXXXX@LibXXXXX:~/LibreChat$ sudo docker-compose -f ./deploy-compose.yml logs |  grep mcprag
LibreChat-API  |     "mcprag": {
LibreChat-API  | 2025-06-24 20:01:53 info: [MCP][mcprag] Creating streamable-http transport: http://1X.XXX.XXX/mcp/
LibreChat-API  | 2025-06-24 20:01:53 info: [MCP][mcprag] Instructions not included (serverInstructions not configured)
LibreChat-API  | 2025-06-24 20:01:53 info: [MCP][mcprag] Capabilities: {"experimental":{},"prompts":{"listChanged":false},"resources":{"subscribe":false,"listChanged":false},"tools":{"listChanged":false}}
LibreChat-API  | 2025-06-24 20:01:53 info: [MCP][mcprag] Available tools: create_item, get_item, update_item, delete_item, search
LibreChat-API  | 2025-06-24 20:01:53 info: [MCP][mcprag] ✓ Initialized

Screenshots

Image

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions