How to Use the Kinde (Modern Authentication) MCP in Mastra AI
Build reliable, multi-step Kinde user onboarding workflows with Mastra AI's fault-tolerant agent framework.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Kinde (Modern Authentication) MCP to Mastra AI
Create your Vinkius account to connect Kinde (Modern Authentication) 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 Complex User Onboarding
This server provides the tools to fully automate Kinde user provisioning. A Mastra AI workflow can call `create_organization` for a new customer, and then immediately call `create_user` to add the first admin to that org. Here's the thing: network requests fail. Mastra AI's workflow engine has automatic retries with exponential backoff built-in. If the `create_user` call fails, it will try again, making your onboarding sequence much more robust.
Update and Verify in One Workflow
Use the `update_user` tool to change a user's roles or details. In a standard script, you'd just hope it worked. With Mastra AI, you can build a workflow that makes the change and then immediately follows up with `get_user` to confirm the update was applied correctly. If the verification step fails, your workflow can automatically trigger an alert or a rollback procedure. It's a smarter way to handle critical identity operations.
Your Kinde MCP Server Toolkit
This isn't just one or two functions, it's a full set of identity management tools for your agent. Before creating a user, your Mastra AI agent can use `list_organizations` to find the right one, or use `list_roles` to present options to a human for approval. This MCP server gives your agent the context it needs to make correct decisions. Mastra AI provides the engine to chain those decisions into a reliable, automated process.
Set up Kinde (Modern Authentication) 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 Kinde (Modern Authentication) 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: "kinde-modern-authentication-mcp-client",
servers: {
"kinde-modern-authentication-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Kinde (Modern Authentication) Agent",
model: openai("gpt-4o"),
instructions: "You have access to Kinde (Modern Authentication) tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Kinde (Modern Authentication) 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 Kinde. 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 Kinde (Modern Authentication) MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Kinde (Modern Authentication) MCP today
We host it, we monitor it, we maintain it. You just paste one token.