メインコンテンツへスキップ

Connect Codex

The steps below demonstrate how to connect to the DoiT MCP server using OpenAI Codex.

Required permissions

Prerequisites

  • Codex is installed (CLI or IDE extension).

  • Node.js is on your PATH so npx can run @doitintl/doit-mcp-server.

  • A supported web browser to complete the DoiT sign-in flow when Codex starts the MCP server.

Connection type

Codex connects to DoiT MCP using a local stdio connection. Codex launches the published package (@doitintl/doit-mcp-server) on your machine using standard input/output (stdio) using npx. Ensure Node.js is on your PATH.

The CLI and IDE extension share the same MCP configuration in config.toml. See Codex MCP configuration.

Configure the DoiT MCP server

  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).

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

    Alternatively, run the following command in a terminal:

    codex mcp add doit_mcp_server -- npx -y @doitintl/doit-mcp-server@latest
  4. Start Codex (CLI or IDE extension). When Codex starts the DoiT MCP server, your browser opens the DoiT sign-in page. Sign in with your DoiT account.

  5. On the DoiT consent screen, select Allow access.

    DoiT consent screen

    注意

    If authorization fails with an ofid_ reference code, confirm your organization's plan includes DoiT API access and your DoiT account has the Billing Profiles Admin permission. See Troubleshooting for more details.

  6. 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.