# Vercel AI SDK + Dizo

> Use Dizo tools in a Vercel AI SDK app via the MCP client and stream B2B data into a TypeScript agent.

Type: MCP client — server URL `https://mcp.dizo.ai/mcp`. No native app needed.

## Steps
1. `npm i ai @ai-sdk/anthropic`
2. Create an MCP client with the HTTP transport.
3. Pass `await mcp.tools()` to `generateText` or `streamText`.

## route.ts
```
import { experimental_createMCPClient as createMCPClient, generateText } from "ai";
import { anthropic } from "@ai-sdk/anthropic";

const mcp = await createMCPClient({
  transport: {
    type: "http",
    url: "https://mcp.dizo.ai/mcp",
    headers: { Authorization: `Bearer ${process.env.DIZO_API_KEY}` },
  },
});

const { text } = await generateText({
  model: anthropic("claude-sonnet-5-5"),
  tools: await mcp.tools(),
  maxSteps: 8,
  prompt: "Enrich acme.com and list its marketing leaders with emails.",
});
await mcp.close();
```

## Notes
- Run this server-side only. Never ship a Dizo key to the browser.

## Related API docs
- [/docs/company-enrich](https://dizo.ai/docs/company-enrich.md)
- [/docs/org-chart](https://dizo.ai/docs/org-chart.md)
- [/docs/email-find](https://dizo.ai/docs/email-find.md)
