Submit a toolSubmit

OpenAI Agents API returns 424 mcp_server_startup_failed. Fix the MCP connection

HTTP 424 mcp_server_startup_failed means a required MCP server did not initialize. Fix connection_origin, URL/credentials, or stdio command/cwd, then retry. Short answer: 5 steps. 1) Confirm it is mcp_server_startup_failed, not a turn failure; 2) Match connection_origin to where the server is reachable; 3) Fix credentials and vault matching for HTTP servers; 4) For stdio, prove the command and absolute cwd in the environment; 5) Decide whether the server must be required, then retry.

Last updated: · This page is the decision checklist; the tools list for “Fix OpenAI Agents API mcp_server_startup_failed” is a separate URL.

The problem: HTTP 424 mcp_server_startup_failed means a required MCP server did not initialize. Fix connection_origin, URL/credentials, or stdio command/cwd, then retry.

How do I fix connection_origin, credentials, or stdio when Agents API returns 424?

  1. Confirm it is mcp_server_startup_failed, not a turn failure

    On the HTTP response, read `error.code`. `mcp_server_startup_failed` is a 424 request error: an MCP server failed to start. For failures after a turn began, inspect `agent.session.turn.failed` instead. Use `error.code` in logic and `error.message` for humans. Errors guide: https://developers.openai.com/api/docs/guides/agents-api/errors

  2. Match connection_origin to where the server is reachable

    HTTP with `connection_origin: "service"` (default) is dialed from OpenAI—no session environment required. Use `connection_origin: "environment"` for private URLs or localhost inside the session environment (`self_hosted` or `openai_hosted`). Stdio always runs as a process in the environment. A localhost URL with the wrong origin fails to connect. MCP guide: https://developers.openai.com/api/docs/guides/agents-api/tools/mcp

  3. Fix credentials and vault matching for HTTP servers

    Anonymous servers omit auth. Otherwise set `transport.authorization` / `transport.headers` on the session, or attach vault credentials via `vault_ids` for OpenAI-origin HTTP (vault credentials match the server URL; pick `credential_id` when several match). Environment-origin HTTP does not use vault credentials—use inline auth or a trusted proxy. Keep secrets out of reusable agent definitions and logs.

  4. For stdio, prove the command and absolute cwd in the environment

    `command` and an absolute existing `cwd` are required; `args` is optional. Install the server and dependencies in the environment first, then run the same command manually in that environment. Supply secrets through `transport.env_vars` (names of env vars present in the environment). Check MCP process logs when a required server still fails. Docs: https://developers.openai.com/api/docs/guides/agents-api/tools/mcp

  5. Decide whether the server must be required, then retry

    `required: true` fails the turn if the server cannot initialize; initialization is optional by default. After fixing URL, origin, credentials, or stdio setup, create a new session (or retry the create) with the corrected tool config. Narrow discovery with `allowed_tools` once the server starts cleanly.

Which tools are best to fix OpenAI Agents API mcp_server_startup_failed?

Agents API MCP connections

service vs environment origin, stdio setup, auth, and Troubleshoot connections.

Agents API errors

Documents HTTP 424 mcp_server_startup_failed and recovery flow.

Create session reference

MCP tool fields including required and allowed_tools (linked from the MCP guide).

OpenAI Platform

Inspect API keys, vault credentials, and recent Agents API requests.

All tools for “Fix OpenAI Agents API mcp_server_startup_failed” →

Related fixes

See also AI tools launched today on the daily board.