TokPortal

com.tokportal由 tokportal.com 發布官方發布者v1.17.1更新於 Nov 2, 2026

Managed TikTok/Instagram/YouTube accounts + video posting at scale, operated by human managers.

已驗證Streamable HTTP可網頁執行溝通與協作資料與分析商業與電商

概覽

AI 產生的概覽

TokPortal 的 MCP 伺服器讓助理管理託管的 TikTok 與 Instagram 帳號、購買帳號方案,並處理留言、收件匣訊息與數據分析。

可以做什麼
  • 讀取帳號、國家、點數價格與餘額資訊,預覽或建立託管帳號方案
  • 讀取帳號數據分析,例如觸及、觀看、互動與觀看時長
  • 讀取帳號收件匣、回覆留言、傳送 Instagram 訊息,並設定留言轉私訊關鍵字規則
  • 管理留言:刪除、隱藏、取消隱藏或置頂,並維護關鍵字審核規則
  • 申請 Instagram 商業帳號設定任務;啟用 AI 後可探索模型、依報價生成內容並管理媒體
適用情境
適合在託管的 TikTok 與 Instagram 帳號上執行或規劃社群營運時使用,讓助理查詢費用、建立方案、處理留言與訊息或取得帳號數據,而不必為每個帳號逐一串接 OAuth。
執行需求
可使用遠端端點,或使用需 Node.js 20 以上版本的本地 npm 套件。需要 TokPortal API 金鑰(sk_ 開頭):本地透過 TOKPORTAL_API_KEY 提供,遠端透過 X-API-Key 或 Authorization Bearer 標頭提供。部分數據分析與訊息功能要求帳號達到相應等級。
安裝前請注意
正式建立方案會立即扣點,部分任務也會消耗點數;應先用 dry_run 預覽並在正式購買前確認費用。留言操作可能永久刪除或隱藏內容,訊息會傳送給真實受眾。AI 美元錢包與帳號點數各自獨立,生成內容會花錢。1.15.1 之前的本地版本可能在 dry_run 下仍執行真實操作。結果不明時不要盲目重送寫入請求,應使用回傳的請求鍵與狀態查詢工具。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 TokPortal,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.tokportal%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "tokportal": {
      "type": "http",
      "url": "https://app.tokportal.com/api/ext/mcp"
    }
  }
}

README

tokportal-mcp

[npm] [license]

TokPortal is the managed social infrastructure API: real TikTok and Instagram brand accounts created, warmed and operated by human account managers in 16+ countries, exposed as a REST API and an MCP server. Run geo-sharding across markets without connecting every social account through OAuth. YouTube bundle creation is not available through this API.

Upgrade before using the sandbox: local tokportal-mcp requires 1.15.1 or newer for dry_run. Version 1.15.0 advertised the argument but did not send the sandbox header, so a preview could execute a real operation. Update your local server or use the remote connector.

Docs https://developers.tokportal.com · API base https://app.tokportal.com/api/ext · OpenAPI https://developers.tokportal.com/openapi.json · MCP remote https://app.tokportal.com/api/ext/mcp · Get an API key https://app.tokportal.com/developer/api-keys?utm_source=npm&utm_medium=readme&utm_campaign=tokportal-mcp · llms.txt https://developers.tokportal.com/llms.txt


tokportal-mcp is the official Model Context Protocol server for the TokPortal API. Its core tools remain available to Claude, Cursor, VS Code, Windsurf, Codex, Gemini CLI and other MCP clients. When AI is enabled for your workspace, seven additional curated tools cover model discovery, quoted generation, media management and the separate AI USD wallet. Model-specific schemas are fetched on demand, not exposed as hundreds of tools.

Two ways to use it:

ModeTransportWhen to use
Local (npx tokportal-mcp)stdioDesktop clients, local agents, file uploads from disk
Remote (https://app.tokportal.com/api/ext/mcp)Streamable HTTPHosted agents, no install; same tool catalogue

Requires Node.js 20 or newer. The local server runs on it directly. Get an API key at https://app.tokportal.com/developer/api-keys?utm_source=npm&utm_medium=readme&utm_campaign=tokportal-mcp (format sk_ + 64 hex chars).

30-second quickstart

bash
npm install -g [email protected]TOKPORTAL_API_KEY=sk_your_key_here tokportal-mcp

The server speaks MCP over stdio. Point any MCP client at it and ask, for example:

"Read the available countries, credit prices and my balance. Preview a TikTok account-only bundle in the USA with dry_run: true. Show me the immediate and recurring costs, and wait for my GO before any live purchase."

The preview calls tokportal_create_bundle with { "dry_run": true, "body": { "bundle_type": "account_only", "platform": "tiktok", "country": "USA" } }. It validates the request and returns credits_would_charge with credits_charged: 0, without creating work. Creation in live mode is charged immediately. Preview IDs are synthetic and must never be reused in live requests. After GO, create the real resources and use their live IDs. See the sandbox contract.

Programmatic smoke test with the MCP SDK:

js
import { Client } from "@modelcontextprotocol/sdk/client/index.js";import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const client = new Client({ name: "demo", version: "1.0.0" });await client.connect(  new StdioClientTransport({    command: "npx",    args: ["-y", "tokportal-mcp"],    env: { ...process.env, TOKPORTAL_API_KEY: process.env.TOKPORTAL_API_KEY },  }),);
const { tools } = await client.listTools(); // Core tools, plus 7 when AI is enabledconst me = await client.callTool({ name: "tokportal_get_current_user", arguments: {} });console.log(tools.length, me.content[0].text);

AI generation (staged availability)

AI discovery calls authenticated GET /ai/status. If unavailable, only the existing catalogue is shown; no provider fallback or automatic payment is attempted. Local AI support requires 1.16.0 or newer and server-side availability. Installing this package does not enable generation, grant spending permissions or activate billing. Version 1.15.1 retains the existing account-management tools without AI discovery. Remote availability is controlled server-side.

Generation requires body: { quote_id, max_cost_usd } and idempotency_key. Reuse the same key after an uncertain response. Quotes expire within 15 minutes; use the returned expiry. The AI dollar wallet is independent of account-management credits. AI tools do not accept the legacy dry_run contract; use the quote operation, which does not start paid provider work. Cancellation is best effort, not a refund guarantee. Creation does not publish: review the returned assets, then use existing TokPortal scheduling tools.

Client configuration

Replace sk_your_key_here with your key. Every snippet below is the local stdio server; the remote URL variant is listed at the end.

Cursor

~/.cursor/mcp.json (or .cursor/mcp.json in a project):

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

Claude Desktop

claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):

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

Claude Code

bash
claude mcp add tokportal -e TOKPORTAL_API_KEY=sk_your_key_here -- npx -y tokportal-mcp# or the remote server:claude mcp add --transport http tokportal https://app.tokportal.com/api/ext/mcp --header "X-API-Key: sk_your_key_here"

VS Code (GitHub Copilot agent mode)

.vscode/mcp.json:

json
{  "servers": {    "tokportal": {      "type": "stdio",      "command": "npx",      "args": ["-y", "tokportal-mcp"],      "env": { "TOKPORTAL_API_KEY": "sk_your_key_here" }    }  }}

Windsurf

~/.codeium/windsurf/mcp_config.json:

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

OpenAI Codex CLI

~/.codex/config.toml:

toml
[mcp_servers.tokportal]command = "npx"args = ["-y", "tokportal-mcp"]env = { TOKPORTAL_API_KEY = "sk_your_key_here" }

Gemini CLI

~/.gemini/settings.json:

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

Remote server (Streamable HTTP)

Any client that supports remote MCP servers can connect to https://app.tokportal.com/api/ext/mcp with either an X-API-Key: sk_... header or Authorization: Bearer sk_.... Example for clients using the url form:

json
{  "mcpServers": {    "tokportal": {      "url": "https://app.tokportal.com/api/ext/mcp",      "headers": { "X-API-Key": "sk_your_key_here" }    }  }}

Environment variables

VariableRequiredDescription
TOKPORTAL_API_KEYyesAPI key (sk_ + 64 hex). Only a SHA-256 hash is stored server-side.
TOKPORTAL_BASE_URLnoDefaults to https://app.tokportal.com/api/ext.

How the tools work

The server exposes TokPortal API actions as MCP tools over stdio. It is generated from the public API schema and uses the same X-API-Key authentication as the HTTP API.

  • Tool names are tokportal_<operation_id_snake_case> (tokportal_create_bundle, tokportal_list_accounts, ...). Path and query parameters are top-level inputs; JSON bodies go in body.
  • Every tool carries title, readOnlyHint, destructiveHint, idempotentHint and openWorldHint. Read the annotations on each tool: paid operations and irreversible actions can be destructive even when they do not delete anything.
  • Every non-GET tool accepts top-level dry_run: true, sent as X-TokPortal-Dry-Run: true. It is never placed in the query or request body. Dry runs consume normal rate limits but do not consume an idempotency_key; use the same key for a later live request if its operation supports idempotency.
  • Multipart upload tools are generated from OpenAPI too. Binary fields are exposed as local path inputs such as file_path, with the remaining form fields exposed by their schema names.
  • Mutations accept an optional idempotency_key (sent as Idempotency-Key) except for secret-bearing operations (credential reveal, verification codes, webhook creation, signed upload URLs, report creation) which are never replayed.

