RunAI MCP: connection guide for AI agents (plain text, English) Source of truth: this guide and https://runai.live/llms.txt. The tool list is the live catalog from tools/list. A tool count appears only as a dated snapshot (see TOOL COUNT). WHAT YOU ARE CONNECTING TO - Remote MCP endpoint (OAuth gateway, recommended): https://mcp.runai.live/mcp - Direct JSON-RPC 2.0 endpoint (scripts that already hold a token): POST https://api.runai.live/mcp/rpc - Transport: remote HTTP (JSON-RPC over POST). Methods used: initialize, tools/list, tools/call. - Plan: external MCP access needs the Pro plan or higher. - Tool names, one line each, generated from a tools/list snapshot: https://runai.live/runai-mcp-tools.txt (a plain-text snapshot; the live tools/list result is the source of truth, and plan or account can hide tools). - Tool families (by tool name; AI Movie, RunGames and local engines, RunMail, jobs, mobile, other): see the FAMILIES section of https://runai.live/runai-mcp-tools.txt - Parameter schemas (inputSchema, no login): https://runai.live/runai-mcp-tools.json (snapshot; schema: runai-mcp-tools.json or live tools/list) TOOL COUNT: runai-mcp-tools.txt is generated from runai-mcp-tools.json, so both list the same 202 tool names (a tools/list snapshot taken on 2026-11-28 with a Pro test account). The number you see depends on your plan and scope and can be higher on a newer server build. For the exact list, call tools/list with your own authenticated token (STEP 3); do not rely on 202. STATUS (be honest with the user) - The gateway, discovery and the direct endpoint are deployed. No live AI client has been accepted yet; each client below is listed with its measured state. - If a step fails, report the exact error text and stop. MEASURED STATE (2026-12-02; "measured" = checked with curl or the app, "not measured" = nobody has run that client against RunAI yet) - Gateway https://mcp.runai.live/mcp without a token: answers 401 with discovery metadata. Measured 2026-11-29. - Direct endpoint with a token from POST /api/mcp/oauth/session: tools/list worked (210 tools for a Pro test account) and read-only tools returned data. Measured 2026-11-29. - Paid tool with approval (translate_text): confirmation_required, approval in the RunAI web app, repeat call, charge written. Measured 2026-11-29. - Claude Code, Cursor, VS Code: not measured with a live client. - Claude Desktop and claude.ai (custom connector): not measured. Adding a custom connector depends on your Claude plan; check Anthropic's current plan rules (not verified here). RunAI side: external MCP needs the Pro plan. - Codex: not measured. The exact command (codex mcp add ... --url) and how the OAuth sign-in is started depend on the Codex version (not verified); if the command is rejected, use the config.toml block below. - ChatGPT, Windsurf: not measured. NOT AN ENDPOINT: https://runai.live/mcp is a reading page for humans. Never enter it in a client. The client address is https://mcp.runai.live/mcp. STEP 1: OAUTH SIGN-IN (gateway, no token copy) 1. The client opens https://mcp.runai.live/mcp. The gateway answers 401 and points to its discovery documents. 2. The client reads /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource (OAuth 2.1, PKCE). 3. The client registers itself at /registration (scope "mcp"). 4. The client opens the RunAI sign-in page in the user's browser. The user signs in with their own RunAI account and approves access. 5. The gateway issues an MCP token. It lasts 1 hour. The client re-authorizes when it expires. Rules: never ask the user for a RunAI password. Never paste a password into a prompt, config file or log. STEP 2: CLIENT CONFIGURATION (copy as written) Claude Code (terminal): claude mcp add --transport http runai https://mcp.runai.live/mcp Then run /mcp inside Claude Code and sign in when asked. Cursor (file ~/.cursor/mcp.json, or the project .cursor/mcp.json): { "mcpServers": { "runai": { "url": "https://mcp.runai.live/mcp" } } } The client opens the sign-in page itself. VS Code (file .vscode/mcp.json; the key is "servers"): { "servers": { "runai": { "type": "http", "url": "https://mcp.runai.live/mcp" } } } Codex (terminal): codex mcp add runai --url https://mcp.runai.live/mcp Or add to ~/.codex/config.toml: [mcp_servers.runai] url = "https://mcp.runai.live/mcp" Claude Desktop and claude.ai (custom connector): Settings > Connectors > Add custom connector > URL: https://mcp.runai.live/mcp > sign in with the RunAI account. ChatGPT, Windsurf and other clients: add a remote HTTP MCP server with URL https://mcp.runai.live/mcp. Use the client's own settings screen. Not yet measured. General method for any client with a remote HTTP MCP server screen: open the client's MCP or connector settings, choose "add remote HTTP server" (or custom connector), enter https://mcp.runai.live/mcp, then approve the RunAI sign-in in the browser. The exact menu path of ChatGPT and Windsurf was not verified; do not invent one. Generic JSON for clients that take a header instead of OAuth (scripts only, never commit the token): { "mcpServers": { "runai": { "url": "https://api.runai.live/mcp/rpc", "headers": { "Authorization": "Bearer ${RUNAI_MCP_TOKEN}" } } } } STEP 3: CHECK THE CONNECTION Send (JSON-RPC over POST, with the token): curl -X POST https://api.runai.live/mcp/rpc \ -H "Authorization: Bearer $RUNAI_MCP_TOKEN" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' Expected: a JSON-RPC result with a "tools" array. Each tool has a name, description and inputSchema. Use the names and schemas from this list. Do not guess names or parameters. Known schema gap: artifact_read has "required": [] in the schema because action=list needs no id. For every other action (content, versions, metadata) artifact_id is required; without it the handler returns {"ok":false,"error":"artifact_id required"}. Send artifact_id for those actions. PARAMETER SCHEMAS (read this before any tools/call) - The tool list at runai-mcp-tools.txt and the descriptions in this guide do NOT contain the full parameter schema of every tool. Some tools are described here without their parameter names (for example jobs_wait, mobile_diagnose, list_run_mail_messages, artifact_read, list_run_board_tasks, window_ai_read_film). For those, the schema comes only from tools/list. - Get every tool's inputSchema with one authenticated tools/list call (copy as written, replace the token variable): curl -s -X POST https://api.runai.live/mcp/rpc -H "Authorization: Bearer $RUNAI_MCP_TOKEN" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' > /tmp/runai-tools.json - Read one tool's schema with jq (example: runai_search): jq '.result.tools[] | select(.name=="runai_search") | .inputSchema' /tmp/runai-tools.json - Response shape (the field names are the ones the guide relies on; the values here are an example, not a measured output): {"jsonrpc":"2.0","id":1,"result":{"tools":[{"name":"runai_search","description":"...","inputSchema":{"type":"object","properties":{"query":{"type":"string"}},"required":["query"]}}]}} - Call the tool with the arguments that match its inputSchema. Do not guess a parameter name. If a schema is missing for a tool, say so and stop. STEP 4: CALL A TOOL {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"runai_search","arguments":{"query":"llms.txt standard","mode":"fast","lang":"en"}}} Expected: a result with cited, source-grounded text. runai_answer does deeper research and returns a cited answer. GET A TOKEN FOR A SCRIPT (no OAuth client) The token endpoint accepts only a normal RunAI web session token; the MCP token it returns cannot call it again. 1. Sign in with the RunAI account (email and password required; platform, device_label, device_id optional): curl -s -X POST https://api.runai.live/api/auth/login -H "Content-Type: application/json" -d '{"email":"you@example.com","password":""}' A successful reply has the web session token in the field "token" (plus a "user" object). Keep it in an environment variable, e.g. RUNAI_WEB_TOKEN. Never print it. If the reply has no "token" but an "error"/"code" field, the account needs a second sign-in step (for example a code sent by email on a new device). A script cannot finish that step: use the OAuth gateway (STEP 1) instead. 2. Exchange it: curl -s -X POST https://api.runai.live/api/mcp/oauth/session -H "Authorization: Bearer $RUNAI_WEB_TOKEN" 3. The response has access_token (the MCP token), token_type "Bearer", expires_in 3600, scope "mcp". Store access_token in RUNAI_MCP_TOKEN. It expires after 3600 seconds. There is no refresh: repeat steps 1-2 to get a new one. 4. Use it with the direct endpoint (STEP 3). A token that returns -32002 has expired. Do not invent another login route. APPROVAL FLOW (paid, destructive or money-moving tools) Tools such as translate_text, send_run_mail, jobs_stop, delete/trash tools, window_ai_generate_shot_video, window_ai_lipsync_shots, window_ai_compose_final_film and the godot_* write/run tools need a human approval first. 1. The first call returns ok:false, error "confirmation_required", with confirmation_id, approval_status "pending", expires_in_seconds 600 and approval_endpoint "/api/mcp/approvals". The tool did not run and nothing was charged. 2. Tell the user in plain words what you asked for and that an approval is waiting. The account owner approves it in the RunAI web app (https://runai.live/dashboard): in any open, signed-in RunAI tab a dialog titled "An AI agent wants to do this" appears within about 15 seconds, shows a plain-text description (and the estimated FLZ where one exists) and has an Approve and a Deny button. If no RunAI tab is open, the request waits (up to 10 minutes) until one is. 3. After the user says they approved, repeat the SAME call with the SAME arguments. No token is needed: the server matches the approved request and uses it once. Changing any argument needs a new approval. If the user denied it or the 10 minutes passed, the call returns confirmation_required again with a new request. 4. The agent never approves: an MCP token gets 403 token_scope_forbidden on /api/mcp/approvals and /api/actions/confirm. Do not try to create or confirm the approval yourself. Older path (optional): a one-time confirmation token created by a web session can be sent at the TOP LEVEL of params (not inside arguments). Normal external agents use the steps above. {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"send_run_mail","arguments":{...}}} Paid film steps also need confirmed_flz (the total FLZ the user was told). That number is only a price check against the server's own quote; it never replaces the approval. batch_run cannot run approved tools: call shot video, lip-sync and final film one by one. AI MOVIE FLOW (film Works; tool names start with window_ai_) Call window_ai_film_status before every step: its next_step names the next tool. Order, with cost and approval: 1. Work. window_ai_list_works and window_ai_open_work to continue a film, or window_ai_create_work / window_ai_create_from_template for a new one. Free. 2. Screenplay. window_ai_write_screenplay with scenes[] (free), or with story (starts an LLM job and returns task_id; read it with get_screenplay, then call again with scenes[]). write_screenplay / get_screenplay (without window_ai_) is the older pair for a standalone screenplay outside a film Work; use window_ai_write_screenplay for films. 3. Characters. window_ai_list_character_sources, then window_ai_add_character (generate_avatar=true costs an image credit). 4. Storyboard. window_ai_build_storyboard. Free. 5. Sketch check. window_ai_describe_shot (free) shows the framing of a shot. The user confirms the framing in the AI Movie window (Storyboard, Sketch view, OK). Video is refused with sketch_review_required until then; pass skip_sketch=true only when the user explicitly says to skip it. 6. First frames. window_ai_generate_shot_images (paid image credits, up to 6 shots, runs in the background), then window_ai_approve_shots (free). 7. Cost. window_ai_estimate_film_cost (free). Show the total to the user before any paid call. 8. Video. window_ai_generate_shot_video: PAID, needs a human approval (see APPROVAL FLOW) and confirmed_flz = the total FLZ of all shots in the call. The default model is sagemaker_ltx (one clip takes minutes); model "ltx" selects the Modal path. window_ai_estimate_film_cost prices the same default model. Optional lip-sync: window_ai_lipsync_shots (paid, approval). 9. Final film. window_ai_compose_final_film: no credits, needs approval, runs in the background. LONG JOBS (steps 6, 8, 9 and lip-sync): the reply carries task_id and a read_result block. get_generation_task {task_id} reads the state once; jobs_wait {task_id, timeout_secs} waits on the server. Both read the same job. A video call with several shots can return one task_id per shot (results[].result.task_id and read_result.task_ids); read each one. Cancel with jobs_stop (approval). BIG ANSWERS: window_ai_read_film can be large; use compact=true, fields or scene_range. A very large answer is stored and the reply gives vault_id: read the full text with vault_read. ORDER ERRORS: prerequisites_missing means an earlier step is missing (follow next_step); pass skip_prerequisites=true only if the user insists. The optional "3D layout" of one shot (Model Studio) is a tool of the in-app AI assistant (window_ai_open_3d_layout) and is not part of this MCP catalog. RUNGAMES AND LOCAL ENGINES (the user's own computer) - game_template_list (read-only list of game templates) runs in the cloud. game_engine_status, game_engine_open, game_engine_build, the godot_* tools and the unity_* tools run on the user's own computer through the RunAI desktop app. This catalog has no cloud tool that creates and publishes a game. - The RunAI desktop app must be installed, open and signed in with the same account. If no desktop was seen in the last 30 minutes the call returns ok:false, error device_not_connected. Ask the user to open the app; do not retry in a loop. - A call that was queued answers ok:true with a job_id; the work has not run yet. Write and run tools (create scene, add node, save, run, launch editor, stop) need two approvals: the approval in the web app (APPROVAL FLOW) and then a confirmation inside the desktop app. - Read the outcome of a queued job with device_job_result {job_id} when your tools/list contains it. If it is not in your tools/list, the agent cannot read the result: the REST route GET /api/device-jobs/{id} rejects MCP tokens with 403 token_scope_forbidden. Say so to the user and ask them to check the desktop app. - Use the inputSchema from tools/list for the arguments. The godot_* tools work on a project folder of the user's computer (projectPath; godot_list_projects takes directory). Do not invent paths. BLENDER (the user's own computer) - Blender is not offered through MCP in the published catalog: runai-mcp-tools.json (snapshot 2026-11-28) contains no blender tool. If your own tools/list shows blender_* tools, they follow the same rules as the godot_* tools above (desktop app open, device_not_connected, approval, device_job_result). - desktop_act (clicks and typing on the user's desktop, approval for every action) is not a Blender integration. Do not use it to drive Blender. PRICING AND PLAN - Tools use the same plan limits and credits as the app. Read get_credit_balance before costly work. - For generation, call quote_generation or send dry_run: true first. The reply gives the estimate in FLZ and starts nothing. priced: false means no measured price exists yet. - Prices are not written in this guide. Call get_price_list to read the current price list, and get_credit_balance for the account balance. A tool's cost is shown before a paid action where the tool supports a quote; for create_run_surf_session the price is not stated here, so read get_price_list before starting it. - Video quotes are not measured yet. A video job without a budget needs confirm_unpriced: true, and only after the user was told the cost is unknown. ERRORS AND WHAT TO DO - 401 {"error":"Missing token"}: no Authorization header. Sign in through the connector, or send Authorization: Bearer . - 401 JSON-RPC error -32001 "Not authorized for RunAI MCP.": the token is missing or invalid. Re-authorize. - 401 JSON-RPC error -32002: the token expired. Re-authorize (tokens last 1 hour). - upgrade_required (with required_plan and current_plan): the account is below Pro. Tell the user; do not retry. - confirmation_required: follow the APPROVAL FLOW above (approval is given in the RunAI web app; repeat the same call afterwards). - confirmation_invalid / approval expired: the approval was denied, used or older than 10 minutes. Repeat the call to open a new request. - device_not_connected (godot_*, unity_*, game_engine_*): the RunAI desktop app on the user's PC is not open or not signed in. Ask the user to open it; do not retry in a loop. - local_device_only: the tool can only run on the user's own computer; the server never fakes a result. - sketch_review_required (window_ai_generate_shot_video): the framing check is pending. Follow call_first / next_step in the reply. - prerequisites_missing (AI Movie): an earlier step is missing; follow next_step in the reply. - video_price_changed: confirmed_flz did not match the server quote. Read the per_shot prices in the reply and ask the user again. - step_tool_not_allowed (batch_run): that tool cannot run inside batch_run; call it on its own. - no_account (-32000, list_run_mail_messages / count_run_mail_messages): the account has no active RunMail mailbox. Ask the user to add the RunMail mailbox in the RunAI app (RunMail) first. - confirmation_token_must_be_top_level: the token was placed inside arguments. Move it to params.confirmation_token. - resolution_out_of_range (generation): the image long edge would exceed 2048 px. Choose a smaller resolution. - price_unknown_max_flz: max_flz cannot be used for this video. Remove it and use confirm_unpriced after telling the user. - org_scope_not_ready: the organization scope is not set up for this account. Use a personal Work or ask the organization admin. - no_active_location (get_weather_current): no saved location. Ask the user to save one; do not guess. - weather_unavailable (get_weather_current): provider failure. Report it; do not invent weather. - support_kb_query_failed (search_support_kb): database error. Report it; "no match" is ok:true with total 0. - insufficient_credits with required_credits (translate_text): balance too low. Tell the user; do not retry. - translation_failed (translate_text): the deduction was refunded. Report it. - Any other error: report the error text and the tool name. Do not claim success. RULES FOR THE AGENT - Discover tools with tools/list. Do not assume tool names or parameters. - A tool result is not success until the output is shown to the user (for files: the file exists in RunFiles). - Never write the RunAI password or the token into chat, code, logs or files. DOCS - This guide: https://runai.live/connect-mcp.txt - Agent summary: https://runai.live/llms.txt - Tool list (plain text, generated): https://runai.live/runai-mcp-tools.txt - Developer page (interactive, needs JavaScript): https://runai.live/developer and https://runai.live/developer/docs - Pricing: https://runai.live/pricing HOW AN AGENT USES THE NEW TOOLS Eight of the nine tools below are read-only. translate_text is paid and needs approval. Every call needs Authorization: Bearer . Each call returns only the caller's own data, except the public tools noted. Replace with the token from GET A TOKEN FOR A SCRIPT (or the gateway token). Never print the token. Call shape for every tool (change name and arguments): curl -s -X POST https://api.runai.live/mcp/rpc -H "Authorization: Bearer " -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_calendar_events","arguments":{}}}' Empty results are not errors: a successful call with no data returns ok:true and an empty list (or total 0). Report "no data" for that case. Do not invent data. 1. list_public_careers: open job postings from public organizations. Public data, not limited to the caller. Optional: id (integer >= 1) returns one posting. Example arguments: {} or {"id":12}. Response: ok:true with the postings list. 2. list_distribution_releases: the caller's own music distribution releases, up to 50, newest first. No parameters: {}. Response: ok:true with the releases list. Empty list = no releases yet. 3. search_support_kb: keyword search in the RunAI support knowledge base (public articles). Required: q (string, 1 to 200 characters). Example arguments: {"q":"sifre"}. Response: ok:true, items (list), total (number), query. No match: items [] and total 0, with a "veri yok" note. A database failure returns ok:false with error support_kb_query_failed. 4. get_sos_live: live disaster or SOS events near the caller's saved location. All parameters optional: lat and lon (numbers; default is the saved location), radius_km (10 to 2000, default 1000), days (0.5 to 30, default 7), region (2-letter ISO country code, max 2 characters). Example arguments: {} or {"radius_km":300,"days":2}. Response: ok:true with the events list. Empty list = no events found in that area and time window. 5. get_runtune_analytics: the caller's RunTune track analytics rows (streams, downloads, revenue), up to 100 rows. No parameters: {}. Response: ok:true with the rows. Summary zero or empty list = no tracks yet. 6. list_calendar_events: the caller's own calendar events. No parameters: {}. The tool does not filter by date. It returns the events list, each with start_at, end_at, title, all_day and location. To read tomorrow's events, call with {} and keep only the items whose start_at falls on tomorrow's date in the user's time zone. If the user's time zone is unknown, say so before you answer. Response: ok:true, events (list). Empty list = no events. 7. get_weather_current: current weather for the caller's saved active location. No parameters: {}. The location comes from the account; the tool cannot take a city. Response: ok:true with the weather data (read the returned keys, do not invent values). No saved location: ok:false, error no_active_location. Provider failure: ok:false, error weather_unavailable. If no_active_location, ask the user to save a location in RunAI; do not guess a city. 8. list_run_chat_friends: the caller's RunChat friends with the last message preview and unread count. No parameters: {}. Read-only: this tool cannot send messages. Response: ok:true, friends (list). Empty list = no friends. 9. translate_text: translates text. PAID and NEEDS APPROVAL. Arguments: text (required, string 1 to 5000 characters), source_lang (optional, 2 to 10 characters, default "en"), target_lang (optional, 2 to 10 characters, default "tr"). Example arguments: {"text":"Hello world","source_lang":"en","target_lang":"tr"}. The price is per character at the translate_char rate in the price book. The approval dialog may not show the amount. Do not state a price yourself; the credit history shows the real deduction. Language codes: source_lang and target_lang are free strings of 2 to 10 characters. The code has no fixed list and does not check the value. It passes the code into the translation prompt as text (model Nova Micro). So "zh" and "zh-CN" are both accepted without error; this was not measured for translation quality. Chinese example (target_lang "zh"): curl -s -X POST https://api.runai.live/mcp/rpc -H "Authorization: Bearer " -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"translate_text","arguments":{"text":"Hello world","source_lang":"en","target_lang":"zh"}}}' Step 1, first call WITHOUT a token: curl -s -X POST https://api.runai.live/mcp/rpc -H "Authorization: Bearer " -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"translate_text","arguments":{"text":"Hello world","source_lang":"en","target_lang":"tr"}}}' Result: error "confirmation_required" with confirmation_id and approval_status "pending". Nothing was charged and nothing ran. Step 2, ask the user. Show the text and the target language. The user approves in the RunAI web app (dialog "An AI agent wants to do this"). The agent must not approve on the user's behalf and must not guess approval. Wait for the user's answer. Step 3, repeat the SAME call with the same arguments (no token): curl -s -X POST https://api.runai.live/mcp/rpc -H "Authorization: Bearer " -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"translate_text","arguments":{"text":"Hello world","source_lang":"en","target_lang":"tr"}}}' Success: ok:true and result.translated_text. The translate_char amount is deducted from the credits; it appears in the account credit history. If the translation fails or comes back empty, the service refunds the deduction and returns ok:false with an error text. An approval is single use and tied to this exact text and languages. Changing any argument needs a new approval. Note: if the account is below the plan that includes translation, the result is ok:false with upgrade_required and required_plan. Tell the user; do not retry. Note: if the balance is too low, the result is ok:false, error insufficient_credits, with required_credits. Tell the user; do not retry.