How to Use the Freshsuccess MCP in Mastra AI
Build conditional customer success workflows that react to Freshsuccess churn alerts using Mastra AI.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Freshsuccess MCP to Mastra AI
Create your Vinkius account to connect Freshsuccess 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.
Route Freshsuccess Alerts with Mastra AI
High-value accounts rarely churn without warning. By connecting the Freshsuccess MCP Server to Mastra AI, you build workflows that catch these warnings early. Your agent polls `list_cs_alerts` and evaluates the severity of each drop in usage. This is where conditional branching takes over. If the alert indicates critical health degradation, the workflow calls `list_cs_tasks` to assign an immediate review to the account manager. Should the task creation fail, Mastra automatically retries with exponential backoff.
Chain Custom Metric Updates
Tracking complex user behavior requires multiple API calls in sequence. Your agent reads the current tracking definitions using `list_custom_metrics` before deciding what to record. It verifies the exact metric ID required for the specific user action. Once it knows the right ID, the agent executes `post_metric_value` to log the event. If the API rate limits the request, the Mastra AI workflow engine pauses and tries again. You get perfectly accurate usage data without writing custom retry logic.
Require Approval for Account Changes
You probably do not want an autonomous script overwriting enterprise account details. When you configure the MCP server in your Mastra setup, you enable human-in-the-loop validation for destructive actions. When the agent attempts to run `upsert_cs_account` or `upsert_cs_user`, the workflow pauses. A human reviews the proposed CRM changes. Once approved, the agent completes the sync and calls `get_account_health` to verify the update succeeded.
Set up Freshsuccess 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 Freshsuccess 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: "freshsuccess-mcp-client",
servers: {
"freshsuccess-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Freshsuccess Agent",
model: openai("gpt-4o"),
instructions: "You have access to Freshsuccess tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Freshsuccess 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 Freshsuccess. 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 Freshsuccess MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Freshsuccess MCP today
We host it, we monitor it, we maintain it. You just paste one token.