Ornold
Back to blog
Guide14 min read

Codex + Ornold MCP: Browser Automation Setup Guide

Connect OpenAI Codex CLI or desktop app to Ornold MCP. Configure config.toml and automate antidetect browsers with AI.
Apr 17, 2026

What You'll Build

By the end of this guide you'll have OpenAI Codex — both the CLI and the desktop app — controlling real antidetect browser sessions through Ornold MCP. Navigate pages, fill forms, solve CAPTCHAs, and manage multiple profiles, all via natural language. No scripts, no selectors.
This guide covers the Codex CLI (macOS, Windows, Linux) and the Codex desktop app (macOS Apple Silicon). Codex Cloud (ChatGPT web) uses a different workflow and doesn't need MCP — it's not covered here.

Codex CLI vs Codex App vs Codex Cloud

OpenAI offers Codex in three forms. Here's which one you need:
  • Codex CLI — Terminal-based agent. Runs locally via `codex` command. Supports MCP via config.toml. Works on macOS, Windows, and Linux.
  • Codex App — Desktop application for macOS (Apple Silicon). Visual interface with the same MCP support as the CLI.
  • Codex Cloud — Browser-based agent inside ChatGPT. Connects to GitHub repos directly. Does NOT use MCP — tasks run in OpenAI's cloud sandbox.
This guide covers the CLI and the App. Both connect to Ornold MCP the same way — through config.toml.

Prerequisites

  • A computer running macOS 12+, Windows 10/11, or Linux
  • An OpenAI API key or ChatGPT Plus/Pro/Team subscription
  • An antidetect browser installed: Linken Sphere, Dolphin Anty, Wadex, or Vision Browser
  • Node.js 20+ installed (see Step 1)

Step 1 — Install Node.js

Ornold MCP runs as a Node.js package. You need Node.js version 20 or higher.

macOS

The easiest way is Homebrew:
brew install node@22

Windows

Download the LTS installer from nodejs.org (22.x). Run it and make sure "Add to PATH" is checked.

Linux

# Ubuntu/Debian curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt-get install -y nodejs # Or use nvm nvm install 22
Verify:
node --version # v22.x.x or higher npm --version # 10.x.x or higher
Terminal showing node --version output v22
Confirm Node.js is installed correctly

Step 2 — Install Codex

Option A: Codex CLI

Install the Codex CLI globally via npm:
npm install -g codex
Launch it to verify and authenticate:
codex # Sign in with your OpenAI API key when prompted
You can also set the OPENAI_API_KEY environment variable instead of signing in interactively.
🖼️
Codex CLI running in the terminal

Option B: Codex Desktop App

Download the Codex app from openai.com/codex (macOS Apple Silicon only). Install it, open it, and sign in with your ChatGPT account or OpenAI API key. Select a project folder when prompted.
The Codex app reads the same config.toml as the CLI, so MCP setup works identically for both.

Step 3 — Create an Ornold Account

Ornold is the bridge between AI agents and antidetect browsers.
  • Go to mcp.ornold.com
  • Click "Register" and create an account with your email
  • Verify your email with the 6-digit code
  • You'll land on the dashboard
Ornold MCP registration page with email and password fields
Create your Ornold account at mcp.ornold.com

Step 4 — Create an API Token

In the dashboard, create your first API token:
  • Enter a name for your token (e.g., "Codex")
  • Click "Create"
  • Copy the token — you'll need it next
Ornold dashboard showing token creation modal with copy button
Create and copy your API token
Free accounts get 1 seat, 5 captcha solves (after the dashboard tour), and access to standard browsers.

Step 5 — Generate MCP Config with the Dashboard Wizard

The Ornold dashboard has a built-in Connect Wizard that generates the exact MCP config for your setup. No manual command crafting needed — just pick your options and copy the result.
Go to the API Tokens tab in the dashboard. Find your token and click the "Connect" button next to it.
Ornold dashboard API Tokens page with Connect button highlighted next to a token
Click "Connect" on your token to open the wizard

Wizard Step 1 — Choose Your AI Agent

The wizard asks which AI agent you're using. Select "Codex" from the list. The wizard will generate config in TOML format (config.toml) instead of JSON. Other supported agents include Claude Code, Cursor, VS Code, Windsurf, and Cline.
🖼️
Step 1: Select Codex as your AI agent

Wizard Step 2 — Choose Interaction Mode

Pick how the AI should interact with browser pages:
  • DOM mode (default) — The AI reads the page HTML structure. Each element gets a [ref=N] marker. Free and fast. Best for forms, structured pages, and standard websites.
  • Vision AI mode — The AI takes a screenshot and visually finds elements by how they look. Works on any page, even canvas-based UIs. Each analysis costs 1 vision credit.
  • Both modes — All tools available. The AI picks the best approach for each action automatically.
Start with DOM mode. It's free, fast, and handles 90% of use cases. You can always switch to "Both" later if you need visual analysis.
Connect wizard step 2 showing three interaction mode options: DOM, Vision AI, Both
Step 2: Choose DOM mode for most use cases

Wizard Step 3 — Enable Antidetect Browsers

Toggle on the browsers you use and fill in their connection details:
  • Linken Sphere — Just set the API port (default: 40080). Make sure Sphere is running.
  • Dolphin Anty — Set the local port (default: 3001) and paste your Dolphin API token from Settings → API.
  • Wadex — Set the API port (default: 8080).
  • Vision Browser — Paste your X-Token. Optionally set a local port.
You can enable multiple browsers at once. The MCP config will include all of them, and the AI agent will be able to control whichever is running.
Connect wizard step 3 showing browser toggles with Linken Sphere enabled and port field filled in
Step 3: Enable your antidetect browsers and fill in ports

Wizard Step 4 — Copy the Config

