# AITrans.Video MCP integration Remote MCP endpoint (no trailing slash): https://aitrans.video/api/ai Language: this guide is also available in Chinese at https://aitrans.video/mcp.txt?lang=zh; English at https://aitrans.video/mcp.txt?lang=en. ## 1. Connect Add the endpoint as a remote MCP connection in your client, then sign in and authorize in the browser. No application, API key or manual account approval is needed. Never use website cookies or API keys. OAuth 2.1 authorization code with S256 PKCE. Clients are public (token_endpoint_auth_method none) and refresh tokens rotate. Discovery: protected resource https://aitrans.video/.well-known/oauth-protected-resource/api/ai ; authorization server https://aitrans.video/.well-known/oauth-authorization-server . Verify issuer, resource and endpoints, and keep the OAuth state. Client ID Metadata Documents (client_id_metadata_document_supported) and open dynamic client registration (registration_endpoint) are both supported, so no pre-registration is needed. Use exact HTTPS callbacks, or loopback callbacks with a variable port. A connection renews while it is used: it ends after 30 idle days or 90 days in total. On 401 refresh the token or reconnect. Keep tokens private. ## 2. Permissions and step-up Scopes: translations:read (tasks this app created for you, and their results; reconnecting the same app keeps them); translations:read_existing (tasks that existed before this connection); translations:projects:read (search all of your account's projects); translations:create (options, website upload links, quotes and task creation); translations:media:upload (direct local upload channel, needs create); translations:subtitles:read (published target subtitle text); translations:outputs:read (one-time download links for the dubbed MP4 and the editor drafts); translations:edit (change finished translations: lines, speaker voices, splits, then re-dub and save; never pre-checked on a first consent, requested by step-up); translations:quotes:confirm (approve a quote in chat; only for clients AITrans.Video has enabled, never for dynamic or metadata-document clients). On the consent page read is always granted. Subtitles with finished files (translations:subtitles:read and translations:outputs:read), upload and create start checked; all-account projects starts checked only for a metadata-document client, whose domain is verified. The user may uncheck any of them; upload requires create. When a tool needs more, it returns 403 insufficient_scope, in the HTTP WWW-Authenticate header and/or in _meta["mcp/www_authenticate"]. Start a new authorization requesting exactly the scope in that challenge, then retry. A 401 on https://aitrans.video/api/ai lists the scopes this deployment supports. The server never asks for quote-confirmation delegation through a challenge. ## 3. Typical task flow New translation: get_translation_options -> request_translation_upload (the user uploads on the website; observe it with get_translation_upload until the verified media is ready) -> prepare_translation -> quote approval -> create_translation -> get_translation (poll) -> get_translation_result. Quote approval has two branches. Website: the user approves at confirmation_url, then call create_translation with the same intent_id. Native chat form (only where AITrans.Video enabled it for your client): call create_translation with the intent_id; that call opens the approval form, and the task is created only after the user approves. Existing projects are not a translation source: list_translation_projects finds them (with projects permission) and request_translation_project / get_translation_project share one project's published subtitles. Their results cannot be passed to prepare_translation. prepare_translation uses verified_media, source_language_mode=auto (or explicit with source_language from options explicit_source_languages and preset_voice_id null, when the user names the spoken language), a target from options (en, zh-CN, pt, ja, th, id, vi), service_mode=express and requested_outputs=[editor]. Copy preset voice IDs exactly from options; omitted target_language means en. UI language never selects the target. Set remove_background_audio=true only when the user asks to drop the original background audio for faster dubbing (the result has only the dubbed voice). A quote is a server fact: nothing is spent until it is confirmed. If settings change, prepare a new quote. Credit allowance: when connecting, the user may allow a spending limit (off by default). Within it create_translation and unlock_translation_feature run without asking; their results carry spend (charged credits, allowance, balance_credits): always tell the user what was charged and what is left. Above the limit only the client's own confirmation form or the website page counts, never a chat reply; never imitate the form. Express unlocks: on a finished Express task, unlock_translation_feature with feature edit (then editing) or editor_draft (Jianying/CapCut export). state confirmation_required: the user unlocks on the returned confirmation_url, then call again. Already unlocked: nothing is charged. Editing (needs translations:edit; finished tasks only): start_translation_edit (state pending: call again; unlock_required: unlock first) -> get_translation_edit_segments (each line has segment_id, source_text, translated_text, text_revision) -> any of update_translation_segments (up to 20 lines, send the text_revision you read; edit_conflict: read again), get_translation_voice_options + set_translation_speaker_voice (one catalog voice for all lines of a speaker; no per-line option, no own or cloned voices), split_translation_segment (2 to 8 pieces whose texts join exactly to the originals) -> finish_translation_edit with action save or discard. Ask the user before save: it replaces the finished video. Changing text, voices and splits spends nothing; re-dubbing and saving use the plan's free per-line edit allowance. Pass edit_session through unchanged. While state is dubbing or pending call again; saving: poll get_translation, then get_translation_result. Drafts (needs translations:outputs:read): request_translation_draft with job_id and format jianying or capcut (draft_root is the user's own draft folder; never guess it). generating: call again after poll_after_seconds. ready: pass artifact to request_translation_download. website_only: give the user website_url, do not call again. unlock_required: see Express unlocks. failed: tell the user; retry true only if they want another try. Downloads: request_translation_download with translation_id and output_key (publish.dubbed_video, editor.jianying_draft_zip, editor.capcut_draft_zip, editor.subtitles_target, editor.subtitles_source, editor.subtitles_bilingual, editor.dubbed_audio_complete, editor.ambient_audio, source.original_video; only outputs get_translation_result lists). Result keys: ticket_url, expires_at, redeem_once, access_after_redeem, output, usage. The link works once and expires after 10 minutes; give it to the user only. After AITrans.Video adds tools, some clients keep an old tool list until the connector is reconnected or refreshed. Workflow skill: this server serves aitrans-video-workflow through the MCP Skills extension (skills/list, skills/get, skill://aitrans-video-workflow/SKILL.md). Without that extension, install it from the public repository sun9bear/aitrans-video-skills on GitHub: a Claude Code plugin, or copy its aitrans-video-workflow folder into ~/.agents/skills/ (steps: https://aitrans.video/connect). ## Tool arguments (fictional IDs) ### get_translation_options Currently available target_languages and official preset voices; search with voice_query, follow voice_cursor with unchanged filters. Arguments: {} ### request_translation_upload Get a website upload link; the user selects the video on the website. Arguments: {"request_key":"example-upload-001"} ### get_translation_upload Observe the upload request until verified media is ready. Arguments: {"request_id":"11111111-1111-4111-8111-111111111111"} ### prepare_translation Freeze a server quote. No spending, no task. Arguments: {"request_key":"example-prepare-001","request":{"source":{"type":"verified_media","value":"22222222-2222-4222-8222-222222222222"},"source_language_mode":"auto","target_language":"en","service_mode":"express","preset_voice_id":"example-use-returned-voice-id","translation_preferences":null,"requested_outputs":["editor"]}} ### create_translation Submit the prepared intent through its confirmation flow. Arguments: {"intent_id":"33333333-3333-4333-8333-333333333333"} ### get_translation Read the original intent, request key or task (exactly one selector). Arguments: {"translation_id":"job_example_001"} ### get_translation_result Project and download links, declared format/role, job edit version, draft facts. Arguments: {"translation_id":"job_example_001","language":"en"} ### list_translation_projects Needs translations:projects:read; filters title, status, target_language; up to 25 per page (fewer when long titles would overflow the 16 KiB response), cursor with unchanged filters. Arguments: {"title":"example project","page_size":7} ### get_translation_result (translations:subtitles:read) Arguments: {"translation_id":"job_example_001","include_subtitles":true,"page_size":1} ## 4. Recovery and results Keep the original request_key, request_id, intent_id and job_id. UNKNOWN or a lost response is not permission to create again or to pay and resubmit: read the original identity instead. Poll get_translation as poll_after_seconds says (normally 30) with bounded backoff for transient errors. Stop on access denial or revocation. Task creation is separate from finished media. get_translation_result returns project_url and downloads only when available; the website's login, ownership, refund and entitlement checks stay final. Downloads declare format (mp4/wav/srt/zip), role and a nullable language. Draft container facts are in draft_outputs; generate a draft with request_translation_draft (section 3). To hand a finished file to the user, call request_translation_download with translation_id and output_key (publish.dubbed_video, editor.jianying_draft_zip or editor.capcut_draft_zip need translations:outputs:read; subtitle keys need translations:subtitles:read). It returns a one-time ticket_url valid for 10 minutes: the user opens it in a browser and presses Download once, or a terminal runs curl -L --data '' -o ''. A used or expired link answers 410: ask for a new one. A new link for the same task and file replaces the earlier one. Never forward the link. Published target subtitle text is optional: pass include_subtitles=true (needs translations:subtitles:read and read access) with page_size 1..200 (fewer whole cues are returned when the 16 KiB response would overflow) and next_cursor, for example the arguments below. Cues are whole and ordered; on 409 subtitle_snapshot_changed restart from the first page; on 413 open the project on the website. Never generate or resubmit to recover a read. ## 5. Reference Setup for each AI client (for people): https://aitrans.video/en/connect (Chinese: https://aitrans.video/connect) Per-tool contracts, limits and error codes: https://aitrans.video/developers Support: https://aitrans.video/en/contact