Open source. MIT licensed. Verified on macOS.

Website video. Just ask.

Claude or Codex can request video with your Grok membership. ChatGPT is optional for first frames. No developer API keys.

Verified Grok membership output View evidence
Submission
Confirmed
Duration
6.041667 s
Frame
1280 × 720
Web codec
H.264 / yuv420p
Verification
SHA-256 checked

One local launcher, verified with Codex CLI, Codex Desktop, Claude Code, and Claude Desktop.

From a plain-language request to verified files.

The agent starts a persistent local job, returns its ID immediately, and checks back when the verified bundle is ready.

You ask

“Create a 6-second, 16:9 hero video that matches this site. Use the existing product image, keep the motion subtle, and save the bundle under public/media/hero.”

The agent does

  1. start_website_video Returns a persistent job ID immediately.
  2. get_media_job Reports status without holding the original turn open.
  3. completed Appears only after media, hash, and policy checks pass.

You receive

  • hero.mp4
  • hero-web.mp4
  • hero-poster.jpg
  • hero-first-frame.png
  • hero-manifest.json

The current MCP contract is video-first. Every completed job also publishes its normalized first frame and poster.

Quickstart for macOS

Install once. Use it from either agent.

Requires Python 3.11+, uv, FFmpeg, and a logged-in Grok Build membership. ChatGPT is optional for first frames.

Clone and set up

git clone https://github.com/Zhao73/grok-membership-media-mcp.git
cd grok-membership-media-mcp
./scripts/setup.sh

Codex CLI and Codex Desktop

codex mcp add grok-membership-media -- "$PWD/scripts/run-mcp.sh"

Claude Code

claude mcp add --scope user grok-membership-media -- "$PWD/scripts/run-mcp.sh"
Claude Desktop configuration

Add the same launcher to ~/Library/Application Support/Claude/claude_desktop_config.json.

JSON entry

{
  "mcpServers": {
    "grok-membership-media": {
      "command": "/absolute/path/to/grok-membership-media-mcp/scripts/run-mcp.sh",
      "args": []
    }
  }
}

Five tools. One persistent job.

Start once, check later, and keep the same job state across Claude, Codex, and MCP-client restarts.

44 automated tests cover provider policy, job persistence, retry safety, path containment, publication races, artifact verification, and the public site contract.

media_doctor
Checks membership auth, FFmpeg, storage, and developer-API policy without generating media.
start_website_video
Starts a detached job and returns a persistent job ID.
get_media_job
Returns job state and verified artifacts.
list_media_jobs
Lists recent jobs without starting generation.
cancel_media_job
Stops the local worker. It does not claim to cancel a request already accepted by a provider.

First frames take the safest known route.

Fallback is allowed only before submission is known to have happened. An uncertain provider state always stops the job.

Image supplied
Normalize the image → Grok membership video
No image
ChatGPT browser frame → Grok membership video
Confirmed pre-submit failure
Grok membership image → Grok membership video
Submission uncertain
submitted_unknown → stop and never auto-retry paid quota

Protect quota before, during, and after generation.

The worker removes developer-key variables, reserves output names, serializes Grok media work, stops on uncertain submission state, and publishes only verified files.

Read the architecture plan (中文)
Before submission
Remove API-key variables, reserve the output name, and pin ChatGPT first-frame work to the web backend.
During generation
Reuse idempotent jobs, serialize Grok media work, and persist provider state in SQLite.
Before publication
Decode and hash every artifact, publish the manifest last, and recheck every completed read.

Requirements and limits

Developer APIs?

No. It uses logged-in membership clients and contains no direct xAI or OpenAI developer API adapter or fallback.

Membership limits?

They still apply. Grok image and video generation spends the normal paid membership quota. The project does not expose or bypass remaining-quota limits.

Is ChatGPT required?

No. Supply an existing first frame, or let Grok create one after a confirmed safe pre-submit ChatGPT failure.

Which files are published?

The original MP4, a muted fast-start web MP4, a poster JPEG, the normalized first-frame PNG, and a verified manifest. Current Grok video options are 6 or 10 seconds at 480p or 720p.

Why run FFmpeg?

To decode-test the output, create a web-compatible H.264/yuv420p copy, extract the poster and first frame, and verify hashes before completion.

Verified systems?

macOS is verified with Codex CLI/Desktop, Claude Code, and Claude Desktop. Linux and Windows are not claimed yet.