Vinkius
SuperTokens logo
Vinkius
Vinkius runs on Vercel AI SDK

How to Use the SuperTokens MCP in Vercel AI SDK

Streamline real-time authentication flows in your frontend using ai-sdk.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

SuperTokens MCP on Cursor AI Code Editor MCP Client SuperTokens MCP on Claude Desktop App MCP Integration SuperTokens MCP on OpenAI Agents SDK MCP Compatible SuperTokens MCP on Visual Studio Code MCP Extension Client SuperTokens MCP on GitHub Copilot AI Agent MCP Integration SuperTokens MCP on Google Gemini AI MCP Integration SuperTokens MCP on Lovable AI Development MCP Client SuperTokens MCP on Mistral AI Agents MCP Compatible SuperTokens MCP on Amazon AWS Bedrock MCP Support
MCP Servers — Included with Plan
Vinkius runs on Vercel AI SDK

Connect SuperTokens MCP to Vercel AI SDK

Create your Vinkius account to connect SuperTokens to Vercel AI SDK — we handle the hosting, security, and runtime updates so you don't have to. No server setup required.

GDPR Included with Plan

Key Capabilities

Handle Auth State Changes

The `signup_user` tool lets your agent create a new user record and immediately establish an authenticated session. This is critical for building live sign-up forms that don't require loading spinners. When the user signs in, calling `signin_user` refreshes their active credentials. Your AI client sees this data appear instantly, making the app feel fast and responsive.

Manage User Identity

You can fetch specific user details using the `get_user` tool by passing a unique ID. This lets your agent display user names or emails immediately upon connection. Need to adjust data? The `update_user_metadata` tool allows your client to change fields like 'department' or 'preferred name' directly, keeping your UI synchronized with the latest backend state.

Control Access and Roles

The `list_roles` tool provides a complete list of roles available across your platform. Your agent can use this to determine if a user has necessary permissions before showing them certain features. If you need an admin action, calling `create_or_update_role` lets the AI define or modify specific access rights for users.

Setup guide

Set up SuperTokens MCP in Vercel AI SDK

Prerequisites

  • Node.js 18+ and a TypeScript project
  • ai + @modelcontextprotocol/sdk packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run npm install ai @modelcontextprotocol/sdk plus your preferred model provider (e.g. @ai-sdk/openai).

  2. 2

    Create the Streamable HTTP transport

    Use StreamableHTTPClientTransport with your Vinkius endpoint URL. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Discover and use tools

    Call mcpClient.tools() to auto-discover all SuperTokens tools. Pass them directly to generateText() or streamText() — no manual schema definitions needed.

  4. 4

    Works with any model provider

    Swap openai("gpt-4o") for any AI SDK provider — Anthropic, Google, Mistral. The MCP tools work identically across all supported models.

index.ts
import { experimental_createMCPClient as createMCPClient } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";

const transport = new StreamableHTTPClientTransport(
  new URL("https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
);

const mcpClient = await createMCPClient({ transport });
const tools = await mcpClient.tools();

const { text } = await generateText({
  model: openai("gpt-4o"),
  tools,
  prompt: "List recent SuperTokens transactions",
});

console.log(text);
await mcpClient.close();

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by SuperTokens. 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 SuperTokens MCP in Vercel AI SDK

When you call `refresh_session` via your ai-sdk client, SuperTokens validates the existing token and returns a new one. This process ensures continuous access without forcing the user to log in again.
You'll use `link_accounts` to associate two separate accounts belonging to one person. Likewise, `unlink_accounts` allows your agent to sever those connections if the user changes their primary email or phone number.
Yep. You can use `get_tenant` to grab details about a specific multi-tenant environment. This is helpful when your application needs to isolate user actions within certain corporate boundaries.
Absolutely. You can use `list_user_roles` right after a sign-in event. This lets the calling agent check if the newly authenticated user has the necessary permissions to proceed.
This server handles `user metadata`, which includes any custom, non-core identifying information you attach to a user profile. This is often where things like employee IDs or preferred display names live.

Start using the SuperTokens MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 18 tools

We've already built the connector for SuperTokens. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 18 tools are live and waiting. You're up and running in seconds.

Vinkius runs on Claude Claude
Vinkius runs on ChatGPT ChatGPT
Vinkius runs on Cursor Cursor
Vinkius runs on Gemini Gemini
Vinkius runs on Windsurf Windsurf
Vinkius runs on VS Code VS Code
Vinkius runs on JetBrains JetBrains
Vinkius runs on Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.