AI Gateway MCP
It turns a chat app into a media studio: generate and edit pictures, video and speech with 400+ AI Gateway models, billed to your own Vercel AI Gateway credits.
Pictures —
generate_image(text-to-image),edit_image(restyle, remove/replace background, outpaint, combine up to 4 images, optional mask),upscale_image(Topaz, sharper/larger).Video —
start_video(text-to-video, image-to-video, first-to-last frame, reference-to-video with up to 4 references, optional sound),motion_control(copy moves from a reference video onto a character),edit_videoandextend_video(Grok Imagine),upscale_video(Topaz),get_videoto poll any job and fetch expiring download links.Voice —
generate_speech(narration/voice-over with voice, speed, language, style controls),transcribe(audio or video to text, optional timestamps).Text —
generate_textwith any language model, optionally reading up to 10 images, videos, audio or PDFs.Models and account —
list_models(catalog with types, capabilities and prices),check_credits(remaining credits and 30-day connector spend),list_files(previously made media with fresh links).Cost control — image/video tools accept
estimate_onlyto price a job without running it.Extras — results render inline as an image grid, video player and audio players in MCP Apps clients like Claude; video jobs return a
job_idand run asynchronously.
Runs on your own Vercel account and calls Vercel AI Gateway with Vercel's OIDC token to generate images, video, speech and transcriptions using any model in the gateway catalog (Veo, Kling, FLUX, Nano Banana, GPT Image, Seedance, Whisper, TTS, etc.), billed to your own Vercel credits. Also exposes tools to list models with their AI Gateway catalog prices and to check remaining credits, and relies on Vercel Blob storage plus Vercel spend budgets to store outputs and cap spending.
The provider's own price, right inside your chat. No markup, no subscription, no API key. Add this connector to Claude, ChatGPT or any MCP app and it can make pictures, video and voice with 400+ models on Vercel AI Gateway: Veo, Kling, Seedance, Nano Banana, GPT Image, FLUX and more. You run your own copy on your own Vercel account, so every call is paid from your own Gateway credits at the price the provider sets.
What you can make
Ask in plain words. Your chat does the thinking and the writing with everything it already knows about you; the connector makes the pictures, the video and the voice.
Costs are AI Gateway catalog prices from October 2026, for the example quantities shown. They are examples, not quotes: the provider's bill can differ from the catalog (see What it costs), and each call reports what it actually cost. Ask list_models for today's catalog.
Related MCP server: Aetherwave Studio
How it works
You ask in chat. Claude, ChatGPT or any app that speaks MCP picks the right tool.
Your own copy answers. It runs on your Vercel account and checks your secret link.
AI Gateway runs the model, billed to your own credits at the provider's price. No API key: your copy signs in with Vercel's own token.
What is MCP? The Model Context Protocol is how chat apps plug in outside tools. This project is one of those tools: once you add its link, your chat app can make things with any model on AI Gateway.
Get started
You need a Vercel account and a GitHub, GitLab or Bitbucket account.
Then set a spend budget in the Vercel dashboard (AI Gateway → Budgets). It is the real limit on what your link can ever spend.
Your copy comes with its own setup page
Open your copy and it shows where you are: an arch of six stones, one per step. Set stones glow, the next one breathes, and clicking a stone opens its step.
Once every step is done, the guide steps aside for good. From then on your page opens on the brand and goes straight to your usage. If anything comes undone later (say MCP_SECRET_SHA256 is removed), the guide comes back by itself.
What it costs
Nothing from this project: it is free and MIT licensed, with no plan and no fee. You pay what each provider charges, with no markup, through your own AI Gateway credits, and every Vercel team gets free monthly credits for a set of models. In Vercel's words (AI Gateway pricing):
AI Gateway charges no markup and no platform fee on tokens. You pay the provider's list price on a pay-as-you-go basis.
You ask for | Model | Catalog price |
A picture |
| $0.007 |
A picture |
| $0.134 |
An edit of your own photo |
| $0.04 |
8 seconds of video, with sound |
| $1.20 |
10 seconds of motion copied onto a character |
| $1.26 |
1,000 words read aloud |
| about $0.17 |
An hour of speech written down |
| $0.36 |
From the AI Gateway catalog, October 2026. The catalog is a guide, not the bill: the provider's charge can differ. In October 2026 bfl/flux-3-image was listed at $0.024 for a 1024x1024 picture while Black Forest Labs billed $0.048 (passed on with no surcharge); the catalog has since been corrected. Each call reports its actual cost; ask list_models for today's catalog.
This project is not made by or affiliated with Vercel. Version 1 means you run your own copy, so setup is as short as I could make it: the goal is for everyone to use AI at the price providers actually set.
Tools
Your chat app picks these for you; you never have to name them. Every tool returns readable errors that name the model: unknown model, not enough credits, video not on your plan, provider errors.
Tool | What it does |
| Lists the models in the AI Gateway catalog with their type ( |
| Generates text. Returns the text plus its cost when AI Gateway reports one. With |
| Works with image models ( |
| Changes existing images from an instruction. Works with edit-capable image models ( |
| Makes an image sharper and larger. Uses |
| Starts a video job and returns a |
| Makes the character in a picture move like the person in a reference video (Kling motion control). |
| Makes a video sharper and larger and cleans up noise (Topaz Proteus by default). |
| Changes an existing video from an instruction (Grok Imagine Video, up to 720p). |
| Continues a video from its last frame (Grok Imagine Video). |
| On the image and video tools: returns the price from the AI Gateway catalog instead of running. Nothing is generated or charged. Often a range, because resolution or audio is left to the model's defaults; token-priced models (e.g. |
| For every video tool above: reports whether the job is still generating. Each call waits up to 40 s; after 3 minutes it tells the chat app to stop checking until you ask. When it finishes, the video is saved to your Blob store and you get an expiring link; call it again later for a fresh one. |
| Turns text into speech ( |
| Turns speech in an audio or video file (up to 25 MB) into text, optionally with timestamps. |
| Shows the team's AI Gateway credits and what this connector spent in the last 30 days. The spend part needs AI Gateway's usage report, which Vercel offers on paid plans only; on Hobby it says so, and each reply still shows what that call cost. |
| Lists the pictures, videos and audio this connector made, newest first, with fresh expiring links. |
Inline viewer. In chat apps that support MCP Apps (Claude on the web, desktop and phone), generate_image, edit_image, upscale_image, get_video and list_files show their result right in the conversation: a picture grid, a video player and audio players, with Download, Upscale and Extend. Upscale and Extend ask the chat to run the tool, so nothing is spent behind your back. Other apps get the same pictures and links as plain content. If the Claude desktop app shows "Unable to reach AI Gateway" where the viewer should be after you change the connector URL (for example after rotating the secret), quit it fully (Cmd+Q on a Mac) and open it again.
Keep it safe
Your link works like a password that spends money. Anyone who has it can use your AI Gateway credits. Keep it private.
Set an AI Gateway budget. Only Vercel's budget limits your total spend.
If the link leaks, make a new secret on your setup page, put its fingerprint in Project Settings → Environment Variables and redeploy. The old link stops working at once.
Your usage is yours. Anyone can open your setup page, but the numbers only appear for someone who has your secret.
Your connector URL works like a password that spends money. Anyone who has it can use your AI Gateway credits and generate content under your Vercel account.
Set an AI Gateway budget. This server caps each call (
MAX_VIDEO_SECONDS,MAX_IMAGES_PER_CALL,MAX_SPEECH_CHARACTERS,ALLOWED_MODELS), but only Vercel's budget limits your total spend. Tools that start from your own video (motion_control,upscale_video,edit_video) follow its length, which the per-call caps cannot see.Rotate the secret if the URL leaks. Set a new fingerprint (or
MCP_SECRET) and redeploy. The old URL stops working right away, and any unfinished video jobs are abandoned.Optional: rate-limit the endpoint. Guessing is hopeless, but every wrong request still counts toward your project's usage. If your plan includes Vercel Firewall rate limiting, add a rule for paths starting with
/mcp/(for example, by IP). Do not turn on Attack Challenge Mode for it: Claude's and ChatGPT's servers cannot solve the challenge, so your connector would stop working.Files are private, but links are not. Pictures, videos and audio are stored in a private Blob store. Anyone who holds one of the links returned in chat can open that file until the link expires (
SIGNED_URL_TTL_HOURS).Usage stats need the secret.
POST /api/statschecks it in constant time and answers 404 otherwise. Remembering the secret in a browser lets anyone using that browser see your usage; "Forget" removes it.Logs: this app never logs the secret or request URLs. Vercel's own request logs record request paths, so members of your Vercel team can see the secret there.
Generated media is stored exactly as the provider returns it. Watermarks and metadata are never removed.
Reference
Your secret
Your connector link is your deployment's address plus the secret. The setup page builds it in your browser:
https://<your-project>.vercel.app/mcp/<your-secret>The secret is a random value of at least 32 characters. The Deploy button doesn't ask for it: a fresh copy starts with the endpoint off, and its setup page makes one in your browser and remembers it there, so your link is filled in after the redeploy.
Vercel never gets the secret itself, only its SHA-256 fingerprint as MCP_SECRET_SHA256. A fingerprint can't be turned back into the secret, so anyone who can read your environment variables, or the chat you pasted the setup prompt into, still can't use your connector. The other side of this: Vercel can't show you your secret either. If you lose the browser that holds it (and it isn't in your phone or your chat app's connector settings), make a new one and redeploy.
To do it yourself: make a secret with openssl rand -hex 32, and set MCP_SECRET_SHA256 to the output of printf %s '<your-secret>' | shasum -a 256 (the hex part). For local development a plain MCP_SECRET=<your-secret> is simpler; the fingerprint wins when both are set. Use URL-safe characters only; hex is ideal.
A random 64-character hex secret holds 256 bits: guessing it over the network is not possible in practice, and every wrong guess gets the same 404 as any unknown URL, compared in constant time. Secrets typed by hand are the weak spot, so the endpoint also stays off when the secret has fewer than 8 different characters or repeats one short block (aaaa…, passwordpassword…).
claude.ai custom connectors only support OAuth or no auth, and they can't send custom headers, so the secret goes in the URL path. If no secret is set (or a plain MCP_SECRET is shorter than 32 characters, or the fingerprint isn't 64 hex characters), the MCP endpoint is disabled. A wrong secret gets the same 404 page as any unknown URL.
Variable | Default | Purpose |
| none (this or | SHA-256 fingerprint (hex) of the secret in the connector URL. Set by the setup page; wins over |
| none | The secret itself, at least 32 characters. Simpler for local development. |
|
| Longest video |
|
| Highest |
|
| Longest text |
| empty (all models) | Comma-separated allowlist of model ids. |
|
| How long file links stay valid. The maximum is 168 (7 days). |
| unset | Optional. Use it for local development. When set, it replaces the OIDC token. |
Vercel sets the Blob variables (BLOB_STORE_ID, plus BLOB_READ_WRITE_TOKEN as a fallback) and VERCEL_OIDC_TOKEN automatically when the store is connected. Without a Blob store, text, pictures and voice still work inline; video and file links need one. Create a private Blob store under the project's Storage tab, connect it and redeploy. The setup page links there.
npm install
vercel link && vercel env pull # pulls MCP_SECRET_SHA256, Blob and a 12-hour OIDC token into .env.local
# or put AI_GATEWAY_API_KEY=... and MCP_SECRET=... in .env.local
npm run devTest the server with the MCP Inspector:
npx @modelcontextprotocol/inspector@latestChoose Streamable HTTP and connect to http://localhost:3000/mcp/<MCP_SECRET>.
The same tools also run over stdio, for local MCP clients and for directories that start the server to list its tools (Glama does this). Your deployment does not use it.
npm run build:stdio # bundles scripts/stdio.ts into dist/stdio.mjs
AI_GATEWAY_API_KEY=... MCP_SECRET=... node dist/stdio.mjsA stdio server is a process you start yourself, so it has no secret check: it spends whatever Gateway key it is given. MCP_SECRET only signs video job ids there. Listing the tools needs no variables at all.
Two development-only addresses preview states you cannot reach without a deployment: /?preview-open shows the page as it looks once setup is done, and /?sample-stats fills the usage with sample numbers.
Setup page:
/checks the deployment live and guides each step, then hides the guide once every required step is done (agateway-opencookie, ignored whenever a server check fails). Black and white, drawn in code, with motion that rests finished under reduced motion./setupredirects there.Usage stats: every call from this server carries AI Gateway tags (
ai-gateway-mcp,tool:<name>,client:<app>, the app guessed from its User-Agent). The setup page reads AI Gateway's own spend report filtered by those tags, so there is no database. The report is a paid-plan feature: on Hobby, Vercel answers 403 and the page says so instead (credits still show). Keeping our own log in Blob was ruled out: Hobby includes 2,000 Blob advanced operations a month, and going over blocks Blob for 30 days.Inline viewer: one MCP Apps resource,
ui://gateway-mcp/media.html, built fromui/byscripts/build-ui.mjs(esbuild, beforedev,buildandtypecheck). Its CSP allowshttps://*.blob.vercel-storage.comfor images and media.Stack: Next.js (App Router) and TypeScript. MCP is served over Streamable HTTP using
mcp-handlerv2, and model calls go through the AI SDK with the AI Gateway provider.Secret check:
proxy.tsrejects a wrong secret before routing by rewriting it to the standard 404 page. The route handler then checks the secret again, in constant time.Media in, media out: files you give a tool are downloaded by the server (https only, size-capped), so this server's own private links work as input. Video jobs send theirs as links, since AI Gateway keeps a job's start request small.
Video jobs: no database. Each
job_idholds the model and the AI Gateway job id, signed with a key derived from the fingerprint (orMCP_SECRET) and only accepted from callers holding the secret, so it can't be forged.
License
MIT
Available Tools
15 toolscheck_creditsA
Show how many AI Gateway credits are left on this Vercel team, and what this connector spent in the last 30 days. Use it before big jobs (many videos) to check there is enough.
Inputs: no named parameters.
edit_imageA
Change existing images with an instruction: remove or replace the background, add or remove things, restyle, extend the canvas (outpaint), change the framing, or combine several images. Give https links to the images (links returned by this server work). Good models: "bfl/flux-kontext-pro", "openai/gpt-image-2", "google/gemini-3-pro-image". Pass mask_url (white = area to change) for precise edits with models that take one, e.g. "bfl/flux-pro-1.0-fill".
Inputs: model (required), prompt (required), image_urls (required), n, +3 more.
edit_videoA
Change an existing video with an instruction, like "give the person sunglasses" or "make it snow". Uses "spacexai/grok-imagine-video". The result keeps the input's length and shape, at up to 720p. Returns a job_id for get_video. Links must be https; links returned by this server work. If this call times out or returns no answer, do not call it again on your own: the job may already be running and a retry pays twice. Tell the user and let them decide.
Inputs: prompt (required), video_url (required), model, estimate_only.
extend_videoA
Continue a video from its last frame, so a scene keeps going ("the cat jumps off the windowsill"). Uses "spacexai/grok-imagine-video". Returns a job_id for get_video; the result is the new part. Links must be https; links returned by this server work. If this call times out or returns no answer, do not call it again on your own: the job may already be running and a retry pays twice. Tell the user and let them decide.
Inputs: prompt (required), video_url (required), model, duration, +1 more.
generate_imageB
Generate images with an AI Gateway image model (e.g. "bfl/flux-2-pro", "openai/gpt-image-2") or an image-capable LLM (e.g. "google/gemini-3-pro-image"). Images are returned inline; if a Blob store is connected, private download links that expire are returned too.
Inputs: model (required), prompt (required), n, estimate_only, +1 more.
generate_speechA
Turn text into spoken audio: narration, voice-overs, audiobook chapters, podcast intros. Returns the audio inline and, if a Blob store is connected, a private download link that expires. Models: "openai/tts-1-hd", "google/gemini-3.8-flash-tts", "fish-audio/s2-pro", "microsoft/mai-voice-2.1" (list_models with type "speech" shows all and their prices). Voices are model-specific, e.g. "alloy", "nova" or "onyx" on OpenAI.
Inputs: text (required), model (required), speed, voice, +3 more.
generate_textA
Generate text with any AI Gateway language model (e.g. "openai/gpt-5.5", "anthropic/claude-sonnet-5"). Billed to this deployment owner's AI Gateway credits. With file_urls, the model reads images, videos, audio or PDFs too, e.g. Gemini ("google/gemini-3.5-flash-lite") watching a video to summarize it; list_models shows what each model reads. Links must be https; links returned by this server work.
Inputs: model (required), prompt (required), system, file_urls, +1 more.
get_videoA
Check a video job from start_video, motion_control, upscale_video, edit_video or extend_video. Returns "still generating" or, when done, what AI Gateway billed and private download links (they expire; calling again issues fresh links).
Inputs: job_id (required).
list_filesA
List pictures, videos and audio this connector made before, newest first, with fresh private links (they expire). Needs a connected Blob store.
Inputs: kind, limit.
list_modelsA
List AI Gateway models this server can call. Filter by type (text, image, video, speech for text-to-speech, transcription for speech-to-text) and/or a search query. Returns one line per model: id | type | capabilities | price.
Inputs: type, query.
motion_controlA
Make the character in a picture move like the person in a reference video (a dance, a gesture, a walk). Uses "klingai/kling-v3.0-motion-control" by default. The result is as long as the reference video: up to 10 seconds with orientation "image" (the default). Returns a job_id for get_video. Links must be https; links returned by this server work. If this call times out or returns no answer, do not call it again on your own: the job may already be running and a retry pays twice. Tell the user and let them decide.
Inputs: image_url (required), video_url (required), model, prompt, +4 more.
start_videoA
Start an asynchronous AI Gateway video and return a job_id immediately. Then call get_video with that job_id every ~30 seconds until it is done (usually 1–5 minutes). Text-to-video needs only a prompt. image_url animates a picture (i2v models); add end_image_url to move from the first picture to the last (Veo, Kling, Seedance). reference_urls (pictures or videos of characters or objects) makes a new scene with them (r2v models such as "alibaba/wan-v2.6-r2v": call them character1, character2… in the prompt). For dialogue, write the lines in the prompt and set sound (models with audio, e.g. Veo 3.1, HeyGen). Links must be https; links returned by this server work. If this call times out or returns no answer, do not call it again on your own: the job may already be running and a retry pays twice. Tell the user and let them decide.
Inputs: model (required), prompt (required), sound, duration, +5 more.
transcribeA
Turn speech in an audio or video file into text, optionally with timestamps (for subtitles, notes or translating a voice-over). Give an https link to the file, up to 25 MB. Models: "openai/gpt-4o-transcribe", "openai/whisper-1", "google/gemini-3.5-transcribe" (list_models with type "transcription").
Inputs: model (required), audio_url (required), timestamps.
upscale_imageA
Make an image sharper and larger without changing what is in it. Uses "topaz/wonder-3.5" (Topaz) unless you name another model. Give an https link to the image (links returned by this server work).
Inputs: image_url (required), model, prompt, estimate_only.
upscale_videoA
Make a video sharper and larger, and clean up noise, blur and compression. Uses "topaz/proteus" (Topaz) by default; "topaz/starlight-precise-2.6" is the other choice. Priced by the length of the input video. Returns a job_id for get_video. Links must be https; links returned by this server work. If this call times out or returns no answer, do not call it again on your own: the job may already be running and a retry pays twice. Tell the user and let them decide.
Inputs: video_url (required), model, resolution, estimate_only.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools target a clearly distinct modality+action (generate_text, generate_image, transcribe, generate_speech), and the video family is well-separated by purpose (start_video vs motion_control vs upscale_video vs edit_video vs extend_video). The only mild risk is telling apart the six video-job tools at a glance and distinguishing generate_image/edit_image/upscale_image, but descriptions resolve these.
The set largely follows a verb_noun pattern (generate_text, edit_image, start_video, upscale_video, check_credits). Minor deviations exist: 'transcribe' is a bare verb and 'motion_control' is a noun phrase with no verb, breaking the otherwise consistent convention.
15 tools is well within the ideal 3-15 range and each maps to a distinct operation (generation, editing, upscaling, async job polling, credits, model listing). No tool feels redundant or padded.
The surface covers the full multimodal lifecycle: discover models, generate/edit/upscale text, image, speech, audio, and video, plus transcription and credit checks. Minor gaps include no explicit file retrieval/deletion beyond list_files and no embedding or batch operations, but core workflows are covered.
Maintenance
Related MCP Connectors
Create images & video from any MCP agent — 17 models, spend limits, one URL.
Generate AI images, video, voiceovers and music from Claude, ChatGPT or Cursor through 50+ models (Veo 3.1, Kling 3, Seedance, Nano Banana, GPT Image, ElevenLabs). Also image editing, upscaling, background removal, face swap, transcription, voice cloning and UGC-style video ads. Sign in with OAuth — no API key to paste. Tools are annotated (read-only vs. credit-spending); failed generations are refunded.
Make AI images, videos and UGC ads from Claude: Seedance, Kling, Veo, Nano Banana. Pay per use.
Generate images and videos with 200+ AI models (GPT-Image-2, Seedance, Veo, Kling) via one API.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAccess 400+ generative AI models directly from your AI assistant — generate images (FLUX, Midjourney, GPT-4o), create videos (Veo3, Kling), make music (Suno), and enhance photos, all via a single MCP server.12MIT
- AlicenseAqualityBmaintenanceOne MCP server for music, image, video, and audio generation across Suno, Grok Imagine, Seedance, Kling, Hailuo, Wan, VEO, Ideogram, and GPT Image 2. Generate, edit, upscale, reframe, and master through one API key and one credit pool.161,024 npm6MIT
- FlicenseNot gradedqualityCmaintenanceKeyless, pay-per-call AI gateway: 248 LLMs plus image/video/voice/music generation and live crypto, DeFi, markets, web-search and research tools through one MCP server. Pay per call in USDC via x402 on Base/Solana — no API key, no signup, free tier.-

GlianaAI MCP Serverofficial
AlicenseAqualityBmaintenanceEnables pay-per-call access to 90+ generative AI models and utility tools via any MCP client, with no signup or API key, using wallet-based USDC payments on Base, Tempo, or Solana.71,064 npmMIT