OpenAI Codex
Add a screenshot tool to Codex with Grabbit MCP
Codex supports remote Streamable HTTP MCP servers and shares MCP configuration across the CLI, IDE extension, and desktop app on the same host.
Prerequisites
From setup to the first capture
- Codex CLI or IDE extension installed
- A Grabbit account or API key
- A public target URL
codex mcp add grabbit --url https://mcp.grabbit.live
codex mcp login grabbit
codex mcp listCodex supports OAuth. For a static key, set bearer_token_env_var = "GRABBIT_API_KEY" in the grabbit table in ~/.codex/config.toml.
A test key returns a placeholder for wiring. The visual check below requires a live key and available credits. Call get_usage before a run when the agent needs to avoid an HTTP 402 interruption.
Call grab and inspect the result
Use Grabbit to capture https://example.com and check whether the main CTA is visible above the fold.Expected result
Codex discovers the Grabbit tools, calls grab, and receives the capture record plus a hosted image result.
Image handling
Codex can work with tool-returned image content where the current surface supports it. image_url is the portable result for scripts and reports.

Troubleshooting
401 or authentication required
Complete the client OAuth flow, or check that the environment variable contains a current sk_ key.
The target URL is rejected
Use a public HTTP or HTTPS URL. Grabbit blocks localhost, private, link-local, and internal network targets.
The image is a placeholder
An sk_test_ key proves the integration without spending credits. Use an sk_live_ key when you need a real render.
402 credits_exhausted
Call get_usage, then add a separately purchased top-up or wait for the next annual subscription grant before retrying.
Security note
Keep Bearer tokens in environment variables. Review a project before trusting its .codex/config.toml.
Hosted screenshots without a browser in the agent runtime
A local headless browser means installing Chromium, keeping its dependencies current, bounding memory use, and handling timeouts. Grabbit runs the screenshot step on hosted rendering infrastructure and returns an image URL.
Local headless browser
- Needs Chromium installed in the agent's runtime
- Cookie and consent handling belongs to your automation
- You own the timeouts, retries, and scaling
- Breaks in CI, sandboxes, and remote runners with no browser
Grabbit
- One call, nothing to install or run
- Dismisses cookie and consent banners automatically
- Handles lazy-loaded, JavaScript-heavy, and full-page captures
- Runs from CI or sandboxes without a local browser install
Grabbit accepts public pages and supports cookie-banner handling, delayed JavaScript, selector targeting, and full-page output. Target sites can still reject automated traffic, and private or internal addresses are blocked.
Flat pricing, built for agents that loop
When an agent captures a page on every step, per-call metering turns into anxiety. Grabbit is one flat rate: $50 per year for 25,000 captures ($0.002 each). Annual subscription credits expire at term end; separately purchased top-ups do not expire while your account remains active. Test-environment keys render placeholders for integration checks. A real page capture needs a live key and available credits.
OpenAI Codex FAQ
- Where does Codex store MCP configuration?
- The default is ~/.codex/config.toml. Trusted projects can also use .codex/config.toml.
- Does the IDE extension need separate setup?
- No. OpenAI documents shared MCP configuration for the desktop app, Codex CLI, and IDE extension on the same host.
Give OpenAI Codex eyes in two minutes
Free wiring test, one install, then your agent can screenshot public pages with a live key.