🚮 fix: Remove Filtering Logic Before MCP Initialization (#9149)

This commit is contained in:
Danny Avila 2025-08-19 11:03:11 -04:00 committed by GitHub
parent 2a0a8f6beb
commit 822e2310ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 27 deletions

View file

@ -111,17 +111,20 @@ router.get('/', async function (req, res) {
payload.mcpServers = {};
const config = await getCustomConfig();
if (config?.mcpServers != null) {
const mcpManager = getMCPManager();
const oauthServers = mcpManager.getOAuthServers();
for (const serverName in config.mcpServers) {
const serverConfig = config.mcpServers[serverName];
payload.mcpServers[serverName] = {
startup: serverConfig?.startup,
chatMenu: serverConfig?.chatMenu,
isOAuth: oauthServers?.has(serverName),
customUserVars: serverConfig?.customUserVars || {},
};
try {
const mcpManager = getMCPManager();
const oauthServers = mcpManager.getOAuthServers();
for (const serverName in config.mcpServers) {
const serverConfig = config.mcpServers[serverName];
payload.mcpServers[serverName] = {
startup: serverConfig?.startup,
chatMenu: serverConfig?.chatMenu,
isOAuth: oauthServers?.has(serverName),
customUserVars: serverConfig?.customUserVars || {},
};
}
} catch (err) {
logger.error('Error loading MCP servers', err);
}
}