DEV Community

Cover image for How to Connect Seedance MCP to OpenCode for Terminal-Based Video Workflows
Germey
Germey

Posted on Originally published at platform.acedata.cloud

How to Connect Seedance MCP to OpenCode for Terminal-Based Video Workflows

When a video task starts in a terminal, the awkward part is often context switching: leave the editor, open a separate tool, upload an image, copy the result back, and repeat. This guide shows how to connect a remote Seedance MCP server to OpenCode so a terminal session can request short videos through natural-language instructions.

What you can do

The integration exposes two documented tools:

  • seedance_generate_video for text-to-video generation
  • seedance_generate_video_from_image for image-to-video generation

That covers vertical short clips, product-demo animations, technical opening clips, and other cases where the first draft starts as either a description or an existing image. OpenCode connects to the remote MCP endpoint below; no local MCP server is required.

https://seedance.mcp.acedata.cloud/mcp
Enter fullscreen mode Exit fullscreen mode

Authentication uses a Bearer token in the Authorization header. Keep the real token outside the configuration file and let OpenCode resolve it from an exported environment variable.

How the configuration works

OpenCode reads MCP definitions from opencode.json. Use ~/.config/opencode/opencode.json for a global setup, or opencode.json in a project root for a project-specific setup. The project-level file overrides the global one, so it is a useful place to test the integration first.

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "seedance": {
      "type": "remote",
      "url": "https://seedance.mcp.acedata.cloud/mcp",
      "enabled": true,
      "oauth": false,
      "headers": {
        "Authorization": "Bearer {env:ACEDATACLOUD_API_KEY}"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

type declares a remote MCP connection, url selects the Seedance server, and enabled controls whether OpenCode loads it. The oauth field must explicitly be false: this server expects Bearer authentication, not an OAuth challenge. The headers.Authorization value supplies the token without putting the secret in JSON.

Store the token safely

Export the token before starting OpenCode:

export ACEDATACLOUD_API_KEY="replace with your real token"
Enter fullscreen mode Exit fullscreen mode

Do not commit the real value to Git. If you keep it in a .env file, exporting matters. One documented way to load exported variables into the OpenCode process is:

set -a && source .env && set +a
Enter fullscreen mode Exit fullscreen mode

Otherwise the placeholder may resolve to an empty value. The configuration can look correct while the request still carries an incomplete header.

Verify the MCP handshake

Start with:

opencode mcp list
opencode mcp debug seedance
Enter fullscreen mode Exit fullscreen mode

A successful setup should show the Seedance connection as connected. If you see HTTP 401 or an SSE non-200 error, check these items in order:

  1. ACEDATACLOUD_API_KEY is exported in the shell that launches OpenCode.
  2. The header starts with the exact Bearer prefix.
  3. oauth is present and set to false.

This separates an environment-variable problem from an authentication-mode problem and avoids putting a real secret into debug output.

Try a text-to-video request

After the handshake succeeds, stay in the OpenCode session and describe the output. For example:

Generate a vertical short video: a girl turns under a cherry blossom tree, slow motion, beautiful light and shadow
Enter fullscreen mode Exit fullscreen mode

Specify orientation, subject, movement, and lighting rather than asking for a vague “cool video.” OpenCode can then use seedance_generate_video through MCP while remaining the interface for the request.

A developer-focused smoke test is:

Generate a 3-second video intro: a glowing code symbol </> transitions from blurry to clear, with particle effects in the background, in a tech blue tone
Enter fullscreen mode Exit fullscreen mode

Short prompts are easier to debug before adding references or several creative constraints.

Try image-to-video

When you already have a still image, use the image-to-video capability instead of describing every visual detail again:

Use this image as a cover, generate a video with the camera slowly zooming in
Enter fullscreen mode Exit fullscreen mode

The relevant tool is seedance_generate_video_from_image. This is useful for turning a product screenshot, illustration, or existing cover into a motion asset while preserving the starting composition.

A practical troubleshooting checklist

If the server does not connect, avoid changing several variables at once. Confirm the URL is exactly https://seedance.mcp.acedata.cloud/mcp, verify that the token is available to the OpenCode process, and run opencode mcp debug seedance again. If the connection is healthy but a generation request is not selected, use a model that supports native tool calls, since the available model and tool schema can change over time.

The complete configuration and current tool-list request are in the OpenCode + Seedance MCP guide. The practical takeaway is simple: keep credentials in the environment, keep oauth: false explicit, verify the handshake first, and only then build more elaborate terminal workflows.

Top comments (0)