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
-
Codex is installed (CLI or IDE extension).
-
For stdio, Node.js is on your
PATHsonpxcan run@doitintl/doit-mcp-server, and a personal API token to set asDOIT_API_KEY. -
For Streamable HTTP, a supported web browser to complete the DoiT sign-in flow when you connect.
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
-
Create or edit the Codex
config.tomlfile in one of these locations:-
All projects (user):
~/.codex/config.tomlon macOS and Linux, or%USERPROFILE%\.codex\config.tomlon Windows. -
One project:
.codex/config.tomlat the root of a trusted project. Create the.codexdirectory if it does not exist.
-
-
In a text editor, open that
config.tomlfile. -
Add or merge the following configuration (if the file already has other keys, add the
mcp_serverstable without removing existing content). Replaceyour_doit_api_keywith 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_KEYin your environment first, or add theenvtable shown above):codex mcp add doit_mcp_server -- npx -y @doitintl/doit-mcp-server@latest -
Start Codex (CLI or IDE extension). Local stdio authenticates with
DOIT_API_KEY; it does not open a browser sign-in flow. -
Verify the connection. In the Codex CLI, run
/mcpto 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
-
Create or edit the same
config.tomlfile described under Configure with stdio. -
Use a URL entry instead of
command/args:[mcp_servers.doit_mcp_server]url = "https://mcp.doit.com/mcp" -
Start Codex, complete the DoiT sign-in and consent flow when prompted, then verify with
/mcp(CLI) or the IDE MCP settings.