TokPortal MCP Server for Cursor
Install the public tokportal-mcp package in Cursor and use generated TokPortal tools for credits, bundles, videos, webhooks, uploads, accounts, and analytics.
TokPortal MCP Server for Cursor
The public MCP package is tokportal-mcp. It lets Cursor call generated TokPortal tools using your API key. This is a local stdio MCP server; your key is passed to the TokPortal API by the local process.
Install
Add this to .cursor/mcp.json:
{
"mcpServers": {
"tokportal": {
"command": "npx",
"args": ["-y", "tokportal-mcp"],
"env": {
"TOKPORTAL_API_KEY": "sk_your_key_here"
}
}
}
}
Get your key from the Developer Portal.
Reference: MCP Server
Verify the connection
Ask Cursor:
"Use the TokPortal MCP tools to show my credit balance."
If connected, Cursor should call tokportal_get_credit_balance.
Create a bundle from Cursor
Use a prompt that forces Cursor to show the payload before executing:
"Prepare a TokPortal request for a US TikTok bundle with 10 video slots and Advanced Niche Warming on 6 SaaS/tech targets. Show the exact MCP tool call first. Wait for confirmation before running it."
Expected tool shape:
{
"tool": "tokportal_create_bundle",
"args": {
"bundle_type": "account_and_videos",
"platform": "tiktok",
"country": "US",
"videos_quantity": 10,
"wants_advanced_warming": true,
"advanced_warming_terms": [
"saas tools",
"b2b software",
"productivity apps",
"startup founder",
"developer tools",
"no code automation"
],
"external_ref": "cursor-saas-us"
}
}
wants_advanced_warming: true must travel with advanced_warming_terms (or advanced_warming_terms_count); on its own the target list is rejected with ADVANCED_WARMING_FLAG_REQUIRED. Targets are 3-30, in multiples of 3, each 2-50 characters. At the standard rate of 5 credits per target the 6 targets above are 30 credits, on top of 32 for the account and 2 per video slot: 32 + (10 x 2) + 30 = 82 credits.
Costs are returned by the API as credits_charged and cost_breakdown; do not hardcode them in your agent logic.
Configure videos from project files
Cursor can read local files if you allow it. A useful workflow is:
"Read
marketing/video-plan.md, extract 5 captions and video URLs, then configure positions 1-5 on bundlebnd_.... Usetarget_publish_datestarting 5 days from today, at most 3 videos on any single day. Show the batch payload before executing."
The earliest target_publish_date a bundle accepts is today + 3 days while its account is still being created, and today + 1 once the account is delivered or when the bundle runs on an existing account. A 4th video on the same day is rejected with VIDEOS_PER_DAY_EXCEEDED.
Expected API surface:
tokportal_batch_configure_bundle_videosPUT /bundles/{id}/videos/batch- body shape:
{ "videos": [...] }
Reference: Configure Videos
Monitor status and analytics
Useful tools:
| Tool | Use |
|---|---|
tokportal_get_bundle | Inspect bundle status and configured fields |
tokportal_get_bundle_publish_readiness | See why a bundle cannot publish yet |
tokportal_list_accounts | List delivered accounts |
tokportal_get_account_analytics | Fetch account analytics when available |
tokportal_list_account_video_analytics | Fetch post-level analytics |
Analytics availability depends on the account/post state and your plan. See Analytics.
Operational guardrails
- Ask Cursor to confirm mutating calls before execution.
- Use
external_refto connect TokPortal records to your internal campaign IDs. - Do not ask the agent to promise views, engagement, reach, or platform enforcement outcomes.
- Use Webhooks for production monitoring instead of relying only on chat output.
Related docs: SDKs & CLI, Media Upload, Python Quickstart, Claude Code.