Skip to main content
Glama

Seedance MCP

CI License: MIT

A local stdio MCP server that gives Codex and other MCP clients six tools for video generation: inspect models, upload reference images, submit jobs, query progress, download results, and check connectivity.

简体中文 · API mapping · Contributing

This is an independent adapter for the SeeDance-compatible API described below. It is not an official ByteDance, Seedance, or OpenAI project. The default API host (sd2.bantakal.com) is a third-party service; an official Seedance API key is not interchangeable with its dk_ keys. Check your provider's access terms and current pricing before submitting a job. This repository provides the adapter, not API access or model weights.

Requirements

  • Node.js 22 or newer and npm.

  • An account and dk_ API key from a compatible provider, required for authenticated operations.

  • A local MCP client such as Codex. Server discovery works without an API key.

Related MCP server: Gemini Omni MCP Server

Install from source

git clone https://github.com/xiao345/seedance-mcp.git
cd seedance-mcp
npm ci --ignore-scripts
node src/index.mjs --help

No compilation is required. Dependencies are locked in package-lock.json. Installation does not require a credential and does not generate videos. The project is distributed on GitHub; no npm registry installation is assumed.

Configure credentials

On macOS/Linux, create a private configuration file outside the repository:

mkdir -p "$HOME/.config/seedance-mcp"
chmod 700 "$HOME/.config/seedance-mcp"
cp -n .env.example "$HOME/.config/seedance-mcp/.env"
chmod 600 "$HOME/.config/seedance-mcp/.env"

Edit that file and set SEEDANCE_API_KEY to your provider's dk_ key. Do not paste keys into a chat, issue, or commit.

Variable

Default

Purpose

SEEDANCE_API_KEY

Empty

Provider API key

SEEDANCE_BASE_URL

https://sd2.bantakal.com

API origin; HTTPS required outside loopback

SEEDANCE_CONFIG_FILE

~/.config/seedance-mcp/.env

Override credential file location

Environment variables take precedence over the file. Configuration is read on each tool call, so rotating a key does not require restarting the server. A .env file in the checkout is not automatically loaded. On Windows, the default is .config/seedance-mcp/.env under your user home; create it with your editor and restrict its filesystem permissions, or set SEEDANCE_CONFIG_FILE to a private location.

Connect to Codex

From the cloned directory, register absolute paths so desktop startup does not depend on your shell configuration:

codex mcp add seedance -- "$(command -v node)" "$PWD/src/index.mjs"

Then add startup_timeout_sec = 20 and tool_timeout_sec = 120 to the generated [mcp_servers.seedance] table in ~/.codex/config.toml. An equivalent manual configuration is:

[mcp_servers.seedance]
command = "/absolute/path/to/node"
args = ["/absolute/path/to/seedance-mcp/src/index.mjs"]
startup_timeout_sec = 20
tool_timeout_sec = 120

Replace both paths with your actual locations. On Windows, use paths such as C:/Program Files/nodejs/node.exe and C:/projects/seedance-mcp/src/index.mjs. Restart your client after adding a server. An already-open chat may need to be reopened. The CLI and desktop app share the configuration for the same Codex host; see the official Codex MCP documentation.

Other MCP clients can use the same command and args. For clients using mcpServers JSON:

{
  "mcpServers": {
    "seedance": {
      "command": "/absolute/path/to/node",
      "args": ["/absolute/path/to/seedance-mcp/src/index.mjs"]
    }
  }
}

If your client has a per-tool timeout, set it to at least 120 seconds for downloads. Video generation itself is asynchronous and returns immediately.

Tools

Tool

Operation

Inputs

seedance_health

Connectivity and configuration status; no authentication

None

seedance_list_models

Enabled models and current credit prices

None

seedance_upload_image

Send a local reference image to the provider

image_path (absolute)

seedance_create_video

Submit one paid asynchronous job

prompt, optional model, duration, ratio, reference_asset_ids

seedance_get_video

Query status, error, and result metadata

task_id

seedance_download_video

Save a completed video locally

task_id, output_path (absolute)