The MCP server sends X-TokPortal-Client: tokportal-mcp/1.22.0 on API requests for observability and support diagnostics.

Failed tool calls return an error result with a diagnostics object containing request_id, retry_after_seconds, and rate_limit when those headers are available.

Legacy config using the globally installed binary still works:

json
{  "mcpServers": {    "tokportal": {      "command": "tokportal-mcp",      "env": {        "TOKPORTAL_API_KEY": "sk_your_key_here"      }    }  }}

Source of truth

This package is generated from the TokPortal public OpenAPI schema (https://developers.tokportal.com/openapi.json) in the private TokPortal monorepo. src/generated.ts is regenerated on every release — do not edit it by hand. See CONTRIBUTING.md for what we accept as PRs and SECURITY.md for vulnerability reporting.

Links

MIT © TokPortal

Connected analytics (1.18.0)

Use tokportal_get_analytics_account_insights with { "id": "saved-account-uuid" } to read Instagram account-period reach/views/engagement and eligible TikTok post watch time/completion/traffic data. Requires Creator or above; existing tiers remain enforced. A disconnected or unverified account returns available: false with connected_analytics: null. This is read-only and never starts a refresh. Missing metrics are omitted, completion is a 0–1 fraction, traffic/audience splits are 0–100 percentages, and watch times are seconds. The same block appears on tokportal_get_analytics_account. Full contract.

Inbox actions and Business setup (1.19.0)

Read scoped received comments and Instagram messages with tokportal_get_account_inbox. Reply publicly with tokportal_create_account_comment_reply (0 credits, requires a signed reply capability, stable request key, current Coverage and account quota). Check delivery with tokportal_get_account_comment_reply; never blindly resend an unknown result.

tokportal_get_account_business_setup reads progression; tokportal_request_account_business_setup orders the manager task for 5 credits once per Instagram account, after explicit music-limit acknowledgment. TikTok DMs are unavailable. Public metadata webhooks notify connection, incoming activity, reply result and Business task changes. See the Connection & Inbox guide for contracts and limits.

Keyword comment moderation

tokportal_get_account_comment_moderation reads account rules and result history. tokportal_update_account_comment_moderation saves explicit keyword/exception rules for Instagram and TikTok. Read the settings version first. Disabled by default; no DM or credit charge. Only new comments are processed after saving. TikTok unhide is currently unreliable, and disabling rules does not restore hidden comments. Use dry_run: true to validate without saving.

Instagram messaging and comment-to-DM

Use tokportal_send_account_inbox_message for replies in an existing Instagram conversation within 24 hours of an incoming message. Use tokportal_create_account_private_reply once per comment within seven days. Creator and Business are eligible when connection permissions allow. Fetch account-bound references through tokportal_get_account_inbox; arbitrary recipient IDs are not accepted. These actions currently charge no credits.

tokportal_get_account_comment_dm and tokportal_update_account_comment_dm manage one opt-in keyword rule per account, optionally scoped to an owned post. Rules start disabled, process only new original comments and expose durable history. Shared account cooldowns, Coverage, strict identity checks and durable request-key dedupe apply. Unknown delivery must never trigger a blind resend. Use tokportal_get_account_message_operation for status. A private reply alone does not permit follow-up DMs. TikTok DMs are not offered.

Full guide: https://developers.tokportal.com/account-connection-inbox

Manual comment controls (1.22.0)

tokportal_create_account_comment_action supports delete, hide, Instagram unhide and TikTok top-level pin/unpin only when returned in the comment's actions. Pass the exact signed action reference and post reference. Confirm permanent deletion with the user first. Costs 0 credits. The server checks permissions, Coverage, current connection and provider capabilities before reserving a shared account lease. Use a stable request_key; use tokportal_get_account_comment_action after an uncertain result. Never blindly repeat pending/unknown writes. dry_run: true verifies without modifying comments. inbox.comment.action.updated contains result metadata only. TikTok unhide and likes are not exposed in this release. Wait for Retry-After; quotas are not safe activity targets and cannot guarantee that an account will not be restricted.

來源:README.md,提交 218b4d4

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

3
  1. v1.17.1最新Sep 22, 2026
  2. v1.16.0Sep 21, 2026
  3. v1.15.1Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分