DEV Community

Cover image for The MCP that creates real TikTok accounts in any country - TokPortal
naybu
naybu

Posted on

The MCP that creates real TikTok accounts in any country - TokPortal

Most TikTok "automation" tools work the same way: spin up a headless browser, route through a proxy, pray the account doesn't get banned in 48 hours.

We took a different approach with TokPortal. Instead of faking it, we built a network of real operators in 16+ countries — actual people with actual phones — and wrapped the entire workflow in a REST API.

You call the API. Someone in the US, UK, Brazil, Germany, Indonesia (or wherever you need) creates the account on a real device, on a real local network. No VPNs, no emulators, no fingerprint spoofing.

This post walks through the technical side: what the API looks like, how to go from zero to a published TikTok in ~20 lines of Python.

The problem we were solving

We're a social media agency that scaled to 35,000+ accounts across 82 niches. At some point, managing this through spreadsheets and WhatsApp groups with operators became insane.

So we built an internal tool. Then clients wanted access. Then we shipped an API.

The core insight: TikTok's algorithm is local. An account created on a phone in São Paulo, connected to a Brazilian carrier, gets pushed to Brazilian users. An account created via a US proxy from a server in Frankfurt gets pushed to nobody.

That's the entire value prop. Organic distribution in the country you actually want to reach.

How it works — the API

Base URL:

https://app.tokportal.com/api/ext
Enter fullscreen mode Exit fullscreen mode

Auth is a Bearer token you generate from the Developer Portal.

The core concept is a bundle — a package that includes an account + N video slots. You create a bundle, configure the videos, publish it, and our operators handle the rest.

Step 1: Create a bundle

import os
import requests

API_KEY = os.environ["TOKPORTAL_API_KEY"]
BASE = "https://app.tokportal.com/api/ext"
HEADERS = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json",
}

resp = requests.post(f"{BASE}/bundles", headers=HEADERS, json={
    "bundle_type": "account_and_videos",
    "platform": "tiktok",
    "country": "US",
    "videos_quantity": 3,
    "title": "My first campaign",
})
bundle = resp.json()["data"]
print(f"Bundle {bundle['bundle_id']} created — {bundle['status']}")
Enter fullscreen mode Exit fullscreen mode

This provisions a US TikTok account with 3 video slots. Change country to BR, DE, ID, GB, FR, etc. — same API, different market.

Step 2: Upload your video

We use presigned URLs for uploads. No multipart form headaches.

# Get a presigned upload URL
upload = requests.post(f"{BASE}/upload/video", headers=HEADERS, json={
    "filename": "promo.mp4",
    "content_type": "video/mp4",
    "bundle_id": bundle["bundle_id"],
}).json()["data"]

# PUT the file directly (no auth header needed)
with open("promo.mp4", "rb") as f:
    requests.put(upload["upload_url"], data=f,
                 headers={"Content-Type": "video/mp4"})

video_url = upload["public_url"]
Enter fullscreen mode Exit fullscreen mode

Step 3: Configure and publish

from datetime import datetime, timedelta

# Set video metadata
publish_date = (datetime.utcnow() + timedelta(days=5)).strftime("%Y-%m-%d")

requests.put(
    f"{BASE}/bundles/{bundle['bundle_id']}/videos/1",
    headers=HEADERS,
    json={
        "video_type": "video",
        "description": "This is wild 🔥 #fyp #tech",
        "target_publish_date": publish_date,
        "video_url": video_url,
    },
)

# Ship it
requests.post(
    f"{BASE}/bundles/{bundle['bundle_id']}/publish",
    headers=HEADERS,
)
Enter fullscreen mode Exit fullscreen mode

That's it. The account gets created by a real operator in the US, the video gets posted from their device on the scheduled date, and you get analytics back via the API.

Step 4: Check how it's doing

analytics = requests.get(
    f"{BASE}/accounts/{account_id}/analytics",
    headers=HEADERS,
).json()["data"]

print(f"Followers: {analytics['followers_count']}")
print(f"Views: {analytics['total_views']}")
print(f"Engagement: {analytics['average_engagement_rate']}%")
Enter fullscreen mode Exit fullscreen mode

What people actually build with this

We've seen some interesting patterns:

Music labels create accounts in 5–10 target markets simultaneously, post videos using a new track, and see which markets get organic traction before investing in paid ads. Full guide here.

DTC brands launch in a new country by seeding 10–20 organic TikTok accounts in that market before running any paid campaigns. Organic-first, paid-second.

Agencies manage 50+ client campaigns through the API, each in different countries with different content calendars. We have one agency running campaigns in 12 countries from a single n8n workflow. n8n integration guide.

AI agent builders plug TokPortal into Claude or Cursor via our MCP server — the agent creates accounts and posts content autonomously.

Bulk creation

If you need scale, there's a bulk endpoint:

resp = requests.post(f"{BASE}/bundles/bulk", headers=HEADERS, json={
    "bundles": [
        {"platform": "tiktok", "country": "US", "videos_quantity": 3,
         "accounts_count": 10, "title": "US wave"},
        {"platform": "tiktok", "country": "BR", "videos_quantity": 3,
         "accounts_count": 10, "title": "Brazil wave"},
        {"platform": "tiktok", "country": "GB", "videos_quantity": 3,
         "accounts_count": 5, "title": "UK wave"},
    ]
})
# 25 accounts across 3 countries in one call
Enter fullscreen mode Exit fullscreen mode

The numbers

After 2 years of running this:

  • 35,000+ accounts created
  • 2B+ total views generated
  • 82 niches covered
  • 16 countries
  • Average engagement rate sits around 6–8% depending on niche and country

The retention is high because the accounts are real. They don't get shadowbanned, they don't get flagged, they just... work like normal TikTok accounts. Because they are normal TikTok accounts.

Try it

The full API reference is at developers.tokportal.com. The Python quickstart gets you from zero to a published TikTok in about 10 minutes.

If you want to see how it fits your use case specifically, you can schedule a call with our team.

Happy to answer questions in the comments — I built this thing so I know where all the weird edge cases are.
``

Top comments (0)