tokportal-mcp
Official 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.
README
tokportal-mcp
TokPortal is the managed social infrastructure API: real TikTok, Instagram and YouTube accounts created, warmed and operated by human account managers in 16+ countries — exposed as a REST API and an MCP server. No OAuth per account, no 25-posts/day cap, no app review.
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 · llms.txt https://developers.tokportal.com/llms.txt
tokportal-mcp is the official Model Context Protocol server for the TokPortal API. It exposes every public API operation (91 tools) to Claude, Cursor, VS Code, Windsurf, Codex, Gemini CLI and any other MCP client — create bundles, upload videos, configure and publish accounts, read analytics, manage webhooks.
Two ways to use it:
| Mode | Transport | When to use |
|---|---|---|
Local (npx tokportal-mcp) |
stdio | Desktop clients, local agents, file uploads from disk |
Remote (https://app.tokportal.com/api/ext/mcp) |
Streamable HTTP | Hosted agents, no install; same tool catalogue |
Requires Node.js 20 or newer for the local server. Get an API key at https://app.tokportal.com/developer/api-keys (format sk_ + 64 hex chars).
30-second quickstart
npm install -g tokportal-mcp
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:
"Create a TikTok bundle in the USA with 5 videos, upload
./launch.mp4as video 1 with the caption 'Day 1', then publish the bundle."
That call chain uses tokportal_create_bundle → tokportal_upload_video_direct → tokportal_configure_bundle_video → tokportal_publish_bundle.
Programmatic smoke test with the MCP SDK:
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(); // 91 tools
const me = await client.callTool({ name: "tokportal_get_current_user", arguments: {} });
console.log(tools.length, me.content[0].text);
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):
{
"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\):
{
"mcpServers": {
"tokportal": {
"command": "npx",
"args": ["-y", "tokportal-mcp"],
"env": { "TOKPORTAL_API_KEY": "sk_your_key_here" }
}
}
}
Claude Code
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:
{
"servers": {
"tokportal": {
"type": "stdio",
"command": "npx",
"args": ["-y", "tokportal-mcp"],
"env": { "TOKPORTAL_API_KEY": "sk_your_key_here" }
}
}
}
Windsurf
~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"tokportal": {
"command": "npx",
"args": ["-y", "tokportal-mcp"],
"env": { "TOKPORTAL_API_KEY": "sk_your_key_here" }
}
}
}
OpenAI Codex CLI
~/.codex/config.toml:
[mcp_servers.tokportal]
command = "npx"
args = ["-y", "tokportal-mcp"]
env = { TOKPORTAL_API_KEY = "sk_your_key_here" }
Gemini CLI
~/.gemini/settings.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:
{
"mcpServers": {
"tokportal": {
"url": "https://app.tokportal.com/api/ext/mcp",
"headers": { "X-API-Key": "sk_your_key_here" }
}
}
}
Environment variables
| Variable | Required | Description |
|---|---|---|
TOKPORTAL_API_KEY |
yes | API key (sk_ + 64 hex). Only a SHA-256 hash is stored server-side. |
TOKPORTAL_BASE_URL |
no | Defaults 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 inbody. - Every tool carries MCP annotations:
title,readOnlyHint(GET),destructiveHint(DELETE / cancel / unpublish / reset / unschedule / revoke),idempotentHint(GET/PUT/DELETE) andopenWorldHint: false, so clients can ask for confirmation on destructive calls. - 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 asIdempotency-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.12.1 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:
{
"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
- Documentation: https://developers.tokportal.com
- MCP guide: https://developers.tokportal.com/mcp
- SDKs & CLI: https://developers.tokportal.com/sdks-cli
- API reference (OpenAPI): https://developers.tokportal.com/openapi.json
- Other packages:
@tokportal/node·@tokportal/cli·tokportal(PyPI) ·github.com/tokportal/tokportal-go
MIT © TokPortal
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。