Cursor connector (MCP)
Build live streaming, video hosting and embeddable players into the sites and platforms you write in Cursor. The DCAST connector is a remote MCP server at https://api.dcast.pro/mcp: Cursor's agent works on your own DCAST account with the access you grant, creates streams and uploads, takes embed codes from DCAST and can find and call any documented Partner API operation while it writes your integration. DCAST hosts, transcodes and delivers the video you send it; it does not generate video. Payments are never available.
What you need
- A DCAST account at dcast.pro. Every plan can connect, including the free one. What the agent can do follows your plan exactly as on the website and in the API: storage, streaming hours and features.
- Cursor on your computer.
Add to Cursor in one click
- Open the link above on the computer where Cursor is installed. Cursor asks whether to install the
dcastserver; confirm. - When Cursor asks you to sign in, it opens the DCAST sign-in page (on
dcast.tvordcast.pro, depending on your account). Sign in and choose the access you grant (see Authorization below). You do not enter a client ID or a client secret: Cursor registers itself with DCAST automatically. - Cursor's agent can now use the DCAST tools. Ask it, for example, to put a live player on your site.
Once DCAST is listed in the Cursor Marketplace, you can also install it from Customize → MCPs in Cursor.
Add it by hand (mcp.json)
Put the server into ~/.cursor/mcp.json to use it in all your projects, or into .cursor/mcp.json inside one project to share it with your team through the repository. Sign-in then works as in the steps above.
{
"mcpServers": {
"dcast": {
"url": "https://api.dcast.pro/mcp"
}
}
}With an API key instead of signing in
You can also connect with a DCAST Partner API key that you create in your DCAST account under API keys. The key's own access level (read only, standard, full) applies. Keep the key in the environment variable DCAST_API_KEY, as below, and never write it into the file or the repository.
{
"mcpServers": {
"dcast": {
"url": "https://api.dcast.pro/mcp",
"headers": {
"Authorization": "Bearer ${env:DCAST_API_KEY}"
}
}
}
}Authorization
Sign-in uses OAuth 2.0 with PKCE through DCAST's own sign-in page. You choose how much to allow, and Cursor never sees your password:
- Read (
dcast:read): see your DCAST videos, live streams, multistreams, rooms, playlists, webhooks and statistics. - Write (
dcast:write): create and change videos, live streams, multistreams and playlists. - Delete (
dcast:delete, optional): delete videos, live streams, multistreams and playlists.
To disconnect, disable the key named DCAST connector (OAuth) in your DCAST API keys. Cursor then gets no further access.
The DCAST rule for Cursor
A Cursor rule tells the agent how to build with DCAST: start from a recipe, look facts up in the DCAST documentation instead of guessing, put players on a page only as the embed tools return them, keep API keys and stream keys out of code, and delete nothing without your confirmation.
Add the DCAST rule to Cursor: Cursor shows the rule and adds it after you confirm.
The rule link above adds this text to Cursor as the dcast rule.
# Working with DCAST
DCAST hosts, transcodes and delivers video and live streams for the connected DCAST account. It does not generate video.
The `dcast` MCP server works on that account with the access the user granted.
## Before writing code
- Call `dcast_get_recipe` first (no argument lists the recipes). Follow a recipe's steps in order.
- Call `dcast_search_docs` for anything you are about to rely on: fields, limits, plans, errors, webhooks. Use only what it returns; never invent endpoints, fields, embed markup or limits.
- For any operation without a named tool: `dcast_find_operation` to find it, `dcast_describe_operation` for the exact request, then `dcast_read_operation` (GET), `dcast_call_operation` (POST/PUT/PATCH) or `dcast_delete_operation` (DELETE).
- When you write integration code, take the method, path, fields and headers from `dcast_describe_operation`. The Partner API base is `https://api.dcast.pro/api/v1`.
## Embed codes and addresses
- Players and chat go on a page only as returned by `get_stream_embed_codes` or `get_video_embed_code`. Never write your own iframe, player URL or ingest address.
- Ids, playback links and ingest addresses always come from a tool answer.
## Putting a player on a page
- Paste the code exactly as returned. Use `responsive` (it fills its container's width in the video's shape); `iframe` only for one fixed pixel size (set by width/height).
- The chat skin is asked for, not edited in: on a dark website call get_stream_embed_codes with `theme` `dark` (or `auto`) and paste that answer; never add `?theme=` by hand.
- Never wrap the player in your own frame, border, rounded or fixed-height box, nor set width, height, border-radius or object-fit on the iframe: that cuts off the picture or the controls.
- For a smaller player put `responsive` into a narrower container (e.g. `max-width: 480px`), never a fixed height.
- Several videos on a page: show posters (`thumbnailUrl` from list_videos or get_video) with titles and load the player only for the clicked video: one player on the page, above the list or in a dialog.
- Every embedded player starts playing by itself, muted, once loaded, so never put several player iframes in a grid or list.
- Titles, descriptions and posters come from the API; never invent them.
## Secrets
- A DCAST Partner API key (`pk_...`) is a server-side secret. Read it from an environment variable in server code. A website gets its key from the DCAST site connector: call `ask_site_access` (recipe `website-with-my-videos`); the user clicks Allow and the key lands in the site's environment. Never ask the user to create, copy or paste a key. Never put it in browser code, in a repository, in `mcp.json` as plain text or in a chat answer.
- Stream keys are secret. Call `reveal_stream_key` only when the user asks for the encoder key, and never write a stream key into code or a file.
## Changes and deletes
- Look with `list_*` / `get_*` tools. Create or change only what the user asked for.
- Call `delete_*` tools and `dcast_delete_operation` only after the user confirms; a delete cannot be undone.
## Uploads
- `create_video_upload` returns an upload link; the file bytes go from the user's machine or server straight to that link, never through the chat. `import_video_from_url` takes a direct file link.
- Follow processing with `get_video_status` no more often than every 10 seconds.
## Errors and plan limits
- An error answer carries `code`, `message` and `howToFix`; do what `howToFix` says.
- The errors an operation can answer are listed in `dcast_describe_operation` (`errors`) and every error answer carries `howToFix`: do what it says; no need to look the error up on the website.
- A plan limit names the limit: ask `dcast_search_docs` which plan raises it and tell the user. Do not retry the same call.
Tools
Cursor gets the same tools as the Claude connector: named tools for the common jobs (videos, uploads, embed codes, live streams, multistreams, rooms, playlists, statistics) and tools that find, describe and call every other documented Partner API operation. Cursor asks for your approval before it runs a tool, unless you allowed that tool to run on its own.
If Cursor warns that too many tools are turned on, turn off the room and playlist tools you do not need in Cursor's tool list: dcast_find_operation and dcast_call_operation reach the same operations.
Stream keys are hidden in every answer. Claude shows one only through reveal_stream_key, and only for your own stream, when you ask for it.
Example requests
- "Add a live player and chat for my DCAST stream to the event page."
- "Upload intro.mp4 to DCAST and put the video on the landing page."
- "Write a webhook endpoint that marks a lesson as ready when its DCAST video has finished processing."
- "Create a password-protected stream for our employees and show it on the intranet page."
What is sent
When Cursor's agent calls a tool, the tool's arguments (for example a video title or a stream id) and your access token are sent to https://api.dcast.pro/mcp, which passes them to the DCAST Partner API. Nothing else from your conversation or your code is sent. Video files never go through the connector: an upload goes straight to the upload link DCAST gives, and an import is downloaded by DCAST from the link you provide.
Privacy
DCAST's privacy policy: https://dcast.pro/privacy. Your conversation with Cursor is handled by Cursor under its own privacy policy.
Troubleshooting
Error: "OAuth loopback redirect … could not be bound"
To sign in, desktop Cursor starts a local listener on port 8787, and it is the only address registered for it. If the port is already taken (most often by a stuck earlier sign-in attempt of Cursor itself, less often by another program such as wrangler dev, which uses 8787 by default), Cursor shows this error and the sign-in page does not open in the browser.
- Quit Cursor completely (all windows and the tray icon) and open it again, then press sign-in next to
dcastonce. This is usually enough. - If the error comes back, find out what holds the port. On Windows run
netstat -ano | findstr :8787, thentasklist /FI "PID eq <PID>"with the number from the last column. - On macOS and Linux run
lsof -i :8787. Close the program that holds the port, then press sign-in next todcastin Cursor again.
Support
Write to [email protected]. The REST API behind the connector is documented in the Partner API reference; its limits and error codes apply to the connector too (see Errors and limits).
