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
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
| Tool | Description |
|---|---|
get_me | Get your profile, credit balance, and API key info |
get_credit_balance | Detailed credit balance with upcoming expirations |
get_credit_history | Paginated credit transaction history |
get_countries | List all available countries for account creation |
get_platforms | Supported platforms with video types and features |
get_credit_costs | Credit cost grid for all actions |
Bundles
| Tool | Description |
|---|---|
create_bundle | Create a new bundle (account + videos) for a specific country and platform |
create_bulk_bundles | Performance Max — create multiple bundles across platforms in one call |
list_bundles | List your bundles with optional filters (status, platform) |
get_bundle | Get full bundle state including account config and all videos |
publish_bundle | Publish a bundle — assigns an account manager |
unpublish_bundle | Unpublish a bundle (reverts to pending_setup) |
add_video_slots | Add video slots to a bundle (2 credits each) |
add_edit_slots | Add edit slots to a bundle (3 credits each, max 1 per video) |
Account Configuration
| Tool | Description |
|---|---|
get_account_config | View the account configuration for a bundle |
configure_account | Set username, display name, biography, profile picture |
finalize_account | Validate an account that is in review |
request_account_corrections | Request corrections on an account |
Videos
| Tool | Description |
|---|---|
list_videos | List all videos in a bundle |
configure_video | Configure a single video (type, description, URL, date, platform options) |
batch_configure_videos | Configure multiple videos at once |
finalize_video | Validate a video that is in review |
request_video_corrections | Request corrections on a video |
unschedule_video | Revert a published, configured, or accepted video back to configured status |
reset_video | Reset a video slot to blank state (clears all config, keeps the slot) |
Delivered Accounts
| Tool | Description |
|---|---|
list_accounts | List your delivered accounts with credentials |
get_account_detail | Full account details including TokMail email and password |
list_account_bundles | List all bundles for an account with video slot summary (find available posting slots) |
get_verification_code | Retrieve the latest 6-digit verification code from TokMail |
Analytics
| Tool | Description |
|---|---|
get_analytics | Account-level analytics (followers, views, engagement rate) |
refresh_analytics | Trigger an analytics scrape (48h cooldown, 500/month quota) |
can_refresh_analytics | Check if a refresh is allowed and when the next one is available |
get_video_analytics | Video-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.