Intermittent MCP tool discovery failure in Agent Builder (HTTP 424) but direct @openai/agents calls succeed
Hi all, I’m seeing an intermittent issue where an Agent Builder workflow using an MCP tool sometimes fails to connect or list tools, but when I run a direct Node script using @openai/agents against the same MCP server and same headers, it works consistently. What I’m building
Agent Builder workflow node (“Chat Limiter”) calls an MCP tool get_chat_counter(reportId, personId) and returns a number.
Symptoms in Agent Builder
Some runs fail with: • Error retrieving tool list from MCP server: ‘get_chat_counter’. Http status code: 424 (Failed Dependency) • When it fails, it looks like tool discovery fails and the tool call never happens.
Other runs succeed without any changes.
Why this is confusing
If I manually call the MCP server using Node + @openai/agents, it consistently works, including tool calls.
MCP server details • Python FastMCP server using streamable HTTP: • mcp = FastMCP(“mcp”, streamable_http_path=“/mcp”) • app = mcp.streamable_http_app() • Protected by middleware requiring header mcp-api-key • Running behind a reverse proxy (I see x-forwarded-* and x-amzn-trace-id in logs)
Node reproduction that always works import { MCPServerStreamableHttp } from “@openai/agents”;
const url = “https://:81/mcp”; const AUTH_TOKEN = “”;
const server = new MCPServerStreamableHttp({ url, name: “inseer-mcp”, requestInit: { headers: { “mcp-api-key”: AUTH_TOKEN } }, });
await server.connect(); const list = await server.listTools(); console.log(“MCP tools:”, list.tools?.map((t) => t.name)); // note: list.tools sometimes undefined, but tool calls work const r = await server.callTool(“get_chat_counter”, { reportId: “”, personId: 0 }); console.log(r); await server.close();
Key question
Why would Agent Builder intermittently fail at tool discovery (424) while direct Node usage succeeds consistently against the same endpoint and API key?
Any help will be greatly appreciated
Discussion in the ATmosphere