Let an AI agent publish and embed your videos (MCP)
You want an AI agent (Claude, Cursor, OpenCode, Antigravity or another MCP client) to put your videos on DCAST and on your pages. DCAST runs a remote MCP server: each tool is one operation of the same API, on your own account, with only the access you grant. DCAST hosts, transcodes and delivers the video; it does not generate video.
https://api.dcast.pro/mcp as a connector in your agent and sign in, then ask in plain words: upload this file, make it public and give me the embed code. The agent follows the steps below with the tools in the table. Nobody copies a key.Steps in order
- Connect the agent: add
https://api.dcast.pro/mcpas a remote MCP server. The pages for Claude, Cursor, OpenCode and Antigravity show the exact clicks or file, how to sign in and which access to grant. - Ask for the job in plain words, for example: upload
video.mp4to my DCAST account, make it public and give me the embed code. The agent can calldcast_get_recipeto get the exact tool sequence for the job. - A file on your computer: the agent creates the upload with
create_video_uploadand sends the bytes itself from a terminal (curl -L -X PUT --data-binary). The file does not pass through the connector. - A video behind a public link: the agent calls
import_video_from_urlwith a direct link to the file and follows it withget_import_status. - The agent waits with
get_video_statusuntil the video isREADY, then asksget_video_embed_codeand pastesresponsiveinto your page as returned. - A website that must call DCAST from its own server: the agent runs the DCAST site connector and calls
ask_site_access. You click one Allow link and the key goes straight into the site's environment; nobody copies it.
Tools for this job
These named tools do the job above. Everything else that is documented is reached with dcast_find_operation, dcast_describe_operation and the read, call and delete operation tools, which check the arguments against the API contract before anything is sent. The full list is on the connector pages.
| Tool | What it does |
|---|---|
get_storage_quota | Storage used and the allowance of the plan, to see whether the file fits. |
create_video_upload | Creates the video card and a one-time upload address. Takes title, file_size in bytes and visibility. |
import_video_from_url | Creates a video from a public link to the file; DCAST downloads, stores and transcodes it. |
get_import_status | Where the import is, and the id of the video it created. |
get_video_status | Upload and processing progress. Repeat every 10 to 30 seconds until READY. |
get_video_embed_code | The embed code and address of the video, with the rules for putting it on a page. |
update_video | Changes the title, description or visibility of a video. |
get_embed_domains, set_embed_domains | Reads or replaces the list of websites allowed to show your player. Replacing writes the whole list. |
dcast_search_docs, dcast_get_recipe | Searches the published documentation word for word, and returns the exact tool sequence of a common job. |
ask_site_access | Asks the owner for one Allow click so a website you built can call DCAST from its own server. |
Rules the agent follows
- It never asks you to create, copy or paste a key, a token or an environment value. The server of a website gets its key through
ask_site_access. - It pastes the code from
get_video_embed_codeexactly as returned and never writes an iframe by hand. One player on a page; a list of videos is shown as posters. - Every tool is marked as read, write or delete, so your agent can ask you before it changes anything and before every delete. Read tools need no question.
- For your own videos in a player that is not the DCAST embed, it asks for a playback pass:
GET /videos/:id/playreturns a signedhlsaddress. The bareplayback.hlsaddress of a video answers401 MASTER_PASS_REQUIREDand does not play on its own. The embed stays the permanent way to show a video.
Check the result yourself
The agent works on your account, so you can read what it made with the same API from your own server: the videos, the state of one of them and its embed code.
# The videos that are ready → data[].id, data[].title, data[].status
curl -s -H "Authorization: Bearer pk_YOUR_KEY_HERE" "https://api.dcast.pro/api/v1/videos?status=READY"
# One video's state → data.status, data.progress
curl -s -H "Authorization: Bearer pk_YOUR_KEY_HERE" "https://api.dcast.pro/api/v1/videos/VIDEO_ID/status"
# Its embed code → data.responsive
curl -s -H "Authorization: Bearer pk_YOUR_KEY_HERE" "https://api.dcast.pro/api/v1/videos/VIDEO_ID/embed"
# A player of your own: a signed hls address → data.hls, data.embed
curl -s -H "Authorization: Bearer pk_YOUR_KEY_HERE" "https://api.dcast.pro/api/v1/videos/VIDEO_ID/play"Limits
What the agent can do follows your plan exactly as in the API: storage, quality and streaming hours. A refused call carries code, message and howToFix; a plan limit names the limit and the agent should tell you which plan raises it instead of retrying. The numbers of the Free plan are on Free live streaming and video API.
For AI agents
Connect the DCAST MCP server at https://api.dcast.pro/mcp. Each tool is one API operation, and dcast_get_recipe returns the exact tool-call sequence for a job.
Call dcast_get_recipe without an id to list the recipes, then with an id to get the exact tool calls. Call dcast_search_docs with a few specific words before you write integration code, and do not invent endpoints, fields or limits that it does not return.
Take every address and embed code from a tool answer and run the steps in order. If a call names a plan limit, stop and tell the person which plan raises it instead of retrying.
Never ask the person to create, copy or paste an API key. If the website's own server must call DCAST, call ask_site_access: the person clicks one Allow link and the key goes straight into the site's environment. You never see it.
