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
create_video
create_video
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:The natural language description of the video to generate
Response
Returns a JSON object with the following properties:The status of the video generation operation. Returns “success” when the video is generated successfully.
The task ID of the video generation operation.
wait_for_video
wait_for_video
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:The ID of the video generation task to wait for.
Maximum time to wait for task completion in seconds.
Response
Returns a JSON object with the following properties: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.
The URL that the generated video is accessible at (only present when status is “success”).
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
- Using an ATXP account
- Using a Base account
- Using a Solana account
- Using a Worldchain account
- Using a Polygon account
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.