Codex Setup
Add the following to~/.codex/config.toml:
The ChatGPT desktop app, Codex CLI, and the Codex IDE extension share the same MCP configuration on a given host, so this only needs to be done once.
Authenticate
/mcp, select sgai, and authenticate. Either way a browser window opens: choose Continue with Google and sign in with the Google account associated with your ScrapeGraphAI account.
Once the browser shows Authentication successful. Connected to sgai., return to Codex — the tools are ready.
With an API key instead
SetSGAI_API_KEY in your environment and point Codex at it:
codex mcp login step.
Verify
credits tool. A balance response confirms that authentication and tool execution both work.