Skip to main content

Model Context Protocol (MCP)

Connect your AI tools to TokPortal using MCP

The Model Context Protocol (MCP) is a standard for connecting Large Language Models (LLMs) to platforms like TokPortal. Once connected, your AI assistant can create bundles, configure accounts and videos, track analytics, and manage your entire TokPortal workflow — all through natural language.

Quick Setup

Step 1: Get an API key

Generate an API key from the Developer Portal. Your key starts with tok_live_ and is shown only once.

Step 2: Configure your AI tool

Add TokPortal MCP server to Cursor

Or manually add to .cursor/mcp.json:

{
"mcpServers": {
"tokportal": {
"command": "npx",
"args": ["-y", "tokportal-mcp"],
"env": {
"TOKPORTAL_API_KEY": "tok_live_your_key_here"
}
}
}
}

Claude Desktop

Add to your claude_desktop_config.json:

{
"mcpServers": {
"tokportal": {
"command": "npx",
"args": ["-y", "tokportal-mcp"],
"env": {
"TOKPORTAL_API_KEY": "tok_live_your_key_here"
}
}
}
}

Windsurf / Other MCP clients

Use the same configuration format. The MCP server runs via npx tokportal-mcp — no installation required.

Step 3: Verify the connection

After setup, verify the connection by asking your AI assistant:

"What is my TokPortal credit balance? Use MCP tools."

If connected, the assistant will call the get_credit_balance tool and return your current balance.

Available Tools

The TokPortal MCP server provides 32 tools organized into 6 groups.

Info

ToolDescription
get_meGet your profile, credit balance, and API key info
get_credit_balanceDetailed credit balance with upcoming expirations
get_credit_historyPaginated credit transaction history
get_countriesList all available countries for account creation
get_platformsSupported platforms with video types and features
get_credit_costsCredit cost grid for all actions

Bundles

ToolDescription
create_bundleCreate a new bundle (account + videos) for a specific country and platform
create_bulk_bundlesPerformance Max — create multiple bundles across platforms in one call
list_bundlesList your bundles with optional filters (status, platform)
get_bundleGet full bundle state including account config and all videos
publish_bundlePublish a bundle — assigns an account manager
unpublish_bundleUnpublish a bundle (reverts to pending_setup)
add_video_slotsAdd video slots to a bundle (2 credits each)
add_edit_slotsAdd edit slots to a bundle (3 credits each, max 1 per video)

Account Configuration

ToolDescription
get_account_configView the account configuration for a bundle
configure_accountSet username, display name, biography, profile picture
finalize_accountValidate an account that is in review
request_account_correctionsRequest corrections on an account

Videos

ToolDescription
list_videosList all videos in a bundle
configure_videoConfigure a single video (type, description, URL, date, platform options)
batch_configure_videosConfigure multiple videos at once
finalize_videoValidate a video that is in review
request_video_correctionsRequest corrections on a video
unschedule_videoRevert a published, configured, or accepted video back to configured status
reset_videoReset a video slot to blank state (clears all config, keeps the slot)

Delivered Accounts

ToolDescription
list_accountsList your delivered accounts with credentials
get_account_detailFull account details including TokMail email and password
list_account_bundlesList all bundles for an account with video slot summary (find available posting slots)
get_verification_codeRetrieve the latest 6-digit verification code from TokMail

Analytics

ToolDescription
get_analyticsAccount-level analytics (followers, views, engagement rate)
refresh_analyticsTrigger an analytics scrape (48h cooldown, 500/month quota)
can_refresh_analyticsCheck if a refresh is allowed and when the next one is available
get_video_analyticsVideo-level stats (views, likes, comments, shares, ER)

Usage Examples

Once connected, you can use natural language to interact with TokPortal:

Create a campaign:

"Create a TikTok bundle in the US with 10 videos and niche warming for gaming content"

Configure videos:

"Configure videos 1-5 on my latest bundle with these descriptions and schedule them one day apart starting March 15"

Check analytics:

"Show me the analytics for all my US TikTok accounts, sorted by engagement rate"

Manage workflow:

"List all my published bundles and show me which ones have videos pending review"

Get verification codes:

"Get the verification code for my account @mybrand_us"

npm Package

The MCP server is published as tokportal-mcp on npm.

npx tokportal-mcp

No installation required — npx downloads and runs it automatically.

Security

  • Your API key is stored locally in your MCP configuration file and is never sent anywhere except to the TokPortal API.
  • The MCP server runs locally on your machine as a stdio process.
  • All communication with TokPortal uses HTTPS.
  • We recommend using separate API keys for MCP and other integrations.
  • You can revoke API keys at any time from the Developer Portal.