How to Use the CleverTap MCP in Mastra AI
Automate your CleverTap operations with durable, multi-step workflows using Mastra AI.
Works with every AI agent you already use
…and any MCP-compatible client
Connect CleverTap MCP to Mastra AI
Create your Vinkius account to connect CleverTap to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Automated Campaign Audits
Set up a Mastra AI agent to run daily checks on your campaigns. It can use `list_clevertap_campaigns` to get the current list, then loop through each one calling `get_campaign_performance_report` to check its metrics against your targets. Here's the thing: Mastra's workflow engine lets you add conditional logic. If a campaign's click-through rate is too low, the agent can automatically trigger another action, like sending a Slack message or creating a Jira ticket. You define the rules, the agent does the work.
Resilient User Data Syncs
Use a Mastra agent to sync user data between systems. The agent can grab a user's details with `get_user_profile_details` from CleverTap and push updates to another service, like your CRM. If that sync fails because of a network hiccup, Mastra’s automatic retries with exponential backoff kick in. You don't have to write that logic yourself. It makes your backend automations far more reliable.
Build CleverTap Workflows with an MCP Server
This isn't just about single API calls. You can build complex, multi-step jobs. For example, have an agent `list_clevertap_segments`, then for a specific high-value segment, pull a sample of user profiles via `get_user_profile_details` to check for data integrity. Once you build a workflow, you deploy it with a single command. Mastra handles the packaging and deployment, so your CleverTap automation runs reliably in the cloud. This MCP Server connects your agent directly to the data it needs to operate.
Set up CleverTap MCP in Mastra AI
Prerequisites
- Node.js 18+ and a TypeScript project
-
@mastra/mcp+@mastra/corepackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install @mastra/mcp @mastra/coreplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Configure the MCPClient
Create an
MCPClientwith your Vinkius endpoint as aURLobject. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and inject tools
Call
mcpClient.listTools()and spread the result into your agent'stoolsobject. All CleverTap tools become native Mastra tools. - 4
Run with any model
Swap
openai("gpt-4o")for any AI SDK-compatible provider. Callagent.generate()and the agent routes tool calls through MCP automatically.
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";
const mcpClient = new MCPClient({
id: "clevertap-mcp-client",
servers: {
"clevertap-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "CleverTap Agent",
model: openai("gpt-4o"),
instructions: "You have access to CleverTap tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent CleverTap transactions"
);
console.log(result.text); 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 Mastra AI
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.