How to Use the Gupshup Messaging MCP in Mastra AI
Build resilient WhatsApp workflows with Mastra AI agents that handle Gupshup failures with automatic retries.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Gupshup Messaging MCP to Mastra AI
Create your Vinkius account to connect Gupshup Messaging 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 WhatsApp workflows with Mastra AI agents
This Gupshup Messaging MCP Server connects `send_text_message` and `send_reaction` directly to Mastra AI's workflow engine. If a customer sends a message, your agent analyzes the sentiment, reacts with an emoji, and drafts a reply in a single, multi-step pipeline. You can build conditional branches that check if a message went through. If the Gupshup API returns a rate limit error, Mastra AI automatically retries with exponential backoff before alerting your support team.
Handle structured WhatsApp interactions in stateful pipelines
The `send_interactive_message` tool allows Mastra AI agents to present users with quick-reply buttons during complex MCP workflows. When a user steps through a billing or shipping update, the agent determines if they need a yes/no prompt and fires the payload. Because Mastra AI tracks step execution, you can pause the workflow until the user clicks a button. The agent resumes the exact state once the Gupshup webhook registers the response.
Manage dynamic templates with human-in-the-loop approval
The `send_template_message` and `get_template_info` tools let your Mastra AI agent fetch approved templates and fill them with CRM variables. You can configure the `requireToolApproval` flag to force a human admin to review marketing templates before they go out. This prevents automated spam and protects your WhatsApp quality score. Your agent prepares the parameters, pauses for approval, and triggers the dispatch once authorized.
Set up Gupshup Messaging 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 Gupshup Messaging 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: "gupshup-messaging-mcp-client",
servers: {
"gupshup-messaging-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Gupshup Messaging Agent",
model: openai("gpt-4o"),
instructions: "You have access to Gupshup Messaging tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Gupshup Messaging 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 Gupshup. 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 Gupshup Messaging MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Gupshup Messaging MCP today
We host it, we monitor it, we maintain it. You just paste one token.