open-media-mcp
Runs the video-generation MCP tools on Amazon Bedrock AgentCore Gateway and integrates AWS services for authentication, prompt and image/video safety with Bedrock Guardrails and Rekognition, storage, queueing, monitoring, and per-job GPU cost reporting in the customer's AWS account.
Supports CUSTOM_JWT authentication through Okta as an identity provider for AgentCore Gateway, allowing Okta-issued tokens to authenticate and tenant-scope MCP tool calls.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
open-media-mcp
Open-weight video generation as MCP tools on Amazon Bedrock AgentCore Gateway, rendered on a scale-to-zero spot GPU in your own AWS account.
Any MCP agent (Claude Code, Kiro, Strands, LangGraph, your own) calls generate_video, gets a job_id back in
under a second, and polls get_job for a presigned mp4, a poster frame and a provenance manifest. One
cdk deploy builds everything, including the Gateway. Nothing listens on the internet, and no GPU bills while
the queue is empty.

Interactive source:
docs/architecture.html. Solid orange = the required job loop; dashed purple = optional add-ons.
Models
Backend | What it makes | License |
| Wan 2.2 A14B: text-to-video and first-frame (optionally first+last frame) to video, 720p, 16 fps, 2-8 s, silent. A soundtrack can be muxed on. | Apache-2.0 |
| MiniMax-H3 / Singularity v1.3: picture and stereo sound in one pass, up to 9 reference images, reference video and audio, keyframes on the timeline, lip-sync to a real song or VO, 768p, 24 fps, 5-15 s. | MiniMax H3 Community License: not licensed in the US, EU, UK or Republic of Korea without MiniMax's written license. Read THIRD_PARTY_MODELS.md. |
Adding a model is one Python file in worker/backends/ (weights list + ComfyUI graph) and one JSON entry of
limits. See Adding a backend.
Related MCP server: flickies
What enterprises get
Need | How the stack handles it |
No public endpoint | AgentCore Gateway with |
Who did what | A Gateway REQUEST interceptor stamps the verified caller ( |
Content safety | Prompts pass an Amazon Bedrock Guardrail (created for you with MEDIUM filters, tunable per category, or bring your own) before any GPU time is spent. Input images and 6 sampled output frames pass Amazon Rekognition moderation; flagged renders go to |
Provenance | Each output gets a manifest: input SHA-256s, backend, model files, seed, steps, ComfyUI commit, worker instance, guardrail and moderation results, output SHA-256. The mp4 carries |
Chargeback | Every job records its GPU seconds, the live price of the instance it ran on, and its USD cost. |
Cost control | Spot first across GPU types and AZs (on-demand switch is one tool call), one GPU per outstanding job up to |
Reliability | SQS lease heartbeats while rendering; a spot interruption notice hands the job straight back; crashed jobs retry 3 times, then dead-letter (alarmed). A 2-minute reconciler guarantees queued work always has a GPU coming. Idempotency keys make agent retries safe. |
Data protection | Customer managed KMS key (rotation on) for the bucket, table, queues and topic; TLS-only bucket with public access blocked; encrypted EBS; IMDSv2; lifecycle expiry for inputs (7 d), outputs (30 d) and job records (90 d). |
Networking | New VPC with no inbound path by default; |
Operations | CloudWatch dashboard (queue, jobs, render time, GPUs, tool calls), alarms for dead letters, failure bursts and a stuck queue (SNS email), EventBridge |
The tools
Tool | Does |
| Enabled backends with limits, prompt tag syntax, render estimates, safety settings, live GPU state. |
| Presigned PUT URL (15 min) for an input image, video or audio; returns the |
| Validate, screen the prompt, record, enqueue; returns |
| Status ( |
| Your recent jobs, newest first, optional status filter. |
| Cancel queued or running work (a running render is interrupted on the GPU). |
|
|
| Chargeback: exact GPU cost per job (time on the GPU x the live spot or on-demand price), USD per second of video, grouped by backend or by any job label ( |
Deploy
Prerequisites: an AWS account with spot or on-demand G-instance quota (g7e.4xlarge = 16 vCPUs; check
"All G and VT Spot Instance Requests" in Service Quotas), Node 18+, AWS CDK v2, Python 3.11+ for the client.
Bedrock AgentCore Gateway must be available in the region (us-east-1 and us-west-2 have both the gateway and g7e).
git clone https://github.com/tycenjmccann/open-media-mcp && cd open-media-mcp
npm ci
npx cdk bootstrap # once per account/region
npx cdk deploy # ~8 min; prints GatewayUrlCommon options (all in cdk.json, override with -c key=value):
npx cdk deploy -c media:maxInstances=3 -c media:idleMinutes=30 # fan out to 3 GPUs, stay warm longer
npx cdk deploy -c media:auth=jwt \
-c media:jwtDiscoveryUrl=https://cognito-idp.us-east-1.amazonaws.com/<pool>/.well-known/openid-configuration \
-c media:jwtAllowedClients=<app-client-id> # your IdP instead of SigV4
npx cdk deploy -c media:privateNetworking=true # private subnets + NAT
npx cdk deploy -c media:guardrail=<guardrail-id>:<version> # your company guardrail
npx cdk deploy -c media:alarmEmail=oncall@example.com
npx cdk deploy -c media:backends=wan2.2,h3 # add MiniMax-H3: license required in the US, EU, UK, KR (THIRD_PARTY_MODELS.md)First boot downloads the weights from Hugging Face (Wan 2.2 is about 70 GB) and caches them in the stack's bucket, so every later boot, including spot replacements, comes from S3 in a few minutes.
Connect an agent
Claude Code / any stdio MCP client through AWS's SigV4 proxy:
{
"mcpServers": {
"open-media": {
"command": "uvx",
"args": ["mcp-proxy-for-aws@latest", "<GatewayUrl>", "--service", "bedrock-agentcore", "--region", "us-east-1"]
}
}
}Python (the repo's client, also the smoke test):
pip install "mcp>=1.9" httpx botocore
export GATEWAY_URL=<GatewayUrl>
python examples/mcp_client.py tools
python examples/mcp_client.py generate --prompt "A lighthouse keeper climbs a spiral stair at dusk, lantern swinging" --out clip.mp4
python examples/mcp_client.py generate --first-frame still.png --prompt "She turns to camera and smiles" --aspect 9:16 --out c2.mp4An agent running in AgentCore Runtime already has an execution role: grant it
bedrock-agentcore:InvokeGateway on the gateway ARN and sign with its ambient credentials.
Speed and cost
Measured on one g7e.4xlarge (RTX PRO 6000 Blackwell, 96 GB), 5 s clips:
Backend | Quality | Render |
|
| 79 s |
|
| 669 s (about 11 min) |
|
| about 3 min (a 15 s clip: about 19.5 min) |
|
| about 1 min |
|
|
|
|
Same prompt and seed, both rendered through the MCP (frame at 2.5 s).
Iterate on draft4, then re-run the keeper on full with the same seed. The first ever boot (weights from
Hugging Face, about 70 GB for Wan 2.2) reached its first render in about 6 minutes; later boots load from S3.
What a clip costs
GPU cost per 5 s clip on spot g7e.4xlarge (USD 1.27/hour in us-east-1 on 2026-11-02; on-demand is USD 4.00):
Here (your account) | Render | Cost per 5 s clip |
Wan 2.2 720p, | 79 s | USD 0.03 |
Wan 2.2 720p, | 669 s | USD 0.24 |
MiniMax-H3 768p with audio, | about 3 min | USD 0.06 |
Each warm-up adds a cold start (about USD 0.13) and the idle tail before scale-in (20 min, about USD 0.42), so the more clips per session, the cheaper each one gets. Fixed cost while idle: the KMS key (USD 1/month) and the S3 weight cache (about USD 1.6/month for Wan 2.2).
Hosted API list prices for a 5 s clip, read from each pricing page on 2026-11-02:
Hosted API | Tier | Per 5 s clip |
fal, Wan 2.2 A14B (same model as | 720p | USD 0.40 |
Replicate, Wan 2.2 A14B image-to-video | 720p | about USD 1.00 |
fal, MiniMax H3-max | 768p | USD 0.40 |
Google Vertex, Veo 3.1 / Fast / Lite (with audio) | 720p | USD 2.00 / 0.50 / 0.25 |
Google, Omni Flash 1.1 | 720p | USD 0.51 |
xAI, Grok Imagine Video 1.5 / Lite | 720p | USD 0.70 / 0.15 |
fal, Kling 2.6 Pro (audio on) / Kling 4.0 | 720p | USD 0.70 / 0.79 |
fal, Seedance 2.5 | 720p | USD 2.37 |
Runway Gen-4.5 · Luma Ray3.2 | 720p | USD 0.60 · 0.30 |
When this wins: volume and iteration (50 drafts in one session is about USD 2 all in), data that must stay in your account, one governed endpoint for many agents and teams. When an API wins: a handful of one-off clips (a single full Wan clip with a cold start costs about USD 0.79 here vs USD 0.40 on fal), or when you need the top closed models (Veo 3.1, Kling 4.0) for quality.
Repo layout
bin/app.ts, lib/open-media-mcp-stack.ts CDK stack (everything, incl. AgentCore Gateway + target + interceptor)
tools.json MCP tool schemas (the Gateway target's inline schema)
lambda/tools/ the 8 tools + per-backend limits (backends.json)
lambda/interceptor/ Gateway REQUEST interceptor: verified caller identity
worker/setup.sh per-boot bootstrap: uv venv, torch, ComfyUI, weights, systemd
worker/worker.py SQS loop, media prep, ComfyUI, moderation, provenance, S3, events
worker/backends/ wan22.py, h3.py (add yours here)
examples/mcp_client.py SigV4 MCP client + end-to-end smoke test
examples/batch.py submit a JSON list of jobs, wait, download, write results + cost
docs/architecture.html the diagram aboveTeardown
npx cdk destroyThe bucket, table and KMS key are retained by default (media:retainData), so outputs and the weight cache
survive. Empty and delete them by hand, or deploy with -c media:retainData=false first.
Status
v0.1. Wan 2.2 is the tested default; the H3 backend's ComfyUI graph is a 1:1 port of the client we used for production music-video takes (unit-tested for graph equality). Next backends: Wan 2.2 S2V (audio-driven lip-sync, Apache-2.0), ACE-Step (music, Apache-2.0), Qwen-Image (stills for start frames, Apache-2.0).
License
Apache-2.0 for this code. Model weights are under their own licenses: see THIRD_PARTY_MODELS.md.
This server cannot be deployed
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Build, run, schedule, and publish AI video pipelines to YouTube and TikTok from any MCP client.
Create images & video from any MCP agent — 17 models, spend limits, one URL.
Plan, compare, price, generate, and recover AI video from compatible MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes video generation and editing tools to MCP-capable clients, enabling text-to-video, image-to-video, video editing, reusable voice and character profiles, and task status queries through natural language.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to drive a self-hosted video toolkit through MCP tools, including lipsync, face restoration, ffmpeg operations, and metadata retrieval.1Do What The F*ck You Want To Public
- FlicenseAqualityBmaintenanceEnables AI agents to generate videos from text prompts, monitor job status, retrieve completed videos, and cancel ongoing generation tasks through stdio-based MCP tools.4-
- AlicenseNot gradedqualityCmaintenanceAn MCP server that gives agents a video engine for cutting beat-synced 9:16 shorts from existing footage, generating original short films from a prompt, and swapping characters in a clip while preserving motion and sound. It handles the deterministic work — scene detection, tracked crops, captions and rendering — while generation runs on private Hugging Face ZeroGPU Spaces in the user's own account.Apache 2.0

