TikTok Agent Publisher

io.github.davidmosiahPublished by GitHub account davidmosiahv0.1.5Updated Oct 24, 2026

Local-first TikTok Content Posting API for AI agents: OAuth checks, dry-run and live uploads.

The publisher's own server: Tiktokporn

Overview

AI-generated overview

A local MCP server that lets an AI assistant check TikTok readiness, build OAuth URLs, and dry-run or live-publish videos through TikTok's official Content Post

What you can do
Check connection readiness, OAuth status and media-hosting setup without exposing token values, and run a privacy audit of local and live-publish boundaries, plus get install guidance for agent runtimes. Build and validate a video publish job with caption and title, then poll its publish status. List recent videos for post-publish confirmation. All write flows default to dry-run with synthetic IDs until live mode is explicitly enabled.
When to use it
Use it when an assistant should publish or inspect TikTok videos through the official Content Posting API rather than browser automation, and you want a safe dry-run rehearsal before any real upload.
Requirements
Runs locally over stdio as an npm package (Node.js); an optional loopback-only HTTP mode exists. Live use needs a TikTok developer app with TIKTOK_CLIENT_KEY and TIKTOK_CLIENT_SECRET, a completed OAuth flow, and TIKTOK_DRY_RUN set to false. Photo and pull-from-url flows need a public media host such as Supabase Storage.
Before you install
Live publishing posts content publicly to TikTok and is enabled only by setting TIKTOK_DRY_RUN to false; confirm readiness first. TIKTOK_CLIENT_SECRET and OAuth tokens are sensitive and should stay local; the server states it never returns token values. Only publish content you own or have permission to publish. Local token and OAuth files should not be committed.

Installation

In SourceWeft

  1. Open TikTok Agent Publisher in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

TikTok Agent Publisher

Agent-first TikTok Content Posting API CLI + MCP.
Dry-run safe, OAuth readiness checks, structured output for any agent runtime.

[npm version] [npm downloads] [License MIT] [Built for MCP]

[GitHub stars] [CI status] [Part of the Delx agent stack] [Category]

⭐ 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

bash
npm install -g tiktok-agent-publisher

Or run without installing:

bash
npm exec --yes --package=tiktok-agent-publisher -- tiktok-agent-publisher doctor

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.

bash
$ 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.

bash
$ 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.

bash
$ 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.

bash
$ 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.

bash
$ 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

bash
tiktok-agent-publisher manifest --client codextiktok-agent-publisher doctortiktok-agent-publisher privacy-audittiktok-agent-publisher auth-url --redirect-uri http://localhost:8787/callbacktiktok-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 10

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:

bash
tiktok-agent-mcp

HTTP (v2 stateless)

Default is stdio. Optional Streamable HTTP — no session id, JSON responses, loopback only:

bash
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:

yaml
mcp_servers:  tiktok:    command: npx    args: ["-y", "tiktok-agent-publisher"]    sampling:      enabled: false

Recommended first calls:

  1. tiktok_connection_status
  2. tiktok_privacy_audit
  3. tiktok_publish_video

Agent Surfaces

ToolPurpose
tiktok_agent_manifestInstall/runtime guidance for Codex, Claude, Cursor, Hermes and OpenClaw
tiktok_connection_statusDry-run, OAuth and media-hosting readiness without token values
tiktok_privacy_auditLocal file, token and live-publish boundaries
tiktok_publish_videoDry-run or live video publish flow
tiktok_publish_statusPublish-status polling
tiktok_list_videosRecent video list for post-publish checks

Copy-Paste Agent Prompt

text
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

bash
npm installnpm testnpm run check

📧 Contact & Support

Source: README.md at commit d262af5

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.5LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Tik-Tok integrations