The wizard generates the final config based on your choices. For Codex, you get a ready-to-paste TOML block for config.toml. Click "Copy" to grab it.
🖼️
Step 4: Copy the generated TOML config
The wizard pre-fills your actual token and port values — just click "Copy" and paste into config.toml. No manual editing needed.

Step 6 — Add Ornold MCP to Codex

You have two ways to add the MCP server — through the Codex App GUI or by editing config.toml manually. Both methods produce the same result.

Option A: Through the Codex App Interface (recommended)

If you're using the Codex desktop app, you can add MCP servers directly from the settings UI — no file editing needed.
  • Open the Codex app and click the gear icon (⚙️) in the top-right corner
  • Go to Integrations & MCP section
  • Click "Add Server" or "Add Custom Server"
🖼️
Open Settings → Integrations & MCP in the Codex app
In the server configuration form, fill in:
  • Server name: ornold-browser
  • Transport: stdio
  • Command: npx
  • Arguments: ornold-mcp --token YOUR_TOKEN --linken-port 40080 (adjust for your browser)
🖼️
Fill in the MCP server details — name, command, and arguments
Click "Save" or "Add". The Ornold MCP server will appear in your server list. Codex loads it automatically on next session.
🖼️
Ornold MCP server added and ready in the Codex app
Settings are stored in config.toml under the hood, so they sync automatically between the Codex App, CLI, and IDE extension.

Option B: Edit config.toml Manually (CLI users)

If you prefer the CLI or want to set up Codex on a headless server, edit the config file directly:
# macOS / Linux ~/.codex/config.toml # Windows %USERPROFILE%\.codex\config.toml
Paste the MCP server block from the wizard. Here's what it looks like for Linken Sphere:
# ~/.codex/config.toml [mcp_servers.ornold-browser] command = "npx" args = ["ornold-mcp", "--token", "YOUR_TOKEN", "--linken-port", "40080"]
For Dolphin Anty, the args include the Dolphin token:
[mcp_servers.ornold-browser] command = "npx" args = ["ornold-mcp", "--token", "YOUR_TOKEN", "--dolphin-port", "3001", "--dolphin-token", "YOUR_DOLPHIN_TOKEN"]
For multiple browsers at once:
[mcp_servers.ornold-browser] command = "npx" args = ["ornold-mcp", "--token", "YOUR_TOKEN", "--linken-port", "40080", "--dolphin-port", "3001", "--dolphin-token", "DOLPHIN_KEY", "--wadex-port", "8080"]

Option C: One-liner via CLI

You can also add the server with a single terminal command:
codex mcp add ornold-browser -- npx ornold-mcp --token YOUR_TOKEN --linken-port 40080
All three methods write to the same config.toml. Pick whichever feels most comfortable — the result is identical.

Step 7 — Start Your Browser and Launch Codex

Make sure your antidetect browser is running, then launch Codex:

CLI

codex

Desktop App

Open the Codex app. Select "Local" mode. MCP servers from config.toml load automatically.
Codex will detect the Ornold MCP server and show the available browser tools. Now talk to it:
# Start a Linken Sphere session > Start a new Linken Sphere session and open google.com # Fill a form > Navigate to example.com/signup, fill email "test@mail.com" and password "Pass123", click Sign Up # Solve a CAPTCHA > There's a CAPTCHA on this page, solve it # Multi-session > Start 3 Linken Sphere sessions and open google.com in all of them # Visual analysis > Take a screenshot and describe what you see on the page
🖼️
Codex controlling Linken Sphere through Ornold MCP

Available MCP Tools

Once connected, Codex has access to 40+ browser automation tools:
  • linken_start_instances / dolphin_start_profiles — Start browser sessions
  • browser_parallel_navigate — Open URLs in all active browsers
  • browser_parallel_snapshot — Get page DOM with clickable [ref=N] markers
  • browser_parallel_click — Click elements by ref or selector
  • browser_parallel_fill — Type text into input fields
  • browser_parallel_screenshot — Capture screenshots of all sessions
  • browser_parallel_vision_analyze_grouped — AI-powered visual page analysis
  • browser_solve_captcha — Auto-solve reCAPTCHA, hCaptcha, Turnstile, and more
  • browser_parallel_evaluate — Run JavaScript in page context
  • linken_stop_instances / dolphin_stop_profiles — Close sessions
You don't need to memorize tool names. Just describe what you want in plain language — Codex picks the right tools automatically.

Tool Approval Policy

Codex has three approval modes that control how it runs tools:
  • "untrusted" — Codex asks permission before every tool call (safest, default)
  • "on-request" — Codex asks only for destructive or unknown tools
  • "never" — Codex runs all tools without asking (fastest, use with caution)
Set the default in config.toml:
# ~/.codex/config.toml approval_policy = "on-request"
Or override per-tool for Ornold:
[mcp_servers.ornold-browser.tools.browser_parallel_navigate] approval_mode = "approve" [mcp_servers.ornold-browser.tools.browser_solve_captcha] approval_mode = "approve"

Troubleshooting

  • "npx: command not found" — Node.js not in PATH. Restart terminal after installation.
  • "codex: command not found" — Run `npm install -g codex` again. On macOS, you may need `sudo`.
  • "Cannot connect to Linken Sphere" — Make sure Sphere is running and the API port is correct (default 40080).
  • "Token invalid" — Copy the token again from mcp.ornold.com. Make sure you got the full string.
  • "MCP server not loading" — Check config.toml syntax. TOML is sensitive to formatting. Use a TOML validator if unsure.
  • "CAPTCHA solve failed" — Check your captcha credit balance on the Ornold dashboard.
  • Codex App can't find config — Make sure config.toml is at ~/.codex/config.toml (not inside a project folder).

What's Next?

Related posts