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.

Connect Gemini CLI to DCAST

Let Gemini CLI work in your DCAST account from the terminal: import videos, create live streams, make videos paid and put players on your website. DCAST is a remote MCP server at https://api.dcast.pro/mcp, and Gemini CLI connects to it with a DCAST Partner API key.

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.
  • Gemini CLI on your computer, used with a paid Gemini API key or a Gemini Code Assist Standard or Enterprise license. Since 18 June 2026 Google has moved free and Google One accounts to Google Antigravity: for those, see the Antigravity connector.

Set up the connection

  1. Create a Partner API key in your DCAST account under API keys. Choose the access level the agent needs: read only to look, standard to create and change as well, full to delete as well.
  2. Put the key into the environment variable DCAST_API_KEY of the terminal where you start Gemini CLI: export DCAST_API_KEY=pk_… on macOS and Linux, $env:DCAST_API_KEY="pk_…" in PowerShell. Add the same line to your shell profile so that new terminals have it too.
  3. Run the command below. The single quotes keep $DCAST_API_KEY as written, so Gemini CLI stores the name of the variable, not your key, in ~/.gemini/settings.json and reads the key each time it starts.
gemini mcp add --transport http --scope user --header 'Authorization: Bearer $DCAST_API_KEY' dcast https://api.dcast.pro/mcp
  1. In the same terminal, run gemini mcp list. The line ✓ dcast: https://api.dcast.pro/mcp (http) - Connected means Gemini CLI reached DCAST with your key. If it says Disconnected, see Troubleshooting below.

Check the connection

Start gemini in your project folder and ask: "How much storage do I have left on DCAST?" Gemini CLI calls get_storage_quota and tells you how much storage you have used and how much your plan includes.

Example requests

Write as you would to a colleague. Each request acts on your own DCAST account:

  • "Import https://example.com/talk.mp4 into DCAST as a link-only video and give me the embed code when it is ready."
  • "Make my video Spring workshop paid and set the price to 9 dollars." This needs a payment gateway connected under Monetization in your DCAST dashboard.
  • "Create a live stream called Sunday service and give me the server address and stream key for my encoder."
  • "Add a live player and chat for my DCAST stream to the event page."
  • "Write a webhook endpoint that marks a lesson as ready when its DCAST video has finished processing."

In settings.json

The command writes this entry. You can also put it by hand into ~/.gemini/settings.json for all your projects, or into .gemini/settings.json inside one project. Leave $DCAST_API_KEY in it as written, never the key itself.

{
  "mcpServers": {
    "dcast": {
      "url": "https://api.dcast.pro/mcp",
      "type": "http",
      "headers": {
        "Authorization": "Bearer $DCAST_API_KEY"
      }
    }
  }
}

Access

Gemini CLI connects to DCAST with your Partner API key, and the key's own access level applies: a read-only key can only look, a standard key can also create and change, a full key can also delete. Create a separate key for Gemini CLI, so that you can disable it without touching your other integrations.

To disconnect, disable or delete that key in your DCAST API keys. Gemini CLI then gets no further access.

Troubleshooting

"MCP servers are configured but disabled because this folder is untrusted"

Gemini CLI turns MCP servers off in a folder you have not trusted. Start gemini in your project folder and trust it; gemini mcp list then shows dcast as connected.

dcast shows Disconnected

Gemini CLI did not get a valid key: DCAST_API_KEY is not set in this terminal, the key in it is wrong or incomplete, or the key was disabled or deleted. Set the variable again, or create a new key, and run gemini mcp list.

Paid access needs a payment gateway connected under Monetization in your DCAST dashboard. Until then the request is refused with NO_PAYOUT_GATEWAY. Connect the gateway and ask again.

Signing in with /mcp auth dcast does not last

Gemini CLI also offers a sign-in with /mcp auth dcast, but it does not stay signed in to DCAST: right after signing in it reports Failed to refresh auth token and deletes the sign-in. Use the API key.

Rules for the agent

They tell the agent how to use the DCAST tools and how to put a player on a page so that it looks right: the embed code exactly as the tool returns it, poster images in a list and one player on the page. Put this text into GEMINI.md in the root of your project, or into ~/.gemini/GEMINI.md to apply it to every project.

# 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

Gemini CLI gets the same tools as the Claude connector: named tools for the common jobs (videos, uploads, embed codes, live streams, restreams, 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.

What is sent

When Gemini CLI calls a tool, the tool's arguments (for example a video title or a stream id) and your access token or API key are sent to https://api.dcast.pro/mcp, which passes them to the DCAST Partner API. Nothing else from your conversation or your files is sent. Video files never travel through the connection: they go from your computer or from a link straight to DCAST.

Privacy

DCAST's privacy policy: https://dcast.pro/privacy. Your conversation in Gemini CLI is handled by Google under its own privacy policy.

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