diff --git a/api/server/routes/config.js b/api/server/routes/config.js index 4240a6eb2..ec38593fe 100644 --- a/api/server/routes/config.js +++ b/api/server/routes/config.js @@ -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, diff --git a/client/src/Providers/AgentPanelContext.tsx b/client/src/Providers/AgentPanelContext.tsx index eb64011b3..135066c78 100644 --- a/client/src/Providers/AgentPanelContext.tsx +++ b/client/src/Providers/AgentPanelContext.tsx @@ -140,6 +140,7 @@ export function AgentPanelProvider({ children }: { children: React.ReactNode }) pluginTools, activePanel, agentsConfig, + startupConfig, setActivePanel, endpointsConfig, setCurrentAgentId, diff --git a/client/src/common/types.ts b/client/src/common/types.ts index 3156ccb44..b03a80f07 100644 --- a/client/src/common/types.ts +++ b/client/src/common/types.ts @@ -239,6 +239,7 @@ export type AgentPanelContextType = { setActivePanel: React.Dispatch>; setCurrentAgentId: React.Dispatch>; agent_id?: string; + startupConfig?: t.TStartupConfig | null; agentsConfig?: t.TAgentsEndpoint | null; endpointsConfig?: t.TEndpointsConfig | null; /** Pre-computed MCP server information indexed by server key */ diff --git a/client/src/components/SidePanel/Agents/AgentConfig.tsx b/client/src/components/SidePanel/Agents/AgentConfig.tsx index 86f9cc6dc..a48a37259 100644 --- a/client/src/components/SidePanel/Agents/AgentConfig.tsx +++ b/client/src/components/SidePanel/Agents/AgentConfig.tsx @@ -49,6 +49,7 @@ export default function AgentConfig({ createMutation }: Pick} )} + {/* MCP Section */} + {startupConfig?.mcpServers != null && ( + + )} {/* Agent Tools & Actions */}
- {/* MCP Section */} - {/* Support Contact (Optional) */}