{"slug": "claude-code-and-mcp-are-changing-how-we-handle-media-assets-in", "title": "Claude Code and MCP are changing how we handle media assets in", "summary": "A developer integrated Google's Gemini Omni Flash model into a FastMCP server to create a stateful video generation skill for the Antigravity CLI, enabling iterative refinement via interaction IDs. The system supports five workflows including text-to-video, image-to-animation, and video restyling, but faces hurdles with latency, cost, and payload size limits. The developer recommends describing changes relative to previous frames for optimal prompt engineering.", "body_md": "# Claude Code and MCP are changing how we handle media assets in\n\n`omni-skill-agy`\n\ninto my local workflow to wrap this model into a FastMCP server, making it a usable skill for the Antigravity CLI. Instead of fighting with a web UI, you can just tell your agent to \"generate a video of a fox running through snow\" and then follow up with \"make it nighttime\" without the scene resetting.## The Technical Mechanics of Omni Flash\n\nThe \"Omni\" capability means the model handles mixed multimodal inputs in a single request. It doesn't just take text; it processes a list of parts including base64 images and documents (videos) uploaded via the [Gemini](/en/tags/gemini/) File API. This allows for five distinct workflows:\n\n**Text-to-Video:** Standard generation in 16:9 or 9:16.**Image-to-Animation:** Taking a still and adding a motion prompt (e.g., \"the group smiles\").**Keyframe Interpolation:** Using two images and a transition prompt to fill the gap.**Subject Consistency:** Using reference images to keep characters consistent across scenes.**Video Restyling:** Taking an external video and re-rendering it (e.g., \"convert this to Pixar style\").\n\nThe secret sauce is the\n\n`store=True`\n\nparameter. When enabled, the API returns an **interaction ID**. Any subsequent call referencing that ID allows the model to retrieve the stored visual state, enabling iterative refinement.\n\n## Implementation: [MCP](/en/tags/mcp/) Server and Tool Calls\n\nTo make this work within an AI workflow, the MCP server maps these capabilities to specific tool calls. If you're setting this up, you need to handle the synchronous nature of the API—these calls block until the video is rendered.\n\nHere is a conceptual look at how the tool parameters are structured for a stateful edit:\n\n```\n{\n  \"tool\": \"generate_video\",\n  \"parameters\": {\n    \"prompt\": \"change the lighting to sunset\",\n    \"interaction_id\": \"inter_abc123_xyz\", \n    \"store\": true,\n    \"aspect_ratio\": \"16:9\"\n  }\n}\n```\n\nIn this snippet, the `interaction_id`\n\nis the anchor. Without it, the model treats the request as a fresh start.\n\n## Real-World Deployment Hurdles\n\nIf you're rolling this out for a team or a project, there are three constraints you can't ignore:\n\n1. **Latency:** Generation is slow. Your agent needs to be configured to handle long-running requests without timing out.\n\n2. **Cost:** It's billable per generation, so loop-based prompting can burn through credits fast.\n\n3. **Payload Size:** Inline base64 works for small clips, but once you hit the ~4MB mark, you must use the File API for delivery to avoid crashes.\n\n## From Scratch: Basic Setup\n\nTo get this running as an Antigravity skill, you'll need the `omni-skill-agy`\n\npackage. The deployment involves configuring your environment variables for the Gemini API and linking the MCP server to your CLI config.\n\n```\n# Install the package\npip install omni-skill-agy\n\n# Set your API Key\nexport GEMINI_API_KEY=\"your_api_key_here\"\n\n# Run the MCP server to expose the skill to your agent\nmcp-server-omni-flash\n```\n\nOnce the server is live, your AI agent can trigger the `generate_video`\n\ntool. I've found that the most effective prompt engineering for this specific model involves describing the *change* relative to the previous frame rather than re-describing the subject. Instead of saying \"A fox in the snow at night,\" just say \"Make it nighttime.\"\n\nThe addition of a YouTube upload tool in the same skill set completes the pipeline. You can move from a text prompt to a published video in a single sequence of tool calls, all while staying inside the terminal.\n\n[Next Claude Code vs Gemini: My Stateful Image Workflow →](/en/threads/2817/)", "url": "https://wpnews.pro/news/claude-code-and-mcp-are-changing-how-we-handle-media-assets-in", "canonical_source": "https://promptcube3.com/en/threads/2841/", "published_at": "2026-07-24 17:46:55+00:00", "updated_at": "2026-07-24 18:10:24.588635+00:00", "lang": "en", "topics": ["generative-ai", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["Google", "Gemini", "Omni Flash", "FastMCP", "Antigravity CLI", "MCP"], "alternates": {"html": "https://wpnews.pro/news/claude-code-and-mcp-are-changing-how-we-handle-media-assets-in", "markdown": "https://wpnews.pro/news/claude-code-and-mcp-are-changing-how-we-handle-media-assets-in.md", "text": "https://wpnews.pro/news/claude-code-and-mcp-are-changing-how-we-handle-media-assets-in.txt", "jsonld": "https://wpnews.pro/news/claude-code-and-mcp-are-changing-how-we-handle-media-assets-in.jsonld"}}