A familiar server name can hide an outdated launcher or an unexpected endpoint. The saved Model Context Protocol (MCP) server details in Codex identify the transport and target associated with that name before a session loads its tools.

An installed Codex CLI and an existing server entry are required. The lookup uses the configuration available in the current environment, including trusted project settings; a different project or CODEX_HOME can therefore resolve a different record for the same name.

The details describe configuration rather than a live connection. An enabled entry can still point to an unavailable service or a local command that cannot start, and an authentication variable name does not establish that its value is present.

Steps to get Codex MCP server details:

  1. Retrieve the saved details for the server name you want to inspect.

    The registered name below is example-docs; it stands for your existing server name. The server inventory shows the names available in the current configuration.

    Details can expose internal endpoints, launch arguments, environment values, or static headers. Any output containing sensitive values belongs in private troubleshooting records.

    $ codex mcp get example-docs
    example-docs
      enabled: true
      transport: streamable_http
      url: https://mcp.example.com/mcp
      bearer_token_env_var: MCP_TOKEN
      http_headers: -
      env_http_headers: -
      http_headers_helper: -
      remove: codex mcp remove example-docs

    The URL is a placeholder for a provider endpoint, not a working service. A remote record reports streamable_http and a URL; a local stdio record instead reports its command, arguments, working directory, and environment settings. A missing name produces a No MCP server named error and a nonzero exit status.

  2. Confirm the server's saved HTTP endpoint in the JSON record.
    $ codex mcp get example-docs --json
    {
      "name": "example-docs",
      "enabled": true,
      "disabled_reason": null,
      "transport": {
        "type": "streamable_http",
        "url": "https://mcp.example.com/mcp",
        "bearer_token_env_var": "MCP_TOKEN",
        "http_headers": null,
        "env_http_headers": null,
        "http_headers_helper": null
      },
    ##### snipped #####
    }

    The matching name, transport.type, and transport.url identify the saved HTTP target. For stdio, the target is transport.command with transport.args. The bearer-token field stores an environment variable name rather than the token itself; omitted fields below the transport describe tool filters and timeouts. Both views leave the saved entry unchanged.

Share this guide