{"id":51194670,"url":"https://github.com/davidmosiah/tiktok-agent-publisher","last_synced_at":"2026-06-27T19:01:55.709Z","repository":{"id":355831782,"uuid":"1229801167","full_name":"davidmosiah/tiktok-agent-publisher","owner":"davidmosiah","description":"Agent-first TikTok Content Posting API CLI and MCP server with dry-run publishing","archived":false,"fork":false,"pushed_at":"2026-05-23T18:22:13.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T20:16:00.948Z","etag":null,"topics":["agent-tools","agentic-workflows","ai-agents","claude","cli","codex","content-posting-api","creator-tools","dry-run","local-first","mcp","mcp-server","model-context-protocol","oauth","social-media-automation","tiktok"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tiktok-agent-publisher","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidmosiah.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-05T11:54:14.000Z","updated_at":"2026-05-23T18:22:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/davidmosiah/tiktok-agent-publisher","commit_stats":null,"previous_names":["davidmosiah/tiktok-agent-publisher"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/davidmosiah/tiktok-agent-publisher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmosiah%2Ftiktok-agent-publisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmosiah%2Ftiktok-agent-publisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmosiah%2Ftiktok-agent-publisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmosiah%2Ftiktok-agent-publisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidmosiah","download_url":"https://codeload.github.com/davidmosiah/tiktok-agent-publisher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmosiah%2Ftiktok-agent-publisher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34864431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-tools","agentic-workflows","ai-agents","claude","cli","codex","content-posting-api","creator-tools","dry-run","local-first","mcp","mcp-server","model-context-protocol","oauth","social-media-automation","tiktok"],"created_at":"2026-06-27T19:01:53.187Z","updated_at":"2026-06-27T19:01:55.701Z","avatar_url":"https://github.com/davidmosiah.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- delx header v2 --\u003e\n\u003ch1 align=\"center\"\u003eTikTok Agent Publisher\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/banner.png\" alt=\"TikTok Agent Publisher\" width=\"85%\" /\u003e\n\u003c/div\u003e\n\n\u003ch3 align=\"center\"\u003e\n  Agent-first TikTok Content Posting API CLI + MCP.\u003cbr\u003eDry-run safe, OAuth readiness checks, structured output for any agent runtime.\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/tiktok-agent-publisher\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/tiktok-agent-publisher?style=for-the-badge\u0026labelColor=0F172A\u0026color=10B981\u0026logo=npm\u0026logoColor=white\" alt=\"npm version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/tiktok-agent-publisher\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/tiktok-agent-publisher?style=for-the-badge\u0026labelColor=0F172A\u0026color=0EA5A3\u0026logo=npm\u0026logoColor=white\" alt=\"npm downloads\" /\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/LICENSE-MIT-22C55E?style=for-the-badge\u0026labelColor=0F172A\" alt=\"License MIT\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://modelcontextprotocol.io\"\u003e\u003cimg src=\"https://img.shields.io/badge/BUILT_FOR-MCP-7C3AED?style=for-the-badge\u0026labelColor=0F172A\" alt=\"Built for MCP\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/davidmosiah/tiktok-agent-publisher/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/davidmosiah/tiktok-agent-publisher?style=for-the-badge\u0026labelColor=0F172A\u0026color=FBBF24\u0026logo=github\" alt=\"GitHub stars\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/davidmosiah/tiktok-agent-publisher/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/davidmosiah/tiktok-agent-publisher/actions/workflows/ci.yml/badge.svg\" alt=\"CI status\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/davidmosiah\"\u003e\u003cimg src=\"https://img.shields.io/badge/PART_OF-Delx_Agent_Stack-0EA5A3?style=for-the-badge\u0026labelColor=0F172A\" alt=\"Part of the Delx agent stack\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/davidmosiah/tiktok-agent-publisher\"\u003e\u003cimg src=\"https://img.shields.io/badge/CATEGORY-Reach-FE2C55?style=for-the-badge\u0026labelColor=0F172A\" alt=\"Category\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e ⭐ **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.\u003cbr\u003e\n\u003e 🧱 Part of the [Delx agent stack](https://github.com/davidmosiah) \u0026mdash; 15 open-source MCP servers across **body, reach and coordination**.\n\n---\n\n\u003c!-- /delx header v2 --\u003e\n\nLocal-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.\n\nUse it when an agent needs to publish or inspect TikTok content without browser automation, hidden state or token leakage.\n\n## Why It Exists\n\nMost social publishing scripts are built for humans at a terminal. Agents need a different contract:\n\n- a manifest that explains install/runtime rules\n- a connection status tool before write operations\n- privacy boundaries that never return token values\n- dry-run by default\n- structured JSON outputs for planning, retries and audit trails\n\nThis repo packages that contract around TikTok's official Content Posting API.\n\n## Install\n\n```bash\nnpm install -g tiktok-agent-publisher\n```\n\nOr run without installing:\n\n```bash\nnpm exec --yes --package=tiktok-agent-publisher -- tiktok-agent-publisher doctor\n```\n\n## First Post (Dry-Run) Walkthrough\n\nNo TikTok credentials are required to try this. With no `.env`, dry-run is on by\ndefault, so every command below returns structured JSON without touching the live\nAPI. This is the exact sequence an agent should follow before its first real post.\nThe outputs are real CLI runs, lightly trimmed.\n\n**1. Check readiness.** `doctor` reports mode and what is still missing — never any\ntoken values.\n\n```bash\n$ tiktok-agent-publisher doctor\n{\n  \"ok\": true,\n  \"dry_run\": true,\n  \"configured\": {\n    \"client_key\": false,\n    \"client_secret\": false,\n    \"access_token\": false,\n    \"refresh_token\": false,\n    \"public_media_base_url\": false,\n    \"supabase_storage\": false\n  },\n  \"missing\": [\n    \"TIKTOK_CLIENT_KEY\",\n    \"TIKTOK_CLIENT_SECRET\",\n    \"TIKTOK_ACCESS_TOKEN\",\n    \"TIKTOK_REFRESH_TOKEN\"\n  ],\n  \"ready_for_live_publish\": false,\n  \"ready_for_direct_video_upload\": false,\n  \"next_steps\": [\n    \"Current mode is dry-run. Use dry-run to validate agent workflow before live posting.\"\n  ]\n}\n```\n\n**2. Confirm the privacy boundaries.** `privacy-audit` states what stays local and\nwhat is sent to TikTok, so the agent can reason about the contract before any write.\n\n```bash\n$ tiktok-agent-publisher privacy-audit\n{\n  \"project\": \"tiktok-agent-publisher\",\n  \"secrets_returned_to_agent\": false,\n  \"token_storage\": \"Environment variables or local .env with user-only file permissions; tokens are never returned by tools.\",\n  \"safety_rules\": [\n    \"Dry-run is the default.\",\n    \"Only post content the user owns or has permission to publish.\",\n    \"Use explicit confirmation before live direct posting.\"\n  ]\n}\n```\n\n**3. Build the publish payload (dry-run).** This validates the job shape and caption\nwithout uploading anything. `result.platformPostId` is a synthetic `dryrun_*` id and\n`raw.dryRun` is `true`, so you can wire up retries and audit logging safely.\n\n```bash\n$ tiktok-agent-publisher publish-video \\\n    --video ./short.mp4 \\\n    --caption \"First agent post — testing the dry-run flow\" \\\n    --title \"Hello from an agent\"\n{\n  \"ok\": true,\n  \"dry_run\": true,\n  \"job\": {\n    \"id\": \"tiktok_1780082349025\",\n    \"platform\": \"tiktok\",\n    \"status\": \"queued\",\n    \"caption\": \"First agent post — testing the dry-run flow\",\n    \"mediaPaths\": [\"./short.mp4\"],\n    \"metadata\": { \"title\": \"Hello from an agent\" }\n  },\n  \"result\": {\n    \"provider\": \"tiktok_official\",\n    \"platformPostId\": \"dryrun_1780082349025\",\n    \"raw\": { \"dryRun\": true, \"jobId\": \"tiktok_1780082349025\" }\n  }\n}\n```\n\n**4. Poll status (dry-run).** `publish-status` returns a `DRY_RUN` status so the\npolling loop can be exercised end to end.\n\n```bash\n$ tiktok-agent-publisher publish-status --publish-id dryrun_1780082349025\n{ \"dryRun\": true, \"publishId\": \"dryrun_1780082349025\", \"status\": \"DRY_RUN\" }\n```\n\n**5. List recent videos (dry-run).** Returns an empty, well-formed list — the same\nshape the live API returns, so post-publish confirmation code works unchanged.\n\n```bash\n$ tiktok-agent-publisher list-videos --max-count 5\n{ \"dryRun\": true, \"videos\": [], \"cursor\": null, \"has_more\": false }\n```\n\n**Going live.** Fill in `TIKTOK_CLIENT_KEY` / `TIKTOK_CLIENT_SECRET` (and complete\nOAuth — see [`auth-url`](#cli)), confirm `doctor` reports `ready_for_live_publish: true`,\nthen set `TIKTOK_DRY_RUN=false`. The same five commands then operate against the real\nContent Posting API.\n\n## CLI\n\n```bash\ntiktok-agent-publisher manifest --client codex\ntiktok-agent-publisher doctor\ntiktok-agent-publisher privacy-audit\ntiktok-agent-publisher auth-url --redirect-uri http://localhost:8787/callback\ntiktok-agent-publisher publish-video --video ./short.mp4 --caption \"Launch copy\"\ntiktok-agent-publisher publish-status --publish-id \u003cpublish_id\u003e\ntiktok-agent-publisher list-videos --max-count 10\n```\n\nDry-run is enabled by default. Set `TIKTOK_DRY_RUN=false` only after `doctor` is clean and you are ready for live API calls.\n\n## MCP\n\nStdio:\n\n```bash\ntiktok-agent-mcp\n```\n\nHTTP:\n\n```bash\nTIKTOK_MCP_TRANSPORT=http tiktok-agent-mcp\n```\n\nHermes-style config:\n\n```yaml\nmcp_servers:\n  tiktok:\n    command: npx\n    args: [\"-y\", \"tiktok-agent-publisher\"]\n    sampling:\n      enabled: false\n```\n\nRecommended first calls:\n\n1. `tiktok_connection_status`\n2. `tiktok_privacy_audit`\n3. `tiktok_publish_video`\n\n## Agent Surfaces\n\n| Tool | Purpose |\n|---|---|\n| `tiktok_agent_manifest` | Install/runtime guidance for Codex, Claude, Cursor, Hermes and OpenClaw |\n| `tiktok_connection_status` | Dry-run, OAuth and media-hosting readiness without token values |\n| `tiktok_privacy_audit` | Local file, token and live-publish boundaries |\n| `tiktok_publish_video` | Dry-run or live video publish flow |\n| `tiktok_publish_status` | Publish-status polling |\n| `tiktok_list_videos` | Recent video list for post-publish checks |\n\n## Copy-Paste Agent Prompt\n\n```text\nUse tiktok-agent-publisher. First call tiktok_connection_status and tiktok_privacy_audit.\nIf dry-run is enabled, build the publish payload only. Do not request or print token values.\n```\n\n## Configuration\n\nCopy `.env.example` to `.env` and fill only the values you need. Do not commit `.env`, token files or `.agent-data/`.\n\nFor 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.\n\n## Safety Model\n\n- Tokens are read from environment or local `.env`; tool responses never include token values.\n- Live publishing is disabled unless `TIKTOK_DRY_RUN=false`.\n- OAuth PKCE verifier is persisted locally in `.agent-data/` and not returned in MCP output.\n- The package uses TikTok's official API surfaces; it does not automate a browser session.\n\n## Development\n\n```bash\nnpm install\nnpm test\nnpm run check\n```\n\n---\n\n## 📧 Contact \u0026 Support\n\n- 📨 **support@delx.ai** — general questions, integration help, partnerships\n- 🐛 **Bug reports / feature requests** — [GitHub Issues](https://github.com/davidmosiah/tiktok-agent-publisher/issues)\n- 🐦 **Updates** — [@delx369](https://x.com/delx369) on X\n- 🌐 **Site** — [wellness.delx.ai](https://wellness.delx.ai)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmosiah%2Ftiktok-agent-publisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidmosiah%2Ftiktok-agent-publisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmosiah%2Ftiktok-agent-publisher/lists"}