From 824e5b520c6f4b662199ed41c2443284bbd847d3 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Wed, 3 Sep 2025 12:25:12 -0600 Subject: [PATCH] fix: Remove duplicate /mcp path append in agent MCP URL update script The script was appending /mcp to the MCP server URL before storing it in agent configurations. However, the LangGraph agent runtime also appends /mcp when making requests, resulting in double-appended paths like /mcp/mcp that return 404 errors. This fix removes the path append from the script, allowing agents to correctly construct MCP server URLs at runtime. Fixes authentication issues where 404 errors triggered fallback auth flows. --- apps/web/scripts/update-agents-mcp-url.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/web/scripts/update-agents-mcp-url.ts b/apps/web/scripts/update-agents-mcp-url.ts index fd769328d..33ffef523 100644 --- a/apps/web/scripts/update-agents-mcp-url.ts +++ b/apps/web/scripts/update-agents-mcp-url.ts @@ -15,7 +15,6 @@ async function main() { } const newMCPUrl = new URL(newMCPUrlStr); - newMCPUrl.pathname = `${newMCPUrl.pathname}/mcp`; for await (const deployment of deployments) { const client = new Client({