How to Use the QingFlow MCP in Mastra AI
Build resilient, multi-step BPM workflows using Mastra AI and the QingFlow MCP server.
Works with every AI agent you already use
…and any MCP-compatible client
Connect QingFlow MCP to Mastra AI
Create your Vinkius account to connect QingFlow to Mastra AI — we handle the hosting, security, and runtime updates so you don't have to. No server setup required.
Key Capabilities
Mastra AI Conditional Approval Pipelines
The `get_workflow_status` tool allows Mastra AI agents to monitor active approval chains and trigger secondary code paths based on the current state. If a record stalls in a pending queue, your Mastra workflow automatically shifts gears. You can program the agent to run `list_users` to find an alternative manager, then use `update_record` to reassign the task. This programmatic routing keeps business processes moving without requiring manual human intervention.
Automated Error Recovery for Record Creation
Executing `create_record` through Mastra AI guarantees that database insertion failures are met with immediate, structured retries. The framework uses exponential backoff to handle transient network issues when writing to QingFlow. If the write fails repeatedly, Mastra runs a fallback step to log the payload locally and alerts the admin team. This prevents data loss when importing high volumes of business records into your BPM application.
Multi-App Schema Synchronization
Your Mastra agent calls `get_app_schema` to inspect the structure of multiple QingFlow apps before running sync operations via the MCP server. This step ensures that data mapped from external databases matches the exact field types expected by the destination app. If a schema mismatch occurs, the agent uses `list_apps` to verify if a compatible application exists elsewhere in the workspace. This automated validation saves hours of debugging broken API integrations.
Set up QingFlow 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 QingFlow 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: "qingflow-mcp-client",
servers: {
"qingflow-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "QingFlow Agent",
model: openai("gpt-4o"),
instructions: "You have access to QingFlow tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent QingFlow 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 QingFlow. 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 QingFlow MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the QingFlow MCP today
We host it, we monitor it, we maintain it. You just paste one token.