Agents built on Cloudflare’s Agents SDK can connect to remote MCP servers. FastAF exposes one at **[https://api.fastaf.co/mcp](https://api.fastaf.co/mcp)** (Streamable HTTP).

## 1\. Connect the MCP server

Inside your Agent class, add FastAF as a remote MCP server and pass your FastAF API key as a bearer header (stored as a Worker secret, here `FASTAF_API_KEY`):

```
await this.addMcpServer("fastaf", "https://api.fastaf.co/mcp", {
  transport: {
    headers: { Authorization: `Bearer ${this.env.FASTAF_API_KEY}` },
  },
});
```

`addMcpServer(serverName, url, options)` with `options.transport.headers` is the signature in Cloudflare’s [MCP client API reference](https://developers.cloudflare.com/agents/model-context-protocol/apis/client-api/) and in the type definitions of the `agents` npm package (0.31.0), both checked on 28 Oct 2026.

The tool list is public. Tools include `google_search` (title, URL, snippet, position; `query`, optional `country`, `language`) and `scrape_url` (one public URL as markdown, `max_chars` 1,000–30,000, default 12,000). Every tool is annotated `readOnlyHint: true`. Calling a tool needs the API key: without it `/mcp` answers HTTP 401. x402 is not accepted on `/mcp`; to pay per call without an account, use the REST routes below.

## 2\. Or call the REST routes with x402

If your Worker already has an x402 client, call the routes directly. An unpaid request returns HTTP 402 with the price, asset (USDC) and network (Base, `eip155:8453`). Payment is settled only if the request succeeds.

```
const r = await fetch("https://api.fastaf.co/x402/v1/serp?query=" + encodeURIComponent(q));
if (r.status === 402) {
  // hand r to your x402 v2 client: it signs the PAYMENT-REQUIRED header and retries with PAYMENT-SIGNATURE
}
```

Prices start at $0.003 per call (serp, search, amazon, reddit). Full list in [https://api.fastaf.co/openapi.json](https://api.fastaf.co/openapi.json).

## 3\. Without a wallet

Create a free account at [https://fastaf.co/signup/](https://fastaf.co/signup/): 500 free credits every month after email verification, then optional prepaid credits.

Related: [Add FastAF to Claude Code, Codex and Cursor](/how-to/add-fastaf-claude-code-codex-cursor/) · [x402 discovery checklist](/how-to/x402-discovery-checklist/)

## Reference

*   [MCP server documentation](/docs/#mcp): every parameter and response field
*   [Docs](/docs/): authentication, errors, MCP and [x402](/docs/#x402)
*   [Pricing](/pricing/): credit packs from $10, without expiry

## Other sources

*   [How to read public Amazon data when your requests fail](/how-to/read-amazon-data/)
*   [How to read public Google Search data when your requests fail](/how-to/read-google-data/)
*   [How to read public Walmart data when your requests fail](/how-to/read-walmart-data/)
*   [How to read LinkedIn data with an API](/how-to/read-linkedin-data/)
*   [How to read public eBay data when your requests fail](/how-to/read-ebay-data/)
*   [How to read public Booking.com data when your requests fail](/how-to/read-booking-data/)
*   [How to read X profile data with an API](/how-to/read-x-data/)
*   [How to read public Zillow data when your requests fail](/how-to/read-zillow-data/)
*   [Pay-per-call web scraping for AI agents with x402](/how-to/x402-pay-per-call-web-scraping/)
*   [MCP servers for Amazon, SERP and web scraping](/how-to/best-mcp-servers-amazon-serp-scraping/)
*   [Cost per agent: monthly SaaS vs x402 pay-per-call](/how-to/cost-per-agent-saas-vs-x402/)
*   [How FastAF handles heavy pages and timeouts](/how-to/heavy-pages-timeouts/)
*   [x402 endpoint discovery checklist: how agents find a paid API (and how FastAF passes it)](/how-to/x402-discovery-checklist/)
*   [Add FastAF to Claude Code, Codex and Cursor](/how-to/add-fastaf-claude-code-codex-cursor/)
*   [How to detect poisoned or incomplete SERP results in AI agents](/how-to/detect-poisoned-incomplete-serp-results/)
*   [Cap agent spend per call with fixed x402 prices](/how-to/agent-spend-caps-per-call-pricing/)
*   [FastAF as a fallback search provider](/how-to/search-api-fallback-provider/)
*   [Budget a scraping job before you run it](/how-to/budget-scraping-job-fixed-prices/)
*   [Try FastAF for free, no card](/how-to/free-search-api-for-agents/)
*   [Too many MCP tools? Keep agent context small](/how-to/mcp-tool-schema-bloat/)
*   [How agents find an API (and where FastAF is)](/how-to/agent-discovery-files/)
*   [Why agent retries cost more than you think](/how-to/agent-tool-retry-cost/)
*   [All how-to guides](/how-to/)

## Compare

*   [FastAF vs SerpApi](/compare/serpapi/)
*   [FastAF vs Exa](/compare/exa/)
*   [FastAF vs Tavily](/compare/tavily/)
*   [FastAF vs Firecrawl](/compare/firecrawl/)
*   [FastAF vs Apify](/compare/apify/)
*   [FastAF vs toll402](/compare/toll402/)
*   [FastAF vs serp402](/compare/serp402/)
*   [FastAF vs AgentBIT](/compare/agentbit/)
*   [FastAF vs Amazon PA-API](/compare/amazon-pa-api/)
*   [FastAF vs Serper](/compare/serper/)
*   [FastAF vs ScrapingBee](/compare/scrapingbee/)
*   [FastAF vs ScraperAPI](/vs/scraperapi/)
*   [FastAF vs Bright Data](/vs/bright-data/)
*   [Benchmarks](/benchmarks/): latency and cost per 1,000 requests, measured

## Try it on your own request

500 free credits every month after email verification, no card.

[Start free](/signup/)[MCP server documentation](/docs/#mcp)

## Related

*   [How to read public Amazon data when your requests fail](/how-to/read-amazon-data/)
*   [How to read public Google Search data when your requests fail](/how-to/read-google-data/)
*   [How to read public Walmart data when your requests fail](/how-to/read-walmart-data/)
