Protocol and examples
TubeOnAI runs a remote MCP server so AI clients can read transcripts for you.
- URL:
<issuer>/mcp. Use exactly the URL shown on the AI tools page of the TubeOnAI site you sign in to. - Transport: Streamable HTTP. Every call is a single
POST /mcpthat returns plain JSON. There is no SSE stream and no session. - Protocol versions:
2025-11-25,2025-06-18,2025-03-26and2024-11-05. A request withoutMCP-Protocol-Versionis treated as2025-03-26. Any other version, including2026-07-28, gets400, so clients that support both fall back toinitialize. - Methods:
initialize,ping,tools/list,tools/calland notifications. - Sign-in: OAuth, discovered from the
401challenge. You can also send an API key asAuthorization: Bearer toa_live_…from clients that let you set headers. See Authentication.
Setup steps for each client are in the README and on the AI tools page.
Tools
The tools use the same service, inputs and outputs as the REST API.
| Tool | Does | Read only |
|---|---|---|
get_transcript | Transcript or full text of a URL, an upload, a selected podcast episode, or a page of an earlier result | No |
get_account | Plan, credits left and free transcripts left today | Yes |
discover_podcast | Find a feed's episodes and publisher transcripts | No |
create_upload | Start a private file upload and get a signed PUT grant | No |
complete_upload | Finish an upload after its bytes are sent | No |
get_upload | Check an upload's verification | Yes |
list_library | Your saved sources, filtered by title words (query), kind and status | Yes |
get_library_item | One saved source: status, link, whether its transcript is ready, its projects | Yes |
add_to_library | Save 1–20 URLs and start extracting their transcripts | No |
delete_library_item | Delete a saved source (needs confirm: true) | No |
list_projects | Your projects with source counts | Yes |
create_project | A project from 2–20 URLs or saved sources | No |
get_project | A project's sources in order | Yes |
rename_project | Rename a project | No |
add_to_project / remove_from_project | Add or remove sources | No |
delete_project | Delete a project; its sources stay saved (needs confirm: true) | No |
list_publish_destinations | Your connected accounts, Telegram chats and WordPress sites | Yes |
create_post | Publish or schedule text (needs confirm: true) | No |
list_posts / get_post | Scheduled and published posts with delivery status | Yes |
reschedule_post / cancel_post | Move or cancel a scheduled post (needs confirm: true) | No |
Library, projects and publishing
These tools act on what you see in the web app. Projects are the multi-source projects of the web app (folders and smart collections stay in the app). Deleting a library item hides it with Undo, as in the app. New sources added by add_to_library use your free daily transcripts and never pay for transcription without your yes; sources added to a collection never use paid transcription.
Deleting and publishing need your yes. Without confirm: true, delete_library_item, delete_project, remove_from_project, create_post, reschedule_post and cancel_post change nothing and return confirmation_required, so the client asks you first. Mutating tools take an idempotency_key; a retry with the same key never repeats the action.
Permissions. When your client connects, the consent page lists what it asked for: reading transcripts, the library and projects (always), changing the library and projects (library:write) and seeing or publishing posts (publish). A tool call the connection wasn't allowed gets HTTP 403 with WWW-Authenticate: Bearer error="insufficient_scope", scope="<scope>", resource_metadata="…" (the MCP scope challenge), so the client can ask you to allow it; reconnect and allow it. See Authentication.
get_transcript
Arguments match the body of POST /v1/ai/transcript: exactly one of url, media_url, id, upload_id or podcast, plus optional format, cursor, poll_only, allow_paid_transcription and allow_image_ocr.
The result is either a ready transcript or a pending status with retry_after_sec. To continue, call again with id and poll_only: true. Read further pages with id and cursor. The first page answers most questions.
Paid transcription needs the user's yes. When a video has no captions, the tool returns an stt_consent_required error that quotes the cost. A well-behaved client asks you before it retries with allow_paid_transcription: true. The server's MCP instructions tell clients never to set it without your explicit yes.
get_account
No arguments. It returns {email, plan, credits_left, free_transcripts_left_today, resets_at}.
discover_podcast
Pass url (a public RSS feed or episode page) and a stable idempotency_key once. Poll with id while it is processing. Then pick one feed and episode and call get_transcript with podcast: {feed_url, episode_guid}. It never imports a whole feed or the latest episode on its own. If the server has podcast transcripts turned off, it returns a service_unavailable error saying so.
Uploads: create_upload, complete_upload, get_upload
create_uploadwithidempotency_key,declared_size_bytes,content_typeand optionaloriginal_filenameandexpected_sha256. It returns an uploadidand a short-lived signed PUT grant.- The client sends the file's bytes with an HTTP PUT to
grant.upload_url, with every header ingrant.headers. The MCP server can't read files on your computer or files attached to a chat. Your client must be able to read the file and make the PUT itself. complete_uploadwithid, thenget_uploadwithiduntilready.get_transcriptwithupload_id.
If your client can't send files, use the CLI (tubeonai transcript --file <path>) or the web app, then ask your client to read the result by its library id.
Results and errors
Successful results include both structuredContent and a JSON text copy in content.
Errors come back as tool results with isError: true, so the model can read them and tell you. The text content, and _meta["tubeonai/error"], hold:
{
"code": "rate_limited",
"message": "You've used all 50 free transcripts for today. …",
"retryable": true,
"action": "upgrade",
"retry_after_sec": 30512,
"link": "https://<your TubeOnAI address>/settings"
}Codes are the REST error codes in lower case. link is set when action is upgrade. details is added when the code has details, such as estimate_credits for stt_consent_required. Protocol problems, such as an unknown tool or method, are JSON-RPC errors.
Example
MCP=https://<your TubeOnAI address>/mcp
KEY=toa_live_...
curl -s -X POST "$MCP" \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"get_transcript","arguments":{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}}}'In a chat, just ask, for example: "What are the key arguments in https://www.youtube.com/watch?v=…?". The client calls get_transcript and answers from the transcript. The transcript is also saved to your library under "From AI tools".