Skip to main content

Overview

Use the Video MCP server from your ATXP-powered agent to create videos based on a prompt.

Example prompts

  • “Create a video of a cat riding a horse. Use a realistic style.”
  • “Create a video of a child and a puppy.”

Tools

Request text-to-video generation based on the given user prompt. After requesting the video, use the waitForVideo tool to wait for completion and get the resulting video. The status will be “success” and the task ID will be returned.

Arguments

Accepts a JSON object with the following properties:
string
required
The natural language description of the video to generate

Response

Returns a JSON object with the following properties:
string
The status of the video generation operation. Returns “success” when the video is generated successfully.
string
The task ID of the video generation operation.
Wait for a previously requested video to be generated and return the video URL. When the video generation is complete, the status will be “success” and the video URL will be returned. If the video is not generated within the timeout, it will return status “in_progress” to indicate the video is still processing.

Arguments

Accepts a JSON object with the following properties:
string
required
The ID of the video generation task to wait for.
number
Maximum time to wait for task completion in seconds.

Response

Returns a JSON object with the following properties:
string
The status of the video generation operation. Returns “success” when the video is generated successfully, “in_progress” if the timeout is reached before completion, or “error” if the generation failed.
string
The URL that the generated video is accessible at (only present when status is “success”).
string
Error message describing what went wrong (only present when status is “error”).
If the timeout is reached before the video completes, the tool will return status: "in_progress" instead of throwing an error. This allows clients to handle the timeout gracefully and check again later if needed.

Usage

1

Define the Video service

Create a reusable service configuration that points to the MCP server and standardizes how you pass arguments and read results. This lets your agent easily interact with the Video tools in a consistent manner.
2

Create an ATXP client

Create a client using an ATXP account by importing the ATXP client SDK and other dependencies.
3

Use the Video service in your agent

Call the Video tool by passing your natural-language instruction as the argument the getArguments method.Read the response using the getResult method.
You should see the result of the video creation printed in your console.