How to Use the CleverTap MCP in Vercel AI SDK
Build live dashboards with CleverTap data streaming straight into your UIs using the Vercel AI SDK.
Works with every AI agent you already use
…and any MCP-compatible client
Connect CleverTap MCP to Vercel AI SDK
Create your Vinkius account to connect CleverTap to Vercel AI SDK and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Live Campaign Metrics
Stop making your users wait for dashboards to load. When your frontend asks for campaign performance, the Vercel AI SDK streams data from `get_campaign_performance_report` directly into your components. You can build charts and tables that populate in real time. This gives you a live window into user activity. Your app can call `get_real_time_usage_stats` and show active user counts or event totals that update on the screen as they happen. It's a much better experience than a static number behind a refresh button.
On-Demand User Lookups
Build internal tools that feel instant. Let your support team look up a customer by calling `get_user_profile_details` and have their full CleverTap profile render immediately in your admin panel. There's no backend API to build or maintain. Your agent can also pull account-wide metadata for auditing or exploration. You can create a UI that uses `list_user_profile_properties` to show all defined attributes or `list_event_schemas` to check your tracking setup, all powered by your agent and this MCP Server.
Dynamic Reporting with the Vercel AI SDK
Let your users ask for what they want to see. Your agent can take a query like "show me all campaigns from Q2" and use `list_clevertap_campaigns` to stream the results directly into a report. The Vercel AI SDK handles the connection, you just render the data as it arrives. This works for any list-based data in your CleverTap account. Build an interface where a product manager can ask about defined segments and see the list from `list_clevertap_segments` appear right away. It's the fastest way to get CleverTap data into your frontend.
Set up CleverTap MCP in Vercel AI SDK
Prerequisites
- Node.js 18+ and a TypeScript project
-
ai+@modelcontextprotocol/sdkpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install ai @modelcontextprotocol/sdkplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Create the Streamable HTTP transport
Use
StreamableHTTPClientTransportwith your Vinkius endpoint URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and use tools
Call
mcpClient.tools()to auto-discover all CleverTap tools. Pass them directly togenerateText()orstreamText()— no manual schema definitions needed. - 4
Works with any model provider
Swap
openai("gpt-4o")for any AI SDK provider — Anthropic, Google, Mistral. The MCP tools work identically across all supported models.
import { experimental_createMCPClient as createMCPClient } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
const transport = new StreamableHTTPClientTransport(
new URL("https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
);
const mcpClient = await createMCPClient({ transport });
const tools = await mcpClient.tools();
const { text } = await generateText({
model: openai("gpt-4o"),
tools,
prompt: "List recent CleverTap transactions",
});
console.log(text);
await mcpClient.close(); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by CleverTap. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about CleverTap MCP in Vercel AI SDK
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the CleverTap MCP today
We host it, we monitor it, we maintain it. You just paste one token.