How to Use the Listrak MCP in Mastra AI
Build resilient, self-healing Listrak workflows with Mastra AI agents that handle API retries and conditional branching.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Listrak MCP to Mastra AI
Create your Vinkius account to connect Listrak 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.
Automate Listrak SMS broadcasts with Mastra AI
The `send_sms_broadcast` tool initiates immediate mobile campaigns through your automated Mastra AI agent workflows. If a marketing trigger fires, the Mastra AI agent evaluates campaign performance and dispatches the Listrak broadcast text. Mastra AI manages the execution state of the Listrak API call. If the Listrak API returns a temporary timeout, the workflow engine retries the broadcast automatically using built-in exponential backoff, preventing failed deliveries.
Sync email contact details across workflows
The `get_email_contact_details` tool retrieves customer profiles to inform downstream decisions in your Mastra AI pipelines. The Mastra AI agent reads the subscriber's status and uses conditional branching to route them to the correct Listrak list. If the Listrak contact details show an inactive status, the Mastra AI agent branches to trigger `subscribe_to_sms_list`. This ensures your Listrak records stay synchronized inside your Mastra AI pipeline without manual developer intervention.
Build human-in-the-loop approvals for MCP Server actions
The `send_transactional_email` tool can be gated behind human approval within your Mastra AI workflows. Before the agent executes the Listrak tool, Mastra AI pauses the workflow and waits for an admin to confirm. This setup protects your Listrak sender reputation during automated Mastra AI workflow runs. You prevent the MCP Server from sending incorrect transactional messages to Listrak customers while maintaining automated system triggers.
Set up Listrak 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 Listrak 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: "listrak-mcp-client",
servers: {
"listrak-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Listrak Agent",
model: openai("gpt-4o"),
instructions: "You have access to Listrak tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Listrak 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 Listrak. 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 Listrak MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Listrak MCP today
We host it, we monitor it, we maintain it. You just paste one token.