# Veo MCP Server > **Veo MCP Server** is a hosted, multitenant Model Context Protocol (MCP) server run by **MewCP** (https://mewcp.com), giving AI agents managed access to Veo. > > MewCP takes care of all MCP infrastructure for you — credential storage, OAuth flows, > token refresh, and production-grade auto-scaling — so your AI agents can connect to > third-party services and run freely without you managing any MCP server yourself. > > To connect your agent to this server you need a MewCP account and two values: > - MEWCP_KEY — your personal API key (dashboard → Developer) > - CREDENTIAL_ID — the stored credential MewCP securely injects per request > > Server page: https://mewcp.com/mcp/veo > MewCP docs: https://docs.mewcp.com > Full catalog: https://mewcp.com/llms.txt ## About Generate high-quality AI videos from text and image prompts using Google's Veo models. Create visual content, experiment with creative concepts and automate video generation workflows. ## How to connect Server Page URL: https://mewcp.com/mcp/veo Gateway URL: https://gateway.mewcp.com/veo/mcp Every request to this server requires two headers: Authorization: Bearer — your MewCP API key (dashboard → Developer) x-mewcp-credential-id: — the stored credential ID for this service All connection snippets and ready-to-use code examples are available on the server page and in this document below. --- ## Server documentation # Vertex AI Veo MCP Server A stateless Python MCP server for **Google's Vertex AI Veo API** — generate videos from text, images, first/last frames, and extend existing videos. Built with `fastmcp`, following the same patterns as the Google Meet, Google Business, and Zomato MCP servers. --- ## What it does | Category | Tools | |---|---| | 🎬 Video Generation | `generate_video_from_text`, `generate_video_from_image`, `generate_video_from_first_and_last_frame`, `extend_video`, `generate_video_with_style_reference` | | 🔄 Operations | `get_operation_status`, `list_available_models` | **Total: 7 tools** --- ## Available Models | Key | Model ID | Status | Best for | |---|---|---|---| | `veo-3.1` | veo-3.1-generate-preview | Preview | Latest quality, native audio, subject reference | | `veo-3.0` | veo-3.0-generate-preview | Preview | Stable preview | | `veo-2.0` | veo-2.0-generate-001 | **GA ✅** | Production workloads | | `veo-2.0-exp` | veo-2.0-generate-exp | Experimental | Style reference images | --- ## Auth — credentials format Every tool accepts a `VeoAuth` object: ```json { "project_id": "your-google-cloud-project-id", "location": "us-central1", "access_token": "ya29.your_oauth2_access_token" } ``` ### Getting an access token **Option 1 — gcloud CLI (easiest for testing):** ```bash gcloud auth login gcloud auth print-access-token ``` **Option 2 — Service Account (recommended for production):** ```bash gcloud iam service-accounts create veo-mcp-sa gcloud projects add-iam-policy-binding YOUR_PROJECT \ --member="serviceAccount:veo-mcp-sa@YOUR_PROJECT.iam.gserviceaccount.com" \ --role="roles/aiplatform.user" gcloud iam service-accounts keys create service_account.json \ --iam-account=veo-mcp-sa@YOUR_PROJECT.iam.gserviceaccount.com ``` Then get a token from the service account: ```python from google.oauth2 import service_account import google.auth.transport.requests creds = service_account.Credentials.from_service_account_file( 'service_account.json', scopes=['https://www.googleapis.com/auth/cloud-platform'] ) creds.refresh(google.auth.transport.requests.Request()) print(creds.token) ``` --- ## Setup ### 1. Enable the Vertex AI API In [Google Cloud Console](https://console.cloud.google.com): - Go to **APIs & Services → Library** - Search **"Vertex AI API"** → **Enable** ### 2. Install dependencies ```bash pip install -r requirements.txt ``` ### 3. Run the server ```bash python veo_mcp_server.py --transport stdio ``` --- ## Connect to Claude Desktop ```json { "mcpServers": { "veo": { "command": "python", "args": ["/absolute/path/to/veo_mcp_server.py", "--transport", "stdio"] } } } ``` --- ## Tool Examples ### Text to Video ```json { "auth": { "project_id": "my-project", "location": "us-central1", "access_token": "ya29.xxx" }, "prompt": "A golden retriever running on a beach at sunset", "model": "veo-2.0", "aspect_ratio": "16:9", "duration_seconds": 5, "count": 1, "output_gcs_uri": "gs://my-bucket/videos/" } ``` ### Image to Video ```json { "auth": { ... }, "prompt": "The flowers gently sway in the breeze", "image_gcs_uri": "gs://my-bucket/flowers.jpg", "image_mime_type": "image/jpeg", "model": "veo-3.1", "duration_seconds": 5 } ``` ### First + Last Frame ```json { "auth": { ... }, "prompt": "A smooth transition from sunrise to sunset", "first_frame_gcs_uri": "gs://my-bucket/sunrise.jpg", "last_frame_gcs_uri": "gs://my-bucket/sunset.jpg", "duration_seconds": 8 } ``` ### Extend Video ```json { "auth": { ... }, "prompt": "Continue the scene, camera pans right", "video_gcs_uri": "gs://my-bucket/input/clip.mp4", "duration_seconds": 5, "model": "veo-3.1" } ``` --- ## ⚠️ Important Notes - Video generation is a **long-running operation** (typically 30–120 seconds) — the tools automatically poll until completion - If polling times out, use `get_operation_status` with the returned `operation_name` to check later - For `output_gcs_uri` — you must have a GCS bucket created in advance. If not provided, video bytes are returned inline in the response - Pricing: approximately **$0.03/second** of generated video on Vertex AI --- ## Project Structure ``` veo-mcp/ ├── veo_mcp_server.py # Entry point ├── veo_mcp/ │ ├── tools.py # All 7 tool definitions │ ├── service.py # Vertex AI API client + operation polling │ ├── schemas.py # VeoAuth TypedDict │ ├── config.py # Model registry + logging │ ├── cli.py # CLI args parser │ └── __init__.py ├── requirements.txt ├── Dockerfile ├── railway.json └── .gitignore ``` --- ## Connection snippets ### Python (fastmcp) ```python import asyncio from fastmcp import Client from fastmcp.client.transports import StreamableHttpTransport SERVER_URL = "https://gateway.mewcp.com/veo/mcp" MEWCP_KEY = "YOUR_MEWCP_KEY" CREDENTIAL_ID = "YOUR_CREDENTIAL_ID" transport = StreamableHttpTransport( url=SERVER_URL, headers={ "Authorization": f"Bearer {MEWCP_KEY}", "x-mewcp-credential-id": CREDENTIAL_ID, } ) async def main(): client = Client(transport) async with client: await client.ping() tools = await client.list_tools() resources = await client.list_resources() prompts = await client.list_prompts() # Change the tool name and arguments with actual tool and arguments available in server result = await client.call_tool("example_tool", {"param": "value"}) print(result) asyncio.run(main()) ``` ### TypeScript (MCP SDK) ```typescript import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; const SERVER_URL = "https://gateway.mewcp.com/veo/mcp"; const MEWCP_KEY = "YOUR_MEWCP_KEY"; const CREDENTIAL_ID = "YOUR_CREDENTIAL_ID"; const transport = new StreamableHTTPClientTransport(new URL(SERVER_URL), { requestInit: { headers: { Authorization: `Bearer ${MEWCP_KEY}`, "x-mewcp-credential-id": CREDENTIAL_ID, }, }, }); const client = new Client({ name: "mewcp-client", version: "1.0.0", }); await client.connect(transport); const tools = await client.listTools(); console.log("Available tools:", tools.tools.map(t => t.name)); // Change the tool name and arguments to a tool available on your server const result = await client.callTool({ name: "example_tool", arguments: { param: "value" }, }); console.log("Tool result:", result); ``` ### VS Code (settings.json) ```json { "servers": { "mewcp-veo": { "type": "http", "url": "https://gateway.mewcp.com/veo/mcp", "headers": { "Authorization": "Bearer YOUR_MEWCP_KEY", "x-mewcp-credential-id": "YOUR_CREDENTIAL_ID" } } } } ``` ### Cursor (mcp.json) ```json { "mcpServers": { "veo": { "url": "https://gateway.mewcp.com/veo/mcp", "headers": { "Authorization": "Bearer YOUR_MEWCP_KEY", "x-mewcp-credential-id": "YOUR_CREDENTIAL_ID" } } } } ``` ### Claude Desktop (claude_desktop_config.json) ```json "mcpServers": { "veo": { "command": "npx", "args": [ "-y", "mcp-remote@latest", "https://gateway.mewcp.com/veo/mcp", "--transport", "http-only", "--header", "Authorization: Bearer YOUR_MEWCP_KEY", "--header", "x-mewcp-credential-id: YOUR_CREDENTIAL_ID" ] } } ```