How to Use the CallFire MCP in Mastra AI
Build resilient MCP Server communication workflows and auto-retry failed texts with Mastra AI.
Works with every AI agent you already use
…and any MCP-compatible client
Connect CallFire MCP to Mastra AI
Create your Vinkius account to connect CallFire 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.
Execute Conditional Messaging Pipelines
The `send_sms` tool dispatches text alerts exactly when your workflow rules dictate. Mastra AI evaluates the surrounding logic, such as a failed credit card charge, and triggers the message. If the carrier network drops the request, the framework's built-in exponential backoff automatically tries again. Running `get_account_info` verifies available funds before firing off a massive broadcast. Mastra handles that conditional branching natively. This ensures your agent never initiates a campaign it cannot afford.
Automate Voice Call Fallbacks with Mastra AI
The `send_voice_call` tool initiates an automated phone call when an urgent situation escalates. Your workflow engine monitors the outcome and decides the next step based on the result. If a critical alert goes to voicemail, the agent instantly pivots and sends a text message fallback. Running `get_call_details` returns the duration, cost, and hangup cause for a specific interaction. The framework uses that hard data to route the user down different paths. You can program the agent to schedule a follow-up or close the ticket based on the actual call length.
Audit Webhooks and Rented Keywords
The `list_keywords` tool exposes every short code and text string you currently lease for incoming traffic. Mastra AI can periodically audit this list against your active marketing campaigns. If a keyword is sitting idle, the agent flags it for a human manager to review and cancel. Executing `list_webhooks` pulls the current routing table for all inbound replies. You can require tool approval before the agent modifies these endpoints. This keeps a strict human-in-the-loop safety net over your production infrastructure.
Set up CallFire 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 CallFire 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: "callfire-mcp-client",
servers: {
"callfire-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "CallFire Agent",
model: openai("gpt-4o"),
instructions: "You have access to CallFire tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent CallFire 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 CallFire. 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 CallFire MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the CallFire MCP today
We host it, we monitor it, we maintain it. You just paste one token.