Use TokPortal from Vercel AI SDK
Connect Vercel AI SDK to the TokPortal MCP server and run 12 social-media jobs: create TikTok/Instagram accounts, post at scale, warm accounts, ban webh…
Vercel AI SDK is an agent framework (code): TypeScript toolkit for AI apps; the MCP client (@ai-sdk/mcp, formerly experimental_createMCPClient in ai) turns TokPortal tools into generateText/streamText tools. Connected to the TokPortal MCP server (or the REST API), it can create geo-targeted TikTok and Instagram accounts, schedule videos, warm accounts, read analytics and follow the ban lifecycle — 91 tokportal_* tools generated from the public OpenAPI schema.
Connect TokPortal to Vercel AI SDK
npm i ai @ai-sdk/mcp @modelcontextprotocol/sdk @ai-sdk/anthropic
import { generateText } from 'ai';
import { anthropic } from '@ai-sdk/anthropic';
import { createMCPClient } from '@ai-sdk/mcp';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const mcpClient = await createMCPClient({
transport: new StreamableHTTPClientTransport(
new URL('https://app.tokportal.com/api/ext/mcp'),
{ requestInit: { headers: { 'X-API-Key': process.env.TOKPORTAL_API_KEY! } } },
),
});
try {
const tools = await mcpClient.tools();
const { text } = await generateText({
model: anthropic('claude-sonnet-4-5'),
tools,
prompt: 'List my published TokPortal bundles and their video counts.',
});
console.log(text);
} finally {
await mcpClient.close();
}
On AI SDK 5 the import is import { experimental_createMCPClient as createMCPClient } from 'ai'; the rest is identical.
Snippet status: verified against Vercel AI SDK's documentation (source).
Try it
prompt: "Check tokportal_get_credit_costs, then create one TikTok
bundle in GB with 4 videos and configure the account @{{handle}}.
Return the bundle id; do not publish."
Jobs you can run from Vercel AI SDK
- Create TikTok accounts — Create geo-targeted TikTok accounts from Vercel AI SDK with the TokPortal MCP tools: create_bundle → configure_bundle_account → publish_bundle → list_accounts.
- Post 100 TikTok videos a day — Post 100+ TikTok videos a day from Vercel AI SDK: spread slots across ≥34 TokPortal bundles (3 videos/day/bundle cap), batch-configure, publish, track finalization.
- Run US TikTok accounts from abroad — Operate US TikTok accounts from anywhere with Vercel AI SDK: TokPortal creates and posts on accounts held by US-based managers — no VPN, no US SIM, no per-account OAuth.
- Warm TikTok & Instagram accounts — Warm accounts on niche search terms from Vercel AI SDK: generate_warming_terms → configure_bundle_warming_terms / rewarm_account, verified sessions, warming.* webhooks.
- Run a faceless TikTok channel — Run a faceless TikTok channel from Vercel AI SDK: AI-generated clips → upload_video → 3 dated posts a day via batch_configure_bundle_videos, AI label on, human-operated account.
- Seed UGC across many accounts — Seed UGC from Vercel AI SDK: the same creative on N geo-targeted TikTok/Instagram accounts via create_bundles_bulk, disclose_as_ads, per-account analytics.
- Seed a music sound on TikTok — Seed a TikTok sound from Vercel AI SDK: many geo-targeted accounts posting with tiktok_sound_url on the same track, staggered dates, per-video analytics for the label.
- Launch an app with persona accounts — Launch an app with persona accounts from Vercel AI SDK: several TikTok/Instagram characters, each a managed account with bio link, warming and a 30-day content plan.
- Run multi-client agency operations — Run an agency's TikTok/Instagram operations from Vercel AI SDK: per-client external_ref, bulk account fleets, videos_only reposting, ban webhooks and per-client analytics exports.
- Get ban alerts via webhooks — Get TikTok/Instagram ban alerts from Vercel AI SDK: create_webhook_endpoint for account.banned, ban_appeal.submitted, ban_resolution.decided; list_account_bans as source of truth.
- Pull analytics across all accounts — Pull TikTok/Instagram analytics across every managed account from Vercel AI SDK: get_analytics_dashboard, get_analytics_series, list_account_video_analytics, CSV/HTML exports.
- Create Instagram accounts — Create geo-targeted Instagram accounts from Vercel AI SDK with TokPortal: create_bundle platform=instagram → configure_bundle_account → publish_bundle; Reels, posts, carousels.
Other agents
Claude · Claude Code · ChatGPT · OpenAI Codex · Cursor · Windsurf · Cline · OpenClaw · Hermes Agent · Gemini CLI · Goose · Perplexity · Microsoft Copilot Studio · Factory Droid · n8n · Make · Zapier · Pipedream · Dify · Flowise · Langflow · CrewAI · LangChain · Mastra
See also: MCP server · Getting started · Credits & Pricing.