tokportal-mcp

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.

Category
Visit Server

README

tokportal-mcp

npm license

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.mp4 as video 1 with the caption 'Day 1', then publish the bundle."

That call chain uses tokportal_create_bundletokportal_upload_video_directtokportal_configure_bundle_videotokportal_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 in body.
  • Every tool carries MCP annotations: title, readOnlyHint (GET), destructiveHint (DELETE / cancel / unpublish / reset / unschedule / revoke), idempotentHint (GET/PUT/DELETE) and openWorldHint: 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 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.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

MIT © TokPortal

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured