Skip to main content

Connect Codex

The steps below demonstrate how to connect to the DoiT MCP server using OpenAI Codex. Before you connect, confirm you meet the Required permissions.

Prerequisites

Supported connection methods

Codex (CLI and IDE extension) supports stdio and Streamable HTTP. The CLI and IDE extension share the same MCP configuration in config.toml. See Codex MCP configuration and Connection methods.

Configure with stdio

  1. Create or edit the Codex config.toml file in one of these locations:

    • All projects (user): ~/.codex/config.toml on macOS and Linux, or %USERPROFILE%\.codex\config.toml on Windows.

    • One project: .codex/config.toml at the root of a trusted project. Create the .codex directory if it does not exist.

  2. In a text editor, open that config.toml file.

  3. Add or merge the following configuration (if the file already has other keys, add the mcp_servers table without removing existing content). Replace your_doit_api_key with your personal API token.

    [mcp_servers.doit_mcp_server]
    command = "npx"
    args = ["-y", "@doitintl/doit-mcp-server@latest"]

    [mcp_servers.doit_mcp_server.env]
    DOIT_API_KEY = "your_doit_api_key"

    Alternatively, run the following command in a terminal (set DOIT_API_KEY in your environment first, or add the env table shown above):

    codex mcp add doit_mcp_server -- npx -y @doitintl/doit-mcp-server@latest
  4. Start Codex (CLI or IDE extension). Local stdio authenticates with DOIT_API_KEY; it does not open a browser sign-in flow.

  5. Verify the connection. In the Codex CLI, run /mcp to confirm the DoiT MCP server is listed and its tools are available. In the IDE extension, open MCP settings and confirm the server status.

    You can now start a Codex session to ask questions or make requests related to DoiT Cloud Intelligence data.

Configure with Streamable HTTP

  1. Create or edit the same config.toml file described under Configure with stdio.

  2. Use a URL entry instead of command / args:

    [mcp_servers.doit_mcp_server]
    url = "https://mcp.doit.com/mcp"
  3. Start Codex, complete the DoiT sign-in and consent flow when prompted, then verify with /mcp (CLI) or the IDE MCP settings.