Defaults: seedance-2.0, 10 seconds, 9:16, 720p, no reference images. For the documented 2.0 model, durations are 10/15 seconds and reference images are limited to eight. seedance-2.5-30s, if enabled by the provider, requires duration: 30. Model availability and price come from seedance_list_models; they may change. Ratios are 9:16, 16:9, and 1:1.

Example request to your MCP client:

Use seedance to make a 10-second 16:9 video of a corgi running across grass, with a slow camera push-in. Keep the task ID, wait for completion, and download it to an absolute path I provide.

For image references, first upload local images, then pass their returned asset IDs in order. A prompt containing @Image2 needs at least two IDs. Images must be PNG/JPEG/WEBP, at most 5 MB each.

Job lifecycle and costs

  1. Query the enabled models.

  2. Optionally upload reference images.

  3. Submit once and retain the task ID. Submission consumes provider credits.

  4. Query every 10–20 seconds until succeeded, failed, or interrupted.

  5. Download completed results promptly. The supplied provider documentation describes an upstream retention window of approximately 24 hours; do not rely on link expiry alone.

The server does not automatically retry POST requests or poll indefinitely inside a tool call. If submission times out, its outcome is unknown: check the provider's generation history before creating another job to avoid duplicate charges. Refund policy is controlled by the provider.

Verification and development

npm run check
npm run format:check
npm test
npm run verify
npm pack --dry-run

Tests use loopback HTTP fixtures and real MCP SDK clients, with no provider credentials or paid generation. npm run verify is offline: it checks the stdio handshake and tool catalog without Codex or an API call.

Optional read-only live checks:

npm run verify:live   # Local entry point: health + authenticated model list
npm run verify:codex  # Same checks using the command registered as seedance in Codex

These require network access and a configured provider key. They do not create videos. verify:codex additionally requires the Codex CLI and its existing server registration.

Data handling and limitations

Prompts, reference images, and API credentials are sent to your configured provider over HTTPS. Downloads write to the exact local path requested by the client. This is a local trusted-client service, not a sandbox: only connect trusted MCP clients and approve intended file operations. There is no telemetry or embedded credential in this adapter.

API requests have a 30-second deadline; downloads have a 90-second network deadline and a 512 MB limit. Downloads use temporary files and atomic no-overwrite publishing. Redirects are limited to five, HTTPS downgrade is refused, and API keys are removed on cross-origin redirects. Failed downloads remove partial files. Existing output files are never replaced.

To unregister from Codex: codex mcp remove seedance. This preserves the checkout and your private configuration file.

License

MIT. Provider access terms and generated-content rights are separate from this software license.

Available Tools

6 tools
seedance_create_video提交视频生成任务A

Create ONE asynchronous video task, consuming account credits (documented Seedance 2.0 price: 20 credits; confirm current price via list_models). Returns provider task id, statusTask, cost and other metadata immediately. Explicitly defaults to seedance-2.0 / 10s / 9:16 / 720p. Never automatically retry submission on network failure: it may have succeeded. Poll with get_video every 10–20 seconds; failed/interrupted tasks are refunded by the provider.

NameRequiredDescriptionDefault
modelNoEnabled model from list_models. seedance-2.0 supports 10/15s; seedance-2.5-30s supports 30s if available.seedance-2.0
ratioNo9:16
promptYesVideo description. @ImageN must have corresponding reference assets.
durationNoSeconds; explicitly set 30 for seedance-2.5-30s.
reference_asset_idsNoUploaded image IDs in prompt order; seedance-2.0 maximum 8.

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare non-read-only, open-world, non-idempotent, non-destructive; the description adds the missing operational context an agent actually needs: credit consumption, the no-retry rule that follows from non-idempotency, provider refunds on failure, and the fact that submission returns immediately rather than blocking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and cost implication, and no sentence is pure filler. It is a dense run of facts, though, and the pricing clause plus the default-summary clause could be tightened without losing function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description still tells the agent what comes back (task id, statusTask, cost, metadata) and how to continue the workflow. For a 5-parameter async creation tool, nothing essential is left for the agent to discover by trial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, so the schema already carries most parameter meaning; the description still adds value by naming the concrete defaults (seedance-2.0 / 10s / 9:16 / 720p) and pointing at the duration/model coupling. The 720p default is not represented in the schema, which is genuinely extra information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (create ONE asynchronous video task) plus the key side effect (consumes account credits) and the immediate return payload (provider task id, statusTask, cost). It is unmistakably distinct from read-only siblings like get_video or list_models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing and sequencing: poll with get_video every 10–20 seconds, never auto-retry on network failure, and confirm pricing via list_models. Both when-to-use and when-not-to-do-something are spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

