Partner API base path is /api/v1 on https://api.dcast.pro. This site documents the live surface; use the Quickstart QA curls to validate keys and routes.

OpenCode connector (MCP)

Build live streaming, video hosting and embeddable players into the sites and platforms you write with OpenCode. The DCAST connector is a remote MCP server at https://api.dcast.pro/mcp: the OpenCode agent works with 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.
  • OpenCode on your computer.

Add DCAST to OpenCode

Add the dcast entry under mcp in opencode.json in your project root, or in ~/.config/opencode/opencode.json to use it in all your projects. If the file already has an mcp section, add only the dcast entry to it.

{
  "mcp": {
    "dcast": {
      "type": "remote",
      "url": "https://api.dcast.pro/mcp"
    }
  }
}
  1. In a terminal, run opencode mcp auth dcast. OpenCode opens the DCAST sign-in page in your browser (on dcast.tv or dcast.pro, depending on your account). Do not enter a client ID or a client secret: OpenCode registers itself with DCAST automatically.
  2. Sign in and choose the access you grant (see Authorization below), then go back to the terminal.
  3. Run opencode mcp list to see the sign-in status of the dcast server.
opencode mcp auth dcast
opencode mcp list

Check the connection

Start OpenCode in your project and ask: "Show my DCAST live streams." The agent calls list_streams and answers with the live streams of your account. On a new account the list is empty, and that also means the connection works.

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.

{
  "mcp": {
    "dcast": {
      "type": "remote",
      "url": "https://api.dcast.pro/mcp",
      "oauth": false,
      "headers": {
        "Authorization": "Bearer {env:DCAST_API_KEY}"
      }
    }
  }
}

"oauth": false tells OpenCode not to start a sign-in for this server, because the key already identifies you. OpenCode reads {env:DCAST_API_KEY} from the environment of the terminal where you start it.

Authorization

Sign-in uses OAuth 2.0 with PKCE through DCAST's own sign-in page. You choose how much to allow, and OpenCode 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; OpenCode then gets no further access. opencode mcp logout dcast removes the sign-in stored on your computer.

Tools

OpenCode 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.

Stream keys are hidden in every answer. The agent 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 the OpenCode 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 in OpenCode is handled by OpenCode and by the model provider you chose there, under their own privacy policies.

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).

OpenCode connector (MCP) — dcast.pro API docs