Prompt
Crew goal: 3 TikTok drafts for next week from the clips in footage/week-45. Strategist: pick 3 themes. Writer: a hook and caption for each. Publisher: upload each clip and create a TikTok draft. How to do it
- Connect TikTok and mint a key In https://app.socialhandoff.com, open Connections, connect TikTok, then open TikTok settings on the account and choose visibility, comment/duet/stitch, and commercial disclosure. Then create an agent key named CrewAI scoped to TikTok with draft and schedule permission.
- Load the tools Connect with MCPServerAdapter using transport streamable-http, pointing at https://app.socialhandoff.com/mcp and sending the key as a bearer header. The agent gets attach_media, draft_post, schedule_post, and preview_posts.
- Attach media The agent calls attach_media through the MCP adapter with a public url (or base64 data up to 8 MB) and alt text for the video or up to 35 photos. From plain code, POST https://app.socialhandoff.com/v1/media/import does the same. Pass the ids to draft_post in mediaIds.
- Run the agent Kick off the crew with the footage list. Only the publisher agent holds the MCP tools, including attach_media.
Example draft
We asked 5 baristas the same question: what is the most overrated coffee drink? Number 3 surprised us. #coffee #barista #coffeetok #cafe [Video: 42-second vertical street-interview clip from footage/week-45]
Gotchas
- TikTok refuses text-only posts. The agent can draft the caption first, but approval and scheduling are refused until a video or photos are attached.
- Close the MCPServerAdapter when the crew finishes, or use it as a context manager, so the HTTP session does not linger between runs.
- Until TikTok audits your developer app, every post is private (visible only to the account), the posting account must be private, and only 5 accounts can post per day.
- Media: Every post needs one video or up to 35 photos. Text-only posts are not possible.
- Video upload: Videos upload in chunks of 5 to 64 MB; smaller files go in one piece. Maximum duration depends on the creator account.
- Photo posts: Up to 35 JPEG or WebP images, a title up to 90 characters, and a description up to 4,000 characters.
- Required choices: TikTok requires a visibility setting with no default, comment/duet/stitch toggles, and a commercial content disclosure.
Frequently asked questions
Why are my TikTok posts private?
TikTok limits unaudited developer apps to private posts. Submit your app for TikTok's audit to lift the restriction; until then, posts are visible only to the account.
Which crew member should hold the key?
Give the tools to one publisher agent. Researchers and writers pass it text; only the publisher calls draft_post, which keeps the audit log readable.
Can I post photos instead of a video?
Yes. A TikTok photo post takes up to 35 images. The domain serving them must be verified in the TikTok developer portal.