Skip to main content

Some screenshots show mcp-s.com, which some existing organizations still use. New organizations use withwillow.ai. Copy the URLs shown in your own organization.

Connect Codex to Willow

Use OpenAI Codex with your organization's Willow tools. The Codex CLI, Codex in the ChatGPT desktop app, and the Codex IDE extension share one MCP config (~/.codex/config.toml), so you only set Willow up once.

ChatGPT web vs Codex

ChatGPT web (chatgpt.com) connects through Plugins — see Connect ChatGPT. Codex inside the ChatGPT desktop app uses these Codex instructions, not the ChatGPT Plugins flow.

Prerequisites​

  • Codex CLI (codex --version), the ChatGPT desktop app with Codex, or the Codex IDE extension
  • Your organization's Willow URL (from the Connect MCP modal)

Step 1: Get Your Connection URL​

In Willow, click Connect MCP at the bottom of the left sidebar.

Select Codex (or any tool) and copy the Server URL. The gateway URL is the same for every tool.

Step 2a: ChatGPT desktop (Codex)​

  1. Open the ChatGPT desktop app and switch to Codex
  2. Open Plugins → MCPs, then select Add → Add MCP server
  3. Enter a name (e.g. willow), choose Streamable HTTP, and paste the Server URL
  4. Save, then Restart
  5. If prompted, click Authenticate and complete the Willow sign-in
  6. In a Codex chat, type /mcp to confirm Willow is listed

Step 2b: Codex CLI​

Run this command, replacing the URL with the one you copied:

codex mcp add willow --url "https://yourorg.withwillow.ai/mcp"

willow is the name you're giving this connection. You can use any name.

Codex adds the server, detects OAuth support, and starts the auth flow immediately. No separate login step needed.

Codex terminal showing mcp add command, server added, OAuth detected and auth URL provided

Open the URL in your browser. Log in to your Willow account if prompted, then complete the authorization.

Willow Authorize Access page showing Codex is requesting access with an Allow button

The browser confirms authentication is complete.

Browser showing Authentication complete. You may close this window.

Back in the terminal, Codex confirms with Successfully logged in.

Codex terminal showing Successfully logged in

Codex stores the credentials and uses them automatically on future connections.

note

This writes the server to ~/.codex/config.toml (global). To scope it to a project instead, add it to .codex/config.toml in your project root:

[mcp_servers.willow]
url = "https://yourorg.withwillow.ai/mcp"

Step 3: Verify the Server is Connected​

In a Codex TUI session, run:

/mcp

You should see willow listed with its Auth method, URL, and available tools.

Codex TUI /mcp output showing the Willow server with OAuth auth, URL, and full tools list

Step 4: Verify It Works​

Ask Codex:

"List what tools you have access to in Willow MCP"

Codex will inspect the available tool metadata and list them under the mcp__willow__ namespace.

The tools you see will depend on which MCP servers your organization admin has installed, which tools on those servers they have enabled, and what tools each MCP server exposes. Your list may look different from the one shown here.

Codex TUI showing Willow MCP tools listed under the mcp__willow__ namespace


Troubleshooting​

Server not listed after /mcp

  • Check that ~/.codex/config.toml has the correct [mcp_servers.willow] entry with url
  • Confirm the URL matches what the Connect MCP modal shows

OAuth login fails

  • Ensure you have accepted the invite from your admin
  • Re-run codex mcp login willow to redo the auth flow

Tools not available after authenticating

willow CLI fails with network/connection errors inside Codex

  • Codex's default workspace-write sandbox blocks outbound network, so the CLI can't reach the gateway. Enable network access — see Running inside OpenAI Codex.