Skip to main content
Glama

kairouter-mcp

MCP server exposing KaiRouter's video generation API — BytePlus Seedance family (Seedance 2.0, 2.0 Fast, 2.0 Mini, 1.5 Pro, 1.0 Pro, ...) and any other video model active on KaiRouter — as tools any MCP-compatible agent harness (Claude Code, Codex, Antigravity, ...) can call.

This is a standalone repo — it does not contain any of KaiRouter's backend source, only a thin client for its public/user-scoped HTTP API. Not yet published to npm — run it from a local build for now (see below).

Tools

Tool

Description

list_video_models

List currently active video models on KaiRouter, with pricing and live provider health. No API key required.

generate_video

Start an async video generation job (text-to-video or image-to-video). Returns a job id immediately — does not block until the video is ready. Spends real credits.

check_video_status

Poll a job by id. status is queued | processing | succeeded | failed; video_url is set once succeeded.

wait_for_video_job

Poll a job until it reaches a terminal status (succeeded/failed/cancelled/expired) or a timeout elapses, then return the final job.

list_video_jobs

List the caller's most recent jobs (up to 50), most recent first.

generate_video is async by design — BytePlus video generation can take tens of seconds to a few minutes. Either call generate_video once and poll check_video_status yourself every few seconds, or call wait_for_video_job right after to block until it's done (or times out).

Related MCP server: Gemini Omni MCP Server

Setup

git clone https://github.com/X-OR-Cloud/kairouter-mcp.git
cd kairouter-mcp
npm install
npm run build

This produces dist/index.js. You'll need a KaiRouter API key — create one at https://kairouter.com/dashboard/api-keys.

Claude Code

claude mcp add kairouter -e KAIROUTER_API_KEY=sk-xor-your-key-here -- node /absolute/path/to/kairouter-mcp/dist/index.js

Or add directly to .mcp.json (project) / ~/.claude.json (user):

{
  "mcpServers": {
    "kairouter": {
      "command": "node",
      "args": ["/absolute/path/to/kairouter-mcp/dist/index.js"],
      "env": { "KAIROUTER_API_KEY": "sk-xor-your-key-here" }
    }
  }
}

Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.kairouter]
command = "node"
args = ["/absolute/path/to/kairouter-mcp/dist/index.js"]
env = { KAIROUTER_API_KEY = "sk-xor-your-key-here" }

Antigravity / other MCP-compatible harnesses

Most harnesses accept the same mcpServers JSON block shown above under Claude Code — check the harness's own MCP settings for the exact config file path/UI, since this varies and wasn't verified here for Antigravity specifically.

Configuration

Env var

Required

Default

Notes

KAIROUTER_API_KEY

For generate_video, check_video_status, list_video_jobs

—

From https://kairouter.com/dashboard/api-keys. Not needed for list_video_models, which is a public endpoint.

KAIROUTER_API_URL

No

https://kairouter.com

Override to point at a staging/local KaiRouter instance.

Development

npm run dev    # tsc --watch
npm start      # run the built server directly over stdio (for manual testing with an MCP client)

Available Tools

4 tools
check_video_statusCheck a KaiRouter video job's statusA

Poll the status of a video generation job started with generate_video. status is one of 'queued', 'processing', 'succeeded', 'failed'. Once status is 'succeeded', video_url has the finished video. Poll every few seconds — generation typically takes tens of seconds to a few minutes depending on model and resolution.

Inputs: job_id (required).

generate_videoGenerate a video with KaiRouterA

Start an async video generation job on KaiRouter (e.g. BytePlus Seedance 2.0 / 2.0 Fast / 2.0 Mini / 1.5 Pro / 1.0 Pro — see list_video_models for the exact ids currently available). Returns immediately with a job id and status 'queued'; it does NOT wait for the video to finish. Call check_video_status with the returned id to poll until status is 'succeeded' (or 'failed'). Deducts real credits from the caller's KaiRouter account balance when the job is accepted.

Inputs: model (required), prompt (required), ratio, duration, +6 more.

list_video_jobsList recent KaiRouter video jobsA

List the caller's most recent video generation jobs (up to 50), most recent first. Useful for recovering a job id that was lost, or reviewing recent generations.

Inputs: no named parameters.

list_video_modelsList KaiRouter video modelsA

List the video generation models currently active on KaiRouter (BytePlus Seedance family and others), with id, pricing, and live provider health. Call this first to find a valid model id for generate_video — model availability changes over time, so don't assume a model id without checking here.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clear, non-overlapping purpose: listing available models, listing past jobs, submitting a generation job, and polling its status. There is no ambiguity between them, and the descriptions reinforce distinct roles.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (list_video_models, list_video_jobs, generate_video, check_video_status). The naming is predictable and maintains the same style across the set.

    Tool Count5/5

    With only 4 tools, the set is tightly scoped for its purpose—a video generation API router. Each tool is essential for the core workflow (discover models, generate, check status, review history) without unnecessary extras.

    Completeness4/5

    The toolset covers the primary lifecycle: listing models, creating a job, polling status, and retrieving past jobs. The only minor gap is the lack of cancellation or deletion options, but these are not critical for the core use case and can be worked around.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers