Complete MCPHub setup first

Follow Your first connection, run setup, and choose generic JSON. Keep the generated command, args, env, and entry ID. Run the connector and Codex on the same computer under the same system account.

Convert the configuration to TOML

Add the following structure to Codex MCP configuration and substitute the actual setup values. The default personal configuration is usually ~/.codex/config.toml; project configuration is .codex/config.toml and is subject to project trust and company policy.

[mcp_servers.work_projects]
command = "/absolute/path/to/mcpbridge"
args = ["connect", "--profile", "work", "--client", "ci_example"]

[mcp_servers.work_projects.env]
MCPHUB_HOME = "/Users/you/.mcphub"

You can choose the server name; use different names for different services and avoid duplicate tables. On Windows, use TOML single-quoted paths, such as command = 'C:\Tools\mcpbridge\mcpbridge.exe'.

Add it through the Codex CLI

codex mcp add work_projects --env MCPHUB_HOME=/Users/you/.mcphub -- /absolute/path/to/mcpbridge connect --profile work --client ci_example

Use the actual setup values and keep existing server settings. Restart the relevant connection or begin a new session afterward.

Confirm that tools are visible

  1. Reload Codex MCP connections and review the server status and tools.
  2. Run mcpbridge doctor --profile work --client ci_example with the same ID as the configuration.
  3. Start with an authorized read-only task and check the result.

If doctor succeeds but Codex fails, check executable paths, env, the system account, and company MCP policy.

Official reference

The configuration and CLI command were checked against the MCP and configuration sections of the official OpenAI Codex Manual. When the client changes, follow its current settings and official documentation.