# Web search and page reading for Codex

> Add Clawifi to Codex and it can search the web, read pages and PDFs, and return the passages that answer the question, each with its source.

Canonical page: https://clawifi.dev/for/codex

## What Clawifi gives Codex

Codex works through tasks in your repository. With Clawifi it can read the docs and changelogs those tasks depend on and cite what it read, instead of relying on what it remembers.

- **Search:** `search_free` searches many engines as one and returns ranked results with their sources.
- **Read:** `fetch_url` and `scrape_url` read pages and PDFs as Markdown; with a `query`, `scrape_url` returns only the passages that answer it.
- **Parse and discover:** `extract_url` pulls structured fields from a page; `map_site` lists a site’s URLs; `start_crawl` and `get_crawl` read several pages.
- **Jobs, history and monitors:** `create_job`, `get_job`, `list_history` and `list_monitors` for longer runs and scheduled checks.
- **Cost first:** `estimate` prices a call before it runs, and the account tools show your credits.

## Set it up

### 1. Get an API key

Create an account at [clawifi.dev/signup](https://clawifi.dev/signup). The Free plan includes 1,000 credits a month. Copy the key the console shows you (it is shown once) and keep it in an environment variable, `CLAWIFI_API_KEY`.

### 2. Add the hosted server

Add to your Codex config.toml; Codex sends CLAWIFI_API_KEY as the bearer token.

**config.toml**

```toml
[mcp_servers.clawifi]
url = "https://api.clawifi.dev/mcp"
bearer_token_env_var = "CLAWIFI_API_KEY"
```

### 3. Or run it locally

Install the package and add the local server with one command.

**Terminal**

```sh
pip install clawifi
codex mcp add clawifi --env CLAWIFI_API_KEY=your_key -- clawifi-mcp
```

### 4. Ask Codex

Start a new Codex session and give it a task that needs the web.

Sources for this setup: [Clients](https://clawifi.dev/docs/clients) · [Remote MCP](https://clawifi.dev/docs/remote-mcp). Clawifi works with Codex; it is not affiliated with its makers.

## Example prompts

> Use Clawifi to read the Django 5 release notes, find the deprecations that affect this codebase, and open a plan to fix them. Quote the passages you used.

> Search the web with Clawifi for the current GitHub Actions syntax for job concurrency, then update our workflow to cancel superseded runs.

> Read the README of https://github.com/encode/httpx with Clawifi and write a short summary of its timeout settings for our docs.

## Questions

### How do I add Clawifi to Codex?

Add `[mcp_servers.clawifi]` with `url = "https://api.clawifi.dev/mcp"` and `bearer_token_env_var = "CLAWIFI_API_KEY"` to your Codex `config.toml`, or run `codex mcp add clawifi --env CLAWIFI_API_KEY=your_key -- clawifi-mcp` for the local server.

### Where does Codex get the key?

With `bearer_token_env_var`, Codex reads the key from the `CLAWIFI_API_KEY` environment variable and sends it as the bearer token, so the key stays out of the file.

### Do I need a key to try it?

Without a key, `search_free`, `fetch_url`, `scrape_url` and `map_site` work on the hosted server as a trial: 12 calls a minute and 50 a day per address. A [free API key](https://clawifi.dev/signup) includes 1,000 credits a month and opens every tool.

### What does it cost?

Most calls cost 1 credit and a browser render 3. Cache hits and failures on Clawifi’s side cost 0; a page whose site answers with an error (such as a 404) is charged as usual. The Free plan includes 1,000 credits a month. See [Pricing](https://clawifi.dev/pricing).

## Other agents and frameworks

- [Clawifi for Claude Desktop](https://clawifi.dev/for/claude-desktop): Add Clawifi to Claude Desktop and Claude can search the web, read pages and PDFs, and quote the passages that answer your question, each with its source.
- [Clawifi for Hermes Agent](https://clawifi.dev/for/hermes-agent): Add Clawifi to Hermes Agent and it can search the web, read pages and PDFs, and bring back the passages that answer the question, each with its source.
- [Clawifi for n8n](https://clawifi.dev/for/n8n): Connect Clawifi to an n8n AI Agent through the MCP Client Tool node, and the agent can search the web, read pages and PDFs, and return the passages that answer each question, with sources.
- [All agent guides](https://clawifi.dev/for): Every client and framework.

Next: [Integrations](https://clawifi.dev/integrations) · [Docs](https://clawifi.dev/docs) · [Pricing](https://clawifi.dev/pricing)