seedance_download_video下载生成的视频A

Download a succeeded task as an MP4 to an absolute local output path. Returns path, bytes and mime. Creates parent directories; refuses to overwrite an existing file. Streams at most 512 MB with a 90-second network deadline. Partial files are removed on failure. Uses the authenticated file endpoint, with no key forwarding across redirect origins.

NameRequiredDescriptionDefault
task_idYesTask ID returned by seedance_create_video.
output_pathYesAbsolute destination path including .mp4 filename; must not already exist.

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes far beyond the annotations: discloses directory creation, no-overwrite policy, 512 MB stream cap, 90-second network deadline, partial-file cleanup on failure, and constrained key forwarding across redirects. This is exactly the operational context an agent needs for a write-to-disk tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Densely front-loaded: purpose first, then return shape, then the write/overwrite/size/timeout constraints in short declarative clauses. No sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-param write tool with annotations and full schema coverage, the description covers return values (path, bytes, mime), limits, failure behavior, and auth handling. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented with the same .mp4/absolute/not-exist semantics. The description reinforces but does not materially extend parameter meaning beyond what the schema provides, matching the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Download) and resource (a succeeded task as an MP4) plus the destination (an absolute local output path). This makes it distinguishable from seedance_get_video, which would return info rather than write a file to disk.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'a succeeded task' establishes a clear precondition for use, and the disk-write behavior implies when this is appropriate. However, it never explicitly names an alternative (e.g., get_video) or states when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

seedance_get_video查询视频生成进度A
Read-onlyIdempotent

Query task metadata and statusTask: queued/submitted/running/succeeded/failed/interrupted. Poll no faster than once every 10–20 seconds. Terminal states are succeeded, failed and interrupted. A signed result URL may expire; query again to refresh it. Download completed video within 24 hours for retention.

NameRequiredDescriptionDefault
task_idYesTask ID returned by seedance_create_video.

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the read-only, idempotent, and non-destructive annotations, the description discloses rate-limit guidance, terminal-state semantics, signed URL expiry behavior, and retention limits. These are meaningful behavioral details an agent needs before polling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core purpose, then appends polling and lifecycle guidance. The status enumeration is slightly run-on, but no sentence is wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only polling tool with annotations, a fully documented single parameter, and no output schema, the description covers statuses, terminal states, polling cadence, URL expiry, and retention. It gives the agent everything needed to call and interpret the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only one parameter and 100% schema description coverage, the schema already fully documents task_id as the ID returned by seedance_create_video. The description adds no parameter-specific meaning beyond the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: "Query task metadata and status" for a video generation task. It also enumerates the possible statuses, making the tool's role unambiguous relative to creation, listing, and download siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear operational guidance: poll no faster than once every 10–20 seconds, recognize terminal states, refresh expired signed URLs, and download within 24 hours. It does not explicitly name seedance_download_video as the alternative for downloading, so routing is implied rather than fully stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

seedance_health检查 Seedance 连接A
Read-onlyIdempotent

Read-only connectivity check; returns API health, whether a dk_ API key is configured, and the local config file path. Does not authenticate or consume credits. A configured key is not proof it is valid; use seedance_list_models to verify authentication.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover readOnly/idempotent/non-destructive, but the description adds behavior annotations do not: no authentication performed, no credits consumed, and the key-presence-vs-validity caveat. Those are the exact traits an agent needs to interpret a successful health response correctly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short clauses, front-loaded with the operation and return shape, then the caveat and the redirect to the sibling. Every sentence carries distinct information with no repetition of annotations or schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on the job of describing the return payload, which it does by listing the three returned signals. It also closes the main interpretive risk (treating a configured key as a working key), so nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters, so there is nothing to disambiguate and the baseline of 4 applies. The description does not need to add parameter meaning and correctly does not pad the text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Read-only connectivity check') and enumerates what the check returns: API health, dk_ key presence, and local config file path. It also distinguishes itself from seedance_list_models by naming that sibling as the authentication verifier.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when-to-use-this vs use-sibling rule: a configured key is not proof of validity, so use seedance_list_models to verify authentication. It also states the negative condition that this call does not authenticate or consume credits, removing ambiguity about its cost.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

