AI Agents

TokPortal + Claude via MCP

Use the public tokportal-mcp package with Claude-compatible MCP clients to operate TokPortal workflows from natural language.

TokPortal + Claude via MCP

Claude-compatible MCP clients can run TokPortal tools through the public tokportal-mcp package. The server is generated from the public OpenAPI contract and uses your TokPortal API key.

Setup

Use this MCP server config:

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

For Claude Desktop, add it to claude_desktop_config.json. For Claude Code or another MCP client, add the same server definition to the client's MCP configuration.

Reference: MCP Server

Good prompts

For mutating API calls, ask Claude to show the payload first:

"Use TokPortal MCP. First check my credit balance. Then prepare, but do not execute, a payload for a TikTok bundle in the US with 5 videos, niche warming, and external_ref claude-q2-us."

Expected payload:

{
  "bundle_type": "account_and_videos",
  "platform": "tiktok",
  "country": "US",
  "videos_quantity": 5,
  "wants_niche_warming": true,
  "niche_warming_instructions": "Tech and SaaS content.",
  "external_ref": "claude-q2-us"
}

After confirmation, Claude can call tokportal_create_bundle.

Supported workflows

WorkflowTools / endpoints
Check creditstokportal_get_credit_balance, GET /credits/balance
Create bundlestokportal_create_bundle, POST /bundles
Create several bundles in one countrytokportal_create_bundles_bulk, POST /bundles/bulk
Configure account profiletokportal_configure_bundle_account, PUT /bundles/{id}/account
Configure videostokportal_configure_bundle_video, tokportal_batch_configure_bundle_videos
Upload mediatokportal_upload_video, tokportal_upload_video_direct, tokportal_upload_image
Publishtokportal_publish_bundle, POST /bundles/{id}/publish
Analyticstokportal_get_analytics_dashboard, tokportal_get_account_analytics, tokportal_list_account_video_analytics

See MCP available tools for the complete generated list.

CSV and media workflows

The CSV import endpoint is multipart:

POST /bundles/{id}/videos/import-csv

If your MCP client cannot easily provide multipart files, use one of these alternatives:

  • Configure videos in JSON with tokportal_batch_configure_bundle_videos.
  • Upload media through Media Upload, then pass returned URLs/paths to video configuration.
  • Use the CLI or Node SDK for file-heavy workflows.

Monitoring

For production work, combine Claude with:

  • Webhooks for lifecycle events
  • tokportal_get_bundle_publish_readiness before publishing
  • Analytics after posts are live

Do not treat AI output as a guarantee of campaign performance. The MCP server executes supported TokPortal API operations; views, reach, and account health depend on platform behavior and content quality.

Related guides: Cursor MCP, OpenClaw, Python Quickstart.