How to Use the Flodesk MCP in Mastra AI
Build resilient, self-healing Flodesk automation pipelines using Mastra AI agents and conditional branching.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Flodesk MCP to Mastra AI
Create your Vinkius account to connect Flodesk 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.
Resilient Flodesk subscriber syncing
The `upsert_subscriber` tool updates or creates audience records inside Mastra AI workflows while automatically handling API rate limits. If a sync fails during a high-traffic launch, the built-in backoff engine retries the call without dropping the subscriber data. This MCP capability prevents broken workflows and ensures your customer data remains pristine. You can chain this with `get_subscriber` to verify the profile details before moving to the next step of your automated funnel.
Branching logic for Flodesk workflows
The `list_workflows` tool lets your Mastra AI agent inspect your available email sequences to make routing decisions. The agent can dynamically decide which sequence to run based on the subscriber's history and current status. Once the decision is made, `add_subscriber_to_workflow` triggers the correct sequence. If a subscriber is already in a conflicting campaign, the MCP tool logic lets the agent branch to a different path to avoid spamming them.
Automated segment curation with Mastra AI
The `list_segments` tool retrieves all active groups so your agent can audit and clean up your subscriber lists autonomously. If a segment is missing, the agent runs `create_segment` to build it on the fly without human intervention. It then uses `add_subscriber_to_segment` to sort users based on complex behavioral rules you define in TypeScript. This keeps your email lists clean without requiring manual filtering or exports.
Set up Flodesk 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 Flodesk 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: "flodesk-alternative-mcp-client",
servers: {
"flodesk-alternative-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Flodesk Agent",
model: openai("gpt-4o"),
instructions: "You have access to Flodesk tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Flodesk 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 Flodesk. 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 Flodesk MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Flodesk MCP today
We host it, we monitor it, we maintain it. You just paste one token.