Agent-first TikTok Content Posting API CLI and MCP server with dry-run publishing
TikTok Agent Publisher
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Agent-first TikTok Content Posting API CLI + MCP. Dry-run safe, OAuth readiness checks, structured output for any agent runtime.
> ⭐ **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.
Install
Or run without installing:
First 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.
**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.
**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.
**4. Poll status (dry-run).** publish-status returns a DRY_RUN status so the
polling loop can be exercised end to end.
**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.
**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
Dry-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:
HTTP (v2 stateless)
Default is **stdio**. Optional Streamable HTTP — no session id, JSON responses, loopback only:
Env: TIKTOK_MCP_HOST, TIKTOK_MCP_PORT, TIKTOK_MCP_TRANSPORT=http.