Skip to content

Codex CLI

Connect OpenAI Codex CLI to the CoreClaw MCP Server so you can search for scrapers, run them, and retrieve data directly from your terminal conversations.

Codex CLI supports MCP via Streamable HTTP transport. You can configure it via a JSON config file.

Step 1: Create or edit the MCP configuration file

Section titled “Step 1: Create or edit the MCP configuration file”

Create a file named codex-mcp.json in your project directory (or anywhere you prefer):

{
"mcpServers": {
"coreclaw": {
"url": "https://mcp.coreclaw.com/mcp",
"headers": {
"api-key": "scraper_api_YOUR_KEY_HERE"
}
}
}
}

Replace scraper_api_YOUR_KEY_HERE with your actual CoreClaw API key.

Terminal window
codex --mcp-config codex-mcp.json

Alternatively, you can place the config at ~/.config/codex/mcp.json (macOS/Linux) or %APPDATA%\codex\mcp.json (Windows) for automatic loading.

  1. Start Codex with the MCP configuration
  2. Ask Codex: “Search for Amazon scrapers on CoreClaw”
  3. Codex should invoke search_scrapers and return results

Once connected, you can perform scraping tasks directly from your terminal:

You: Find a Twitter scraper and extract the latest tweets from @elonmusk

Codex: I’ll search for a Twitter scraper and run it for you. [Calls search_scrapersget_scraper_detailsrun_scraper → polls status → returns results]

  • Verify the JSON file path is correct when using --mcp-config
  • Ensure the JSON is valid (no trailing commas, proper quotes)
  • Check Codex CLI version — MCP support requires recent versions
  • Ensure the api-key header value matches your CoreClaw API key exactly
  • Verify your key is active in the Console
  • Confirm Codex CLI supports Streamable HTTP transport
  • Try restarting the Codex session after config changes