seedance_list_models查询可用视频模型A
Read-onlyIdempotent

List currently enabled video models, names and credit prices. Authenticated read-only request. Call before generation; disabled models return 404. Returns the provider data array.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds context annotations don't: authentication is required, disabled models surface as 404, and only currently enabled models appear. It stops short of describing pagination or rate limits, but adds real value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with purpose and followed by usage and return info; nothing is filler. Minor redundancy: 'Authenticated read-only request' restates annotation hints, but the authentication detail is arguably new information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-param, no-output-schema tool, the definition covers what it does, when to call it, the failure case, and roughly what comes back (provider data array with names and credit prices). A short note on array shape or fields would make it fully airtight, but nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies. The description correctly does not invent parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List currently enabled video models') plus what is returned (names and credit prices). This clearly separates it from siblings like seedance_get_video or seedance_create_video, which act on a single model/video rather than enumerating available models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Call before generation' gives an explicit trigger condition, and 'disabled models return 404' explains a related failure mode. It doesn't name specific sibling alternatives, but the catalog-then-generate flow is clear enough to place the call correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

seedance_upload_image上传本地参考图A

Upload a local PNG/JPEG/WEBP image (maximum 5 MB) as a reference asset. Sends the image to the configured Seedance API and returns its asset id, mime and byte count. Use IDs in reference_asset_ids in the same order as @Image1, @Image2 in your prompt.

NameRequiredDescriptionDefault
image_pathYesAbsolute local path to the image file.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes beyond annotations by disclosing the 5 MB cap, accepted formats, that it sends to the configured Seedance API (open-world), and the exact return payload (asset id, mime, byte count). Annotations already cover the read-only/idempotency profile, so the remaining gaps (auth specifics) are minor.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences: purpose/limit first, then return values, then integration instruction. Zero filler, and the actionable ordering guidance is front-loaded where it matters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description explains the return shape (asset id, mime, byte count), plus size/format constraints and how to use the ID. Nothing an agent needs to invoke or consume this tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and documents image_path as an absolute local path, so the baseline is 3. The description adds file-level constraints (allowed formats, 5 MB max) not encoded in the schema, which meaningfully improves the agent's ability to satisfy the parameter correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (upload) and resource (local reference image) with concrete format (PNG/JPEG/WEBP) and size (5 MB) scope. An agent can immediately distinguish this asset-preparation step from siblings like create_video or download_video.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent how to consume the result: put IDs into reference_asset_ids in the same order as @Image1/@Image2 in the prompt. This is clear downstream guidance; it doesn't state explicit exclusions versus alternatives, but the workflow position is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv1.0.0
    • First observedseedance_create_video
    • First observedseedance_download_video
    • First observedseedance_get_video
    • First observedseedance_health
    • First observedseedance_list_models
    • First observedseedance_upload_image

TDQS

A4.5/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct stage or resource: health/connectivity, model catalog, image upload, task creation, task polling, and file download. The only potentially overlapping pair (health vs. list_models) is explicitly differentiated in the descriptions, with list_models named as the way to verify authentication.

Naming Consistency4/5

All names use a consistent seedance_ prefix with verb_noun patterns (list_models, upload_image, get_video, create_video, download_video). The lone deviation is seedance_health, which has no verb and slightly breaks the pattern, though it remains readable and unambiguous.

Tool Count5/5

Six tools is well-scoped for an asynchronous video generation service: one per lifecycle stage with no redundant or filler tools. Nothing appears missing that would require a separate tool beyond optional extras like cancellation.

Completeness4/5

The full workflow is covered: connectivity check, model/price discovery, reference asset upload, task creation, status polling, and MP4 download with clear terminal-state handling. Minor gaps exist — no cancel task, task listing, or asset management — but agents can work around these using create/get/download.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers