avideoai-mcp

v1.0.1
io.github.jacklee1000/avideoai-mcp Checked 4 days ago Published 1 month ago

MCP server for avideoai: turn product photos into video ads from Claude and other AI agents.

avideoai MCP server Lets Claude and other MCP clients turn a product photo into a short video ad, paid from your prepaid avideoai credits. It is a thin wrapper over the avideoai REST API. All pricing, limits and refunds are enforced by the API, not here. Published on npm as avideoai-mcp and listed in the official MCP registry as io.github.jacklee1000/avideoai-mcp. Tools | Tool | What it does | Cost | | --- | --- | --- | | create_product_video | Queues a video from image_url + prompt. Returns a video id immediately. | hailuo 2 credits (default), veo 4 credits.

Summary extracted from the README.

avideoai MCP server

Lets Claude and other MCP clients turn a product photo into a short video ad, paid from your prepaid avideoai credits.

It is a thin wrapper over the avideoai REST API. All pricing, limits and refunds are enforced by the API, not here.

Published on npm as avideoai-mcp and listed in the official MCP registry as io.github.jacklee1000/avideoai-mcp.

Tools

Tool What it does Cost
create_product_video Queues a video from image_url + prompt. Returns a video id immediately. hailuo 2 credits (default), veo 4 credits. Refunded automatically if the video fails.
get_video_status Status of a video. When completed, includes video_url (MP4, valid 1 hour). Free
check_credits Current credit balance. Free

A video takes 1–3 minutes. The agent calls create_product_video, then polls get_video_status every 15–30 seconds. Each key may have 3 videos in progress at once and make 30 requests per minute.

Get a key

Buy credits at https://www.avideoai.com/pricing, then create a key at https://www.avideoai.com/account. The key (avk_live_…) is shown once. There are no free API credits.

Install (stdio)

Requires Node.js 20 or later. Each client runs the server with npx, so there is nothing to install first.

Claude Code

claude mcp add avideoai --env AVIDEOAI_API_KEY=avk_live_... -- npx -y avideoai-mcp

Claude Desktop

Add this to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude Desktop:

{
  "mcpServers": {
    "avideoai": {
      "command": "npx",
      "args": ["-y", "avideoai-mcp"],
      "env": { "AVIDEOAI_API_KEY": "avk_live_..." }
    }
  }
}

Cursor

Add the same block to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project:

{
  "mcpServers": {
    "avideoai": {
      "command": "npx",
      "args": ["-y", "avideoai-mcp"],
      "env": { "AVIDEOAI_API_KEY": "avk_live_..." }
    }
  }
}

From a checkout (for development)

cd mcp-server
npm install
npm run build

Then use node with the absolute path to the build instead of npx:

claude mcp add avideoai --env AVIDEOAI_API_KEY=avk_live_... -- node /path/to/aivideoai/mcp-server/dist/src/index.js
{
  "mcpServers": {
    "avideoai": {
      "command": "node",
      "args": ["C:\\path\\to\\aivideoai\\mcp-server\\dist\\src\\index.js"],
      "env": { "AVIDEOAI_API_KEY": "avk_live_..." }
    }
  }
}

Hosted (streamable HTTP)

npm run build
PORT=3000 npm run start:http      # or: MCP_TRANSPORT=http node dist/src/index.js
  • POST /mcp: the MCP endpoint. It is stateless and answers in JSON.
  • GET /health: liveness check.

Every caller sends their own key in Authorization: Bearer avk_live_…, and each request is handled by a server bound to that key. One caller can never spend another caller's credits.

To connect Claude Code to a hosted server:

claude mcp add --transport http avideoai https://<your-mcp-host>/mcp \
  --header "Authorization: Bearer avk_live_..."

AVIDEOAI_API_KEY is ignored over HTTP unless you also set MCP_ALLOW_ENV_KEY=true. Only do that for a private deployment: it makes the server spend that one account's credits for any caller who can reach it.

Deploy on Render

mcp-server/render.yaml defines an avideoai-mcp web service. To use it, go to New → Blueprint and set the Blueprint path to mcp-server/render.yaml. To create the service by hand instead:

  • Root directory: mcp-server
  • Build: npm ci && npm run build
  • Start: node dist/src/index.js --http
  • Health check path: /health

Render sets PORT itself. Once the service is live, set MCP_SERVER_URL on the main web app to the service URL so /docs shows the remote connection command.

Configuration

Variable Default
AVIDEOAI_API_KEY — Required for stdio. Ignored over HTTP unless MCP_ALLOW_ENV_KEY=true.
AVIDEOAI_BASE_URL https://www.avideoai.com API origin. Point it at http://localhost:3000 to test against a local dev server.
MCP_TRANSPORT stdio http is the same as passing --http.
PORT 3000 HTTP port.
MCP_ALLOW_ENV_KEY unset true lets HTTP callers without a key use AVIDEOAI_API_KEY.

Develop

npm install
npm test          # builds, then runs node:test against an in-memory API fake
npx @modelcontextprotocol/inspector node dist/src/index.js