[ docs ]MCP · SDK
Vercel AI SDK
An MCP client with the streamable HTTP transport hands the tools to any model.
API key
Setup
Create the client once and pass its tools to generateText or streamText.
TypeScriptimport { experimental_createMCPClient as createMCPClient, generateText } from "ai"; import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; const mcp = await createMCPClient({ transport: new StreamableHTTPClientTransport(new URL("https://api.zomler.com/mcp"), { requestInit: { headers: { Authorization: `Bearer ${process.env.ZOMLER_API_KEY}` } }, }), }); const { text } = await generateText({ model: "anthropic/claude-fable-5-1", tools: await mcp.tools(), prompt: "Compare @example and @sample on Instagram.", }); await mcp.close();
What you get
One tool per platform, plus capabilities and check_balance, at https://api.zomler.com/mcp. Every answer is the envelope: what was measured, when, what was left out and why, and what it cost. Fresh fetches spend credits; anything already held is free.
Keys are created under API keys in the dashboard, where each one's calls and spend are listed. Revoking a key stops this client on its next call. The same key also calls the REST API.