Skip to main content

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

Alternatively, restart Codex, run /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

Set SGAI_API_KEY in your environment and point Codex at it:
A request carrying an API key skips the OAuth flow, so there is no codex mcp login step.

Verify

Then ask Codex to run the credits tool. A balance response confirms that authentication and tool execution both work.
See the tool reference for everything the server exposes.