# Add DoubleCrawl to Vercel AI SDK

> Give apps built with the Vercel AI SDK web access that works when a plain fetch fails. One minute to set up, 5,000 free credits, pay only for delivered pages.

### 1. Install the MCP client

Add the AI SDK's MCP package:

```bash
npm install ai @ai-sdk/mcp
```

### 2. Load DoubleCrawl as tools

Use your API key from the dashboard ([get one with 5,000 free credits](https://doublecrawl.com/signup?utm_source=integration&utm_content=vercel-ai)):

```ts
import { createMCPClient } from '@ai-sdk/mcp';

const doublecrawl = await createMCPClient({
  transport: {
    type: 'http',
    url: 'https://mcp.doublecrawl.com/mcp',
    headers: { Authorization: `Bearer ${process.env.DOUBLECRAWL_API_KEY}` },
  },
});
const tools = await doublecrawl.tools();
```

### 3. Pass the tools to generateText

Give `tools` to `generateText` or `streamText` and close the client when you're done.

### Try asking

Summarise today's top stories on this news site in three sentences.

Web version: https://doublecrawl.com/integrations/vercel-ai.html
