TikTok Agent Publisher
This server provides MCP tools for AI agents to safely publish and manage TikTok videos, with dry-run mode by default and OAuth readiness checks. You can retrieve machine-readable manifest/install/safety guidance, check connection status (dry-run/live, OAuth readiness, live publish readiness) without exposing tokens, perform a privacy audit on token/media/live-publish boundaries, publish a TikTok video using a local video path, caption, title, and post mode (MEDIA_UPLOAD or DIRECT_POST; dry-run by default, live requires explicit opt-in), check publish job status by publish ID, and list recent TikTok videos visible to the configured OAuth token with pagination. All tools support JSON or Markdown output and are designed to avoid token leakage.
ā If this agent-first tool helps your workflow, please star the repo. Stars make this tooling easier for other builders to discover and help Delx keep shipping open infrastructure. š§± Part of the Delx agent stack — 15 open-source MCP servers across body, reach and coordination.
Local-first TikTok Content Posting API tooling for AI agents. It gives Codex, Claude, Cursor, Hermes, OpenClaw and other MCP clients a safe way to check readiness, build OAuth URLs, dry-run publish flows and upload TikTok videos only when live mode is explicitly enabled.
Use it when an agent needs to publish or inspect TikTok content without browser automation, hidden state or token leakage.
Why It Exists
Most social publishing scripts are built for humans at a terminal. Agents need a different contract:
a manifest that explains install/runtime rules
a connection status tool before write operations
privacy boundaries that never return token values
dry-run by default
structured JSON outputs for planning, retries and audit trails
This repo packages that contract around TikTok's official Content Posting API.
Related MCP server: Upload-Post
Install
npm install -g tiktok-agent-publisherOr run without installing:
npm exec --yes --package=tiktok-agent-publisher -- tiktok-agent-publisher doctorFirst Post (Dry-Run) Walkthrough
No TikTok credentials are required to try this. With no .env, dry-run is on by
default, so every command below returns structured JSON without touching the live
API. This is the exact sequence an agent should follow before its first real post.
The outputs are real CLI runs, lightly trimmed.
1. Check readiness. doctor reports mode and what is still missing ā never any
token values.
$ tiktok-agent-publisher doctor
{
"ok": true,
"dry_run": true,
"configured": {
"client_key": false,
"client_secret": false,
"access_token": false,
"refresh_token": false,
"public_media_base_url": false,
"supabase_storage": false
},
"missing": [
"TIKTOK_CLIENT_KEY",
"TIKTOK_CLIENT_SECRET",
"TIKTOK_ACCESS_TOKEN",
"TIKTOK_REFRESH_TOKEN"
],
"ready_for_live_publish": false,
"ready_for_direct_video_upload": false,
"next_steps": [
"Current mode is dry-run. Use dry-run to validate agent workflow before live posting."
]
}2. Confirm the privacy boundaries. privacy-audit states what stays local and
what is sent to TikTok, so the agent can reason about the contract before any write.
$ tiktok-agent-publisher privacy-audit
{
"project": "tiktok-agent-publisher",
"secrets_returned_to_agent": false,
"token_storage": "Environment variables or local .env with user-only file permissions; tokens are never returned by tools.",
"safety_rules": [
"Dry-run is the default.",
"Only post content the user owns or has permission to publish.",
"Use explicit confirmation before live direct posting."
]
}3. Build the publish payload (dry-run). This validates the job shape and caption
without uploading anything. result.platformPostId is a synthetic dryrun_* id and
raw.dryRun is true, so you can wire up retries and audit logging safely.
$ tiktok-agent-publisher publish-video \
--video ./short.mp4 \
--caption "First agent post ā testing the dry-run flow" \
--title "Hello from an agent"
{
"ok": true,
"dry_run": true,
"job": {
"id": "tiktok_1780082349025",
"platform": "tiktok",
"status": "queued",
"caption": "First agent post ā testing the dry-run flow",
"mediaPaths": ["./short.mp4"],
"metadata": { "title": "Hello from an agent" }
},
"result": {
"provider": "tiktok_official",
"platformPostId": "dryrun_1780082349025",
"raw": { "dryRun": true, "jobId": "tiktok_1780082349025" }
}
}4. Poll status (dry-run). publish-status returns a DRY_RUN status so the
polling loop can be exercised end to end.
$ tiktok-agent-publisher publish-status --publish-id dryrun_1780082349025
{ "dryRun": true, "publishId": "dryrun_1780082349025", "status": "DRY_RUN" }5. List recent videos (dry-run). Returns an empty, well-formed list ā the same shape the live API returns, so post-publish confirmation code works unchanged.
$ tiktok-agent-publisher list-videos --max-count 5
{ "dryRun": true, "videos": [], "cursor": null, "has_more": false }Going live. Fill in TIKTOK_CLIENT_KEY / TIKTOK_CLIENT_SECRET (and complete
OAuth ā see auth-url), confirm doctor reports ready_for_live_publish: true,
then set TIKTOK_DRY_RUN=false. The same five commands then operate against the real
Content Posting API.
CLI
tiktok-agent-publisher manifest --client codex
tiktok-agent-publisher doctor
tiktok-agent-publisher privacy-audit
tiktok-agent-publisher auth-url --redirect-uri http://localhost:8787/callback
tiktok-agent-publisher publish-video --video ./short.mp4 --caption "Launch copy"
tiktok-agent-publisher publish-status --publish-id <publish_id>
tiktok-agent-publisher list-videos --max-count 10Dry-run is enabled by default. Set TIKTOK_DRY_RUN=false only after doctor is clean and you are ready for live API calls.
MCP
Stdio:
tiktok-agent-mcpHTTP (v2 stateless)
Default is stdio. Optional Streamable HTTP ā no session id, JSON responses, loopback only:
npx -y -p tiktok-agent-publisher tiktok-agent-mcp --http
# GET http://127.0.0.1:3031/health
# POST http://127.0.0.1:3031/mcp (sessionless)Env: TIKTOK_MCP_HOST, TIKTOK_MCP_PORT, TIKTOK_MCP_TRANSPORT=http.
Hermes-style config:
mcp_servers:
tiktok:
command: npx
args: ["-y", "tiktok-agent-publisher"]
sampling:
enabled: falseRecommended first calls:
tiktok_connection_statustiktok_privacy_audittiktok_publish_video
Agent Surfaces
Tool | Purpose |
| Install/runtime guidance for Codex, Claude, Cursor, Hermes and OpenClaw |
| Dry-run, OAuth and media-hosting readiness without token values |
| Local file, token and live-publish boundaries |
| Dry-run or live video publish flow |
| Publish-status polling |
| Recent video list for post-publish checks |
Copy-Paste Agent Prompt
Use tiktok-agent-publisher. First call tiktok_connection_status and tiktok_privacy_audit.
If dry-run is enabled, build the publish payload only. Do not request or print token values.Configuration
Copy .env.example to .env and fill only the values you need. Do not commit .env, token files or .agent-data/.
For video inbox uploads, a local file can be uploaded directly through TikTok's upload URL. Photo and pull-from-url workflows can use Supabase Storage or another public media host.
Safety Model
Tokens are read from environment or local
.env; tool responses never include token values.Live publishing is disabled unless
TIKTOK_DRY_RUN=false.OAuth PKCE verifier is persisted locally in
.agent-data/and not returned in MCP output.The package uses TikTok's official API surfaces; it does not automate a browser session.
Development
npm install
npm test
npm run checkš§ Contact & Support
šØ support@delx.ai ā general questions, integration help, partnerships
š Bug reports / feature requests ā GitHub Issues
š¦ Updates ā @delx369 on X
š Site ā wellness.delx.ai
Available Tools
6 toolstiktok_agent_manifestTikTok Agent ManifestCRead-onlyIdempotent
Machine-readable install, client, runtime and safety guidance for agents.
Inputs: client, response_format.
tiktok_connection_statusTikTok Connection StatusBRead-onlyIdempotent
Check dry-run mode, OAuth readiness and live publish readiness without exposing tokens.
Inputs: response_format.
tiktok_list_videosList TikTok VideosBRead-onlyIdempotent
List recent TikTok videos visible to the configured OAuth token.
Inputs: cursor, max_count, response_format.
tiktok_privacy_auditTikTok Privacy AuditCRead-onlyIdempotent
Return token, media-hosting, local-file and live-publish safety boundaries.
Inputs: response_format.
tiktok_publish_statusTikTok Publish StatusBRead-onlyIdempotent
Fetch TikTok Content Posting API publish status by publish id.
Inputs: publish_id (required), response_format.
tiktok_publish_videoPublish TikTok VideoA
Create a TikTok video publish job. Dry-run is enabled by default; live mode requires explicit TIKTOK_DRY_RUN=false.
Inputs: video_path (required), title, caption, post_mode, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 6 tools
Each tool serves a clear, distinct function: manifest provides metadata, connection_status checks readiness, list_videos retrieves videos, privacy_audit examines safety, publish_status queries job state, publish_video creates a publish job. No overlap.
All tool names follow the consistent pattern 'tiktok_verb_noun' in snake_case, making it easy for an agent to predict tool names and purposes.
With 6 tools, the set is well-scoped for a TikTok publishing server, covering essential operations without unnecessary bloat.
The set covers the main publishing lifecycle: list, publish, status, and safety checks. Minor gaps exist (e.g., no tool for updating or deleting a video), but these are outside the core publishing focus.
Maintenance
Related MCP Connectors
Real-time TikTok profile, video feed, comments, search & HD media metadata API for AI agents.
TikTok search demand, videos, creators, comments and captions for AI agents. OAuth or API key.
MCP server for QPost ā lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
Short-form video metadata, creator profiles, comments & trend discovery API for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with a TikTok-style social video platform, including video upload, live streaming, social interactions, and direct messaging.4AGPL 3.0

Upload-Postofficial
AlicenseBqualityBmaintenanceUpload-Post is the all-in-one social media MCP server the Model Context Protocol server for social media publishing, scheduling and analytics. Connect any MCP-compatible AI agent (Claude, Cursor, ChatGPT, Claude Desktop, n8n, and more) and publish, schedule and analyze content across 13+ social networks from one API: TikTok, Instagram, YouTube, YouTube Shorts, Instagram Reels, LinkedIn, Facebook1222,001 npm22MIT- AlicenseAqualityCmaintenanceAgent-first YouTube Shorts uploader with dry-run validation, OAuth checks and synthetic-media metadata.6184 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables publishing TikTok videos via the TikTok Content Posting API, supporting file upload and URL-based publishing with status checking.MIT