# Web search and page reading for CrewAI

> Add Clawifi’s hosted MCP server to a CrewAI agent and it can search the web, read pages and PDFs, and get only the passages that answer each question, with sources.

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

## What Clawifi gives CrewAI

CrewAI agents take MCP servers straight from the `mcps` field. Clawifi’s hosted server gives them search, page reading, maps and crawls with no tool code to write.

- **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. Install CrewAI with MCP support

CrewAI’s MCP integration needs the `mcp` library ([CrewAI MCP docs](https://docs.crewai.com/en/mcp/overview)).

**Terminal**

```sh
pip install -U crewai mcp
```

### 3. Add Clawifi to an agent

Use `MCPServerHTTP` with the hosted URL and your key in an `Authorization` header, as CrewAI’s structured configuration shows.

**crew.py**

```python
import os

from crewai import Agent, Crew, Task
from crewai.mcp import MCPServerHTTP

researcher = Agent(
    role="Web researcher",
    goal="Answer questions from current web sources, with links",
    backstory="Reads pages before answering",
    mcps=[
        MCPServerHTTP(
            url="https://api.clawifi.dev/mcp",
            headers={"Authorization": f"Bearer {os.environ['CLAWIFI_API_KEY']}"},
            streamable=True,
        ),
    ],
)
task = Task(description="Find the latest MCP specification changes and summarise them.", expected_output="A short summary with links", agent=researcher)
print(Crew(agents=[researcher], tasks=[task]).kickoff())
```

### 4. Run it

Set `CLAWIFI_API_KEY` and your model provider’s key, then run the script.

Sources for this setup: [CrewAI MCP docs](https://docs.crewai.com/en/mcp/overview) · [Remote MCP](https://clawifi.dev/docs/remote-mcp) · [MCP tools](https://clawifi.dev/docs/mcp-tools). Clawifi works with CrewAI; it is not affiliated with its makers.

Reference: [MCP tools](https://clawifi.dev/docs/mcp-tools) lists every tool, the [CLI](https://clawifi.dev/docs/cli) checks a key and prints MCP config, and [Rate limits and plans](https://clawifi.dev/docs/rate-limits) shows how many calls run at once on each plan.

## Example prompts

> Search the web for the three newest papers on agent memory and read their abstracts.

> Read https://docs.crewai.com/en/mcp/overview and return only the passages about authentication.

> Map https://docs.python.org/3/library/ and list the pages that cover asyncio.

## Questions

### How do I use Clawifi in CrewAI?

Add `MCPServerHTTP(url="https://api.clawifi.dev/mcp", headers={"Authorization": "Bearer <your key>"})` to an agent’s `mcps` list.

### Can I use it without a key?

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.

### Which tools does the agent get?

Every tool the hosted server offers: search, page and PDF reading, passage selection, maps and crawls. They are listed on [MCP tools](https://clawifi.dev/docs/mcp-tools).

### What does it cost?

Each tool call is billed like the API route it runs: most cost 1 credit and a browser render 3. Cache hits, failures on Clawifi’s side and answers with nothing to read (a blocked page, a JavaScript shell, a 404) cost 0. The Free plan includes 1,000 credits a month. See [Pricing](https://clawifi.dev/pricing).

Related comparisons: [Clawifi vs Brave Search API](https://clawifi.dev/compare/brave-search-api) · [Clawifi vs Exa](https://clawifi.dev/compare/exa) · [Clawifi vs Tavily](https://clawifi.dev/compare/tavily).

## Other agents and frameworks

- [Clawifi for Open WebUI](https://clawifi.dev/for/open-webui): Add Clawifi to Open WebUI as an MCP tool server, and your models can search the web, read pages and PDFs, and get back the passages that answer each question, with sources.
- [Clawifi for Pydantic AI](https://clawifi.dev/for/pydantic-ai): Give a Pydantic AI agent Clawifi’s MCP tools in a few lines, and it can search the web, read pages and PDFs, and get back the passages that answer each question, with sources.
- [Clawifi for Mastra](https://clawifi.dev/for/mastra): Connect a Mastra agent to Clawifi’s hosted MCP server with MCPClient, and it can search the web, read pages and PDFs, and get back 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)
