tokportal-cli
Official@tokportal/cli
TokPortal 是托管式社交基础设施 API:由 16 个以上国家/地区的人类账户经理创建、预热和运营的真实 TikTok、Instagram 和 YouTube 账户——以 REST API 和 MCP 服务器形式提供。无需每个账户的 OAuth,没有每天 25 条帖子的限制,无需应用审核。
文档 https://developers.tokportal.com · API 基础地址 https://app.tokportal.com/api/ext · OpenAPI https://developers.tokportal.com/openapi.json · MCP 远程 https://app.tokportal.com/api/ext/mcp · 获取 API 密钥 https://app.tokportal.com/developer/api-keys · llms.txt https://developers.tokportal.com/llms.txt
@tokportal/cli 是 TokPortal API 的官方命令行界面。每个 API 操作对应一个命令,基于 OpenAPI 生成,JSON 输入/JSON 输出——非常适合脚本、CI 和快速检查。需要 Node 18+。
安装
npm install -g @tokportal/cli
# or without installing:
npx @tokportal/cli get-current-userRelated MCP server: apollo-mcp
30 秒快速入门
export TOKPORTAL_API_KEY=sk_your_key_here
# who am I / credit balance
tokportal get-current-user
tokportal get-credit-balance
# create a 1-video TikTok bundle in the USA and capture its id (credits are debited here)
BUNDLE_ID=$(tokportal create-bundle --body '{"bundle_type":"account_and_videos","platform":"tiktok","country":"USA","title":"US launch","videos_quantity":1}' | jq -r .data.id)
# upload the video from disk -> public_url
VIDEO_URL=$(tokportal upload-video-direct --file ./launch.mp4 --bundle_id "$BUNDLE_ID" | jq -r .data.public_url)
# configure the account profile + video slot 1, then publish
tokportal configure-bundle-account --id "$BUNDLE_ID" --body '{"username":"mybrand.us","visible_name":"My Brand","biography":"Official account"}'
tokportal configure-bundle-video --id "$BUNDLE_ID" --position 1 --body "{\"video_type\":\"video\",\"video_url\":\"$VIDEO_URL\",\"description\":\"Day 1 #launch\",\"target_publish_date\":\"2026-09-01\"}"
tokportal get-bundle-publish-readiness --id "$BUNDLE_ID"
tokportal publish-bundle --id "$BUNDLE_ID"
# follow progress
tokportal get-bundle --id "$BUNDLE_ID"
tokportal help # list every generated command参考
npm install -g @tokportal/cli
export TOKPORTAL_API_KEY=sk_your_key_here
tokportal get-current-user
tokportal list-bundles --page 1 --per_page 25
tokportal create-bundle --body '{"bundle_type":"account_and_videos","country":"USA","videos_quantity":5}'
tokportal upload-video-direct --file ./video.mp4 --bundle_id 00000000-0000-0000-0000-000000000000CLI 在 API 请求中发送 X-TokPortal-Client: tokportal-cli/0.1.2,用于可观测性和支持诊断。
多部分上传命令也是从 OpenAPI 生成的。对二进制字段使用 --file <路径>,并将表单字段(如 --bundle_id 或 --auto_publish)作为常规标志传递。
失败的 API 响应会打印一个 diagnostics 对象,其中包含 request_id、retry_after_seconds 和 rate_limit(当这些标头可用时)。
仅对符合条件的变更操作使用 --idempotency-key。CLI 会在本地拒绝用于凭据泄露、验证码检索、Webhook 创建、签名图片/视频上传 URL 创建以及分析报告创建,因为这些响应包含机密信息且不会存储用于重放。
CLI 是从公共 OpenAPI 模式生成的。使用 tokportal help 列出生成的命令。
事实来源
此包是从 TokPortal 公共 OpenAPI 模式(https://developers.tokportal.com/openapi.json)在私有 TokPortal 单体仓库中生成的。生成的文件(src/generated.ts)会在每次发布时被覆盖——请勿手动编辑。有关我们接受的 PR 内容,请参阅 CONTRIBUTING.md;有关漏洞报告,请参阅 SECURITY.md。
链接
SDK 和 CLI 指南:https://developers.tokportal.com/sdks-cli
MCP 服务器:https://developers.tokportal.com/mcp ·
tokportal-mcpAPI 参考(OpenAPI):https://developers.tokportal.com/openapi.json
其他包:
@tokportal/node·@tokportal/cli·tokportal(PyPI) ·github.com/tokportal/tokportal-go
MIT © TokPortal
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Publish and schedule videos to TikTok, YouTube Shorts, Instagram, Facebook, LinkedIn, Pinterest, Bluesky, Threads and X from Claude, Cursor or any MCP client. Upload once, post everywhere, track views in unified analytics, and retry failed posts. Official platform APIs only, free plan available. Docs: https://docs.multi-upload-tool.com/mcp
Public TikTok profiles, videos, comments and keyword search as JSON. No developer account.
Validate, schedule and publish posts to TikTok, Instagram, Facebook, YouTube, Threads, Bluesky, X.
Read public profiles, posts, comments, transcripts and trends from TikTok, Instagram, YouTube, X, Reddit, LinkedIn and more, in one schema. Three tools: find an endpoint in plain words, call it, check credits. Sign in with OAuth or an API key. Every account starts with 100 free credits.
Related MCP Servers
- AlicenseAqualityCmaintenanceTikTok creator toolkit for AI assistants. Four tools: download watermark-free videos by URL, look up curated 15-hashtag sets for 15 niches with strategy tips, retrieve best posting times for 12 countries, and generate viral hook formulas across 8 categories. Stdio transport, runs via npx -y tiktapdown-mcp, no API keys, no signup, free. MIT license.1068 npm1MIT
- AlicenseBqualityCmaintenanceProvides 45 MCP tools to search, enrich, and manage Apollo.io B2B data (people, companies, CRM, deals, tasks, sequences, etc.) via stdio or HTTP transport.451MIT

tokportal-mcpofficial
AlicenseCqualityCmaintenanceOfficial MCP server for the TokPortal API, exposing 91 tools to create bundles, upload and publish videos, configure accounts, read analytics, and manage webhooks for real TikTok, Instagram, and YouTube accounts in any MCP client.91948 npm2MIT- AlicenseAqualityNot gradedmaintenanceEnables downloading TikTok videos and photos without watermarks, extracting metadata and analytics, and performing bulk downloads of user profiles via CLI or as an MCP server for AI assistants.51MIT