Guides
Quickstart: connect an AI agent over MCP
Connect an AI agent to RPT AI Video Studio in a few minutes: create a token, add the MCP server to your client, check the connection, then make a first video.
1. Create a token
- Sign in as a workspace admin and open Developers in the sidebar.
- Name the token and pick a mode:
plan_onlyto look around,interactiveto build projects,executewhen the agent may also start paid work after a person approves the price. - Pick an expiry of 1, 7 or 30 days. The token covers the whole workspace and every tool of the mode, so it also gets tools added later. For one project or single tools, use Settings, section API & MCP.
- Copy the token: it is shown once. Keep it in an environment variable such as
MCP_API_TOKEN; never paste it into a prompt, a chat or a file in a repository. - For an
executetoken, choose Edit limits in the token list and set a spend cap before the agent starts paid work.
Lost the token, or it expired? Create a new one and revoke the old one in the token list.
2. Add the MCP server to your client
The address is the studio you sign in to, followed by the endpoint path /api/v1/agent/mcp. In the examples, STUDIO_URL holds that address, for example https://<your-studio-host>, and MCP_API_TOKEN holds the token.
claude mcp add --transport http rpt-video "$STUDIO_URL/api/v1/agent/mcp" \
--header "Authorization: Bearer $MCP_API_TOKEN"~/.codex/config.toml[mcp_servers.rpt-video]
url = "https://<your-studio-host>/api/v1/agent/mcp"
bearer_token_env_var = "MCP_API_TOKEN".cursor/mcp.json{
"mcpServers": {
"rpt-video": {
"url": "https://<your-studio-host>/api/v1/agent/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}Other MCP clients, such as a ChatGPT custom connector in developer mode, use the same address with an Authorization: Bearer header. Start with a plan_only or interactive token until you trust the flow.
3. Check the connection
- List the tools (
tools/list). You see only the tools your token’s mode allows. - Call
get_workspacewith no arguments. It returns your workspace id, its name and your role. - Call
list_video_modelswith thatworkspace_id. Use only arefwhoseselectableis true; never guess one. - Once you have a project, call
agent_preflightwith itsproject_id. It returns blockers, warnings and the exactnext_callsfor your token.
get_workspace {}
list_video_models {"workspace_id": "<id from get_workspace>"}
agent_preflight {"project_id": "<project id>"}4. Make a first video
Follow Product clip from one photo: create a project, attach the photo, submit a storyboard, quote, wait for the person’s yes, produce and deliver.
When unsure what comes next, call agent_continue with the project_id. It never spends and never changes anything; it returns one receipt with the next call.
5. When a call fails
- Read
structuredContent.errorand do whatnext_actionsays. The error reference explains the codes. MODE_FORBIDS_TOOL: the token’s mode does not include that tool. A workspace admin creates a token with the right mode.TOKEN_RATE_LIMITEDandTOKEN_CONCURRENCY_LIMIT: wait, then try again.TOKEN_SPEND_CAP_REACHED: tell the person; an admin can raise the cap on the Developers page.- After a timeout or
WRITE_OUTCOME_UNKNOWN, read the state (for example withget_run_progress) before anything else. - Token expired: an admin creates a new one on the Developers page; update the environment variable.