Make and post TikTok videos from Claude Code with MCP
Connect Claude Code, Codex or any MCP client to Pamba's MCP server and go from a prompt to an AI-avatar video scheduled on TikTok, read-only first, with a cap.
Pamba's MCP server gives an MCP client the same tools Pamba's in-app agent uses: the MCP tool reference lists 400 of them in nine toolsets. They cover avatars, video generation, replication, scheduling, accounts and analytics, at https://api.pamba.app/mcp. Connect Claude Code with one command and a workspace API key. Then ask for a video in plain words, and the model chains the tools: pick an avatar, write the script, generate, schedule. Start read-only and with a spend cap. Generation costs credits.
The prompts below are example prompts, written for this guide. Your own workspace's avatars, projects and replies will differ.
How do I get a workspace API key?
In Pamba, open the workspace switcher, then Settings → API keys, and create a key. The secret is shown once. A key belongs to one workspace, and every call runs there.
How do I connect Claude Code safely the first time?
Connect read-only:
claude mcp add --transport http pamba "https://api.pamba.app/mcp?readonly=true" \
--header "X-API-Key: <your workspace API key>"
?readonly=true loads only tools that change nothing, so the first session can explore safely: a read-only connection cannot be talked into a write. Example prompt:
What can you do with Pamba? List my avatars and my last five projects.
The answer comes from the product map the server sends at connection, not from guesses. Expect a summary of what the tools cover, followed by the avatars and projects in your own workspace.
How do I limit the tools and the spend?
Reconnect with only the toolsets you need and a ceiling:
claude mcp remove pamba
claude mcp add --transport http pamba \
"https://api.pamba.app/mcp?toolsets=videos,avatars&max_credits=500" \
--header "X-API-Key: <your workspace API key>"
toolsets=videos,avatarskeeps the model's context small.videosholds projects, generation, scheduling andlist_avatars;avatarsadds appearance, voices and scene libraries.max_credits=500refuses any single credit-spending call whose up-front estimate is above 500 credits, or that cannot be estimated, and charges nothing for the refused call. Over MCP there is no per-turn spending tripwire like the in-app agent's, so set one, and keep your client's own permission prompt on for anything that is not read-only.
How do I ask for a video?
Example prompt:
Using my avatar "Maya", write a 20-second talking video for our language app about the one phrase that stops a conversation going silent. Show me the script before you generate anything.
The model calls list_avatars to find the avatar id, then create_video_project with the script. Once you approve the script it calls generate_video, which generates each clip and stitches the final video in the background, and checks get_project until the video is ready. render_project re-stitches the video after you trim or edit it. What you see depends on your workspace; the point to check is that the model stopped to show you the script before it called a tool that spends credits.
How do I schedule it on TikTok?
schedule_post is in the videos toolset. Add accounts to the toolsets if you also want the account tools (the fleet, profile edits, warming, the posting queue's individual posts). Example prompt:
Schedule it on @yourhandle tomorrow at 6pm Pacific, and label it as AI-generated.
schedule_post books the slot on the phone that runs the account, and ai_label: true turns on TikTok's AI-generated content label before posting (why that matters: Do you have to label AI-generated videos?). A post goes out only if its project is approved at its slot. Scheduling a video that already exists approves it. If you schedule in generate_then_post mode, before the video exists, someone must approve the rendered video before the slot.
How do I connect Codex, Cursor and other clients?
Codex (~/.codex/config.toml):
[mcp_servers.pamba]
url = "https://api.pamba.app/mcp?readonly=true"
http_headers = { "X-API-Key" = "<your workspace API key>" }
Any client that takes a JSON server list uses "type": "http", the same URL and the same header. Chat apps that support remote MCP with OAuth (Claude, ChatGPT and others) can connect without a key. See the visual setup guide.
What should I know before I automate?
- Everything a connection sets up keeps running after you disconnect it: scheduled posts still publish, and campaigns keep spending.
- A workspace on its signup credits alone cannot generate video. It needs a paid plan, account seats or a credit grant first (pricing).
- Posts go out from real accounts, in public, and stay up. Read every video before it is scheduled.
- The full rules (waits, approvals, hand-offs, credits) are in the MCP server guide. Every tool and parameter is in the MCP tool reference.
Frequently asked questions
Can one key reach several workspaces?
No. A key belongs to exactly one workspace and every call runs there. To work in another workspace, connect with that workspace's key, or use an OAuth connection from a chat app, which can cover several workspaces you approve.
Can a read-only connection post anything?
No. With ?readonly=true the write tools are not loaded at all, so the model cannot call them.
Which tool sets the AI label?
schedule_post takes ai_label: true for TikTok and Instagram video posts. Slideshow and Facebook posts refuse it.
