Agent access

Make StoryTok videos from your coding agent

One package, storytok-agent, gives Claude Code, Claude Desktop, Cursor, Windsurf and Codex an MCP server, and gives every other agent a CLI and a skill file. You ask for a video in plain English. The agent writes the script, picks a voice and background from the catalog, shows you the cost in credits, renders it on StoryTok and saves the MP4 into your folder.

It spends the same credits as the app: 1 per rendered minute, 2 with premium voices, from the 3 free trial minutes onward. No plan, no OAuth setup, nothing to host.

The agent renders and downloads; it cannot publish, schedule or connect accounts. Every video it makes is also in your StoryTok library, where the web app can publish or schedule it to connected TikTok, Instagram or YouTube accounts. That needs a video rendered on paid credits (trial videos are watermarked and cannot be published) and costs 1 paid credit per video per account.

Install

Get a key under Settings, Developer API, then paste the line for your client. Replace stk_live_… with the key.

You need Node 20 or newer (node -v); npx downloads the package the first time it runs, which takes a few seconds. Restart your agent after adding the server so it picks the new tool up.

Anthropic's terminal agent. One command, then talk.

claude mcp add storytok -e STORYTOK_API_KEY=stk_live_… -- npx -y storytok-agent mcp

Run it in the folder you make videos from, or add -s user to have it in every folder. If Claude Code is already open, type /mcp to reconnect.

Or skip the key: log in from the terminal

If you would rather not copy a key, run the login command. It prints a short code and a link; approve it in the browser while signed in to StoryTok, and the CLI stores a fresh key for that machine in ~/.config/storytok/config.json. Leave STORYTOK_API_KEY out of your MCP config (it would win over the stored key), then restart the MCP server so it picks the key up.

$ npx -y storytok-agent login
Open https://storytok.ai/connect?code=K7QD4M2X
and approve code K7QD-4M2X (expires in 10 min). Waiting…
Connected as "Claude Code (2026-09-08)". Key saved to your config; STORYTOK_API_KEY overrides it if set.

What the agent can do

ToolWhat it does
get_accountBalance, the key's daily cap and what is left of it, pricing rules
get_catalogValid voice ids (with the premium flag), caption presets, chat themes, backgrounds, music and highlight types
import_reddit_postA Reddit URL to a title, the post body as a script, and the stats for the intro card
create_story_videoA narrated story over gameplay, with an optional Reddit-style intro card
create_texting_storyChat bubbles revealed one by one in a phone theme, a voice per side
create_captions_videoUploads a local video and burns in word-timed captions
create_splitscreen_videoYour clip over gameplay, or the streamer layout that cuts a facecam out of a VOD
create_highlights1 to 20 AI-picked clips from a long recording, each scored with a hook line
get_job / wait_for_jobStatus, stage and charge; wait_for_job blocks until the render finishes
download_jobSaves the MP4 (or every clip plus the zip) into a folder on your machine
list_jobsRecent jobs, filterable by status and type

The CLI mirrors the same list: story, text, captions, splitscreen, highlights, estimate, reddit, job, wait, download, jobs. Run npx -y storytok-agent --help for every flag.

The confirm-cost rule, and the daily cap

Every creating tool is two-phase. Called without confirm it returns an estimate: minutes, credits, your balance, and whether you are short. Only a second call with confirm: true reserves credits and queues the render. The tool descriptions instruct the agent to show you the estimate and wait for a yes, so a sensible agent will not spend on its own. On the CLI the same rule is the --yes flag: without it the command prints the estimate and exits with code 3.

Two more guards sit underneath. Job creation sends an idempotency key derived from the inputs, so a retried call returns the job it already made instead of rendering twice. And every API key carries a rolling 24-hour credit cap, 30 credits by default, which you can change per key under Settings, Developer API. If a render fails for any reason the reservation is refunded automatically.

Three example conversations

A Reddit story from a URL

youTurn https://www.reddit.com/r/tifu/comments/… into a video. GTA footage, Hormozi captions.
agentimport_reddit_post: "TIFU by replying-all to the whole company", 412 words, 3.1k upvotes.
agentI rewrote it as a 140-word first-person script in original wording, not the post verbatim. Voice Matthew, background GTA 1, preset hormozi, intro card on.
agentcreate_story_video estimate: about 55 s, 1 credit. Balance 3. Render it?
youyes
agentcreate_story_video (confirm): job 8f3a… queued. wait_for_job: completed in 96 s, 1 credit charged.
agentdownload_job: ./tifu-reply-all.mp4

A texting story from a premise

youWrite a texting story where my sister texts that she's marrying my ex, then render it.
agentDrafted 22 messages with long pauses before the two reveals. Contact "Sis", iMessage dark, Joanna for her and Matthew for you, Subway Surfers 2 underneath.
agentcreate_texting_story estimate: about 70 s, 2 credits. Balance 3. Go ahead?
youmake it shorter, 1 credit
agentCut to 15 messages. create_texting_story estimate: about 48 s, 1 credit. Go ahead?
youyes
agentwait_for_job: completed. download_job: ./sister-texts.mp4

Captions on a local file

youCaption ./raw/interview.mp4 with the karaoke preset and save it next to it.
agentffprobe says 2 min 14 s. create_captions_video estimate: 3 credits, billed on the source length and settled before rendering. Balance 3. Upload and render?
youyes
agentUploaded 84 MB straight to storage. wait_for_job: completed. download_job: ./raw/interview-captioned.mp4

Troubleshooting

no_api_key
No key in STORYTOK_API_KEY or ~/.config/storytok/config.json. Run npx -y storytok-agent login, or put the key in your MCP config as shown above.
insufficient_credits (402)
The estimate is larger than your balance. The tool refuses to confirm and nothing is charged. Shorten the script, or add a pack at /pricing.
too_many_active_jobs (429)
Three renders are already running on your account. Wait for one to finish (wait_for_job), then retry.
daily_cap_reached (429)
This key has reserved its 24-hour cap, 30 credits by default. Raise it under Settings, Developer API, or wait for the window to roll.
idempotent_replay
Identical inputs rendered recently, so that job was returned instead of a second charge. Pass fresh: true (MCP) or --fresh (CLI) to force a new render.
not_confirmed (CLI exit code 3)
The command printed the estimate and stopped because --yes was not passed. Show the estimate, get a yes, then re-run with --yes.
Server not listed, or npx: command not found
Install Node 20 or newer from nodejs.org and restart your agent. In Claude Code, /mcp shows whether storytok connected and lets you reconnect.

Questions

Do I need a paid plan to use StoryTok from Claude Code?

No. A key works on any account and spends the same credits as the app. New accounts get 3 free trial minutes, which is enough for the first two or three videos. After that, packs start at $5 for 20 credits, and credits never expire.

Can the agent spend credits without asking me?

Not by design. Every creating tool is two-phase: called without confirm it only returns the estimate, and the tool description tells the agent to show you the cost and wait for a yes. On top of that, each key has a rolling 24-hour credit cap, 30 by default, that you can lower or raise under Settings, Developer API. Failed renders refund themselves.

Does it post the video to TikTok for me?

Not the agent. The MCP server, the CLI and the REST API render and download; they cannot publish, schedule or connect social accounts. The finished video is also in your StoryTok library, and the web app can publish or schedule it to connected TikTok, Instagram or YouTube accounts. That needs a completed video without the trial watermark, so one rendered on paid credits, and it costs 1 paid credit per video per account. You can also post the downloaded MP4 yourself.

Which agents and editors are supported?

Claude Code, Claude Desktop, Cursor, Windsurf and Codex through the MCP server (npx -y storytok-agent mcp). Any other agent or shell can use the CLI, and the package ships a skill file that teaches agents without MCP how to drive it.

Do Crayo or AutoShorts have something like this?

Crayo does not as of September 2026: it has a REST API that needs a paid plan and no MCP server or agent integration. AutoShorts has none we could find. Faceless.so does: a Claude skill, an MCP server and a CLI, and its API and CLI can also publish and schedule posts, which StoryTok's agent tooling cannot (Faceless.so developer docs, checked 18 September 2026). Its video generation can be paid for with one-time top-ups without a subscription; its automated series need a plan. Revid and OpusClip have hosted MCP servers. With StoryTok an agent renders on pay-as-you-go credits, 1 per rendered minute, through a local server that needs no OAuth setup and works on the free trial; publishing happens in the web app.

New to this? Start with the step-by-step Claude Code guide. Building something that is not an agent? The raw REST API, job schema and webhook signing are documented at /developers. The package is open source at github.com/juanditb/storytok-agent.