mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🛠️ refactor: Only Show Agents MCP UI When Configured (#9471)
This commit is contained in:
parent
65c83317aa
commit
a4a174b3dc
4 changed files with 14 additions and 7 deletions
|
|
@ -122,7 +122,6 @@ router.get('/', async function (req, res) {
|
|||
payload.minPasswordLength = minPasswordLength;
|
||||
}
|
||||
|
||||
payload.mcpServers = {};
|
||||
const getMCPServers = () => {
|
||||
try {
|
||||
if (appConfig?.mcpConfig == null) {
|
||||
|
|
@ -136,6 +135,9 @@ router.get('/', async function (req, res) {
|
|||
if (!mcpServers) return;
|
||||
const oauthServers = mcpManager.getOAuthServers();
|
||||
for (const serverName in mcpServers) {
|
||||
if (!payload.mcpServers) {
|
||||
payload.mcpServers = {};
|
||||
}
|
||||
const serverConfig = mcpServers[serverName];
|
||||
payload.mcpServers[serverName] = removeNullishValues({
|
||||
startup: serverConfig?.startup,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue