Connect Codex
The steps below demonstrate how to connect to the DoiT MCP server using OpenAI Codex.
Required permissions
-
To connect and access DoiT Cloud Intelligence via the MCP server, your user must be assigned the Billing Profiles Admin permission.
-
The DoiT MCP server tools map to the DoiT Cloud Intelligence API. MCP requests are authenticated with your signed-in DoiT account. In addition, each DoiT API operation enforces its own permissions.
Prerequisites
-
Codex is installed (CLI or IDE extension).
-
Node.js is on your
PATHsonpxcan 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
-
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).[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 -
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.
-
On the DoiT consent screen, select Allow access.
注意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. -
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.