Skip to content
Guides

Image and Video Generation MCP Server for AI Agents

An image generation MCP server for Claude, Cursor or any MCP client: one URL, your key, a tool per step, a price before each run and a spending cap.

Updated 6 min read

An image generation MCP server lets an AI agent such as Claude or Cursor make images and videos by calling tools, the same way it reads files or runs commands. Frameport runs one at https://frameport.ai/mcp: add the URL and your API key to your client, and the agent can list the 25 models, price a request, start it and read the result back.

This guide covers what the server does, how to connect Claude Code, Claude Desktop and Cursor, the tools it exposes, and how to keep an agent's spending and retries under control.

What the MCP server does

The Model Context Protocol (MCP) is the standard way for AI clients to call outside tools. The Frameport server is a thin client of the API: each tool mirrors an endpoint, with the same prices, limits, validation and errors. An agent connected to it can:

  • list the image and video models with their prices and options;
  • price a request before it runs, for free;
  • start images, videos and clip edits, paid from the workspace's balance;
  • read a generation back until it has succeeded or failed, with a download link for each file;
  • check the balance.

It is a remote server over Streamable HTTP (JSON-RPC 2.0), and it is stateless: every request carries Authorization: Bearer <key> and there is no session to open. Claude Code and Cursor connect to it directly; Claude Desktop goes through a small bridge, shown below.

Connect Claude Code, Claude Desktop or Cursor

Create an API key in the dashboard first (it starts with fp_live_ and is shown once). Give each agent a key of its own, and keep it in your client's config on your machine, never in a shared repository.

In Claude Code, one command adds the server:

claude mcp add --transport http frameport https://frameport.ai/mcp \
  --header "Authorization: Bearer fp_live_..."

In Claude Desktop, open Settings › Developer › Edit Config and add the server; the mcp-remote bridge connects the app to the remote server and sends your key. Restart Claude afterwards.

claude_desktop_config.json
{
  "mcpServers": {
    "frameport": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://frameport.ai/mcp", "--header", "Authorization:${AUTH_HEADER}"],
      "env": { "AUTH_HEADER": "Bearer fp_live_..." }
    }
  }
}

In Cursor, add it to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project:

mcp.json
{
  "mcpServers": {
    "frameport": {
      "url": "https://frameport.ai/mcp",
      "headers": { "Authorization": "Bearer fp_live_..." }
    }
  }
}

Any other client that speaks Streamable HTTP and can send a header connects the same way. Since it is plain HTTP, you can also check the connection with curl: this call asks for a free quote and starts nothing.

A tool call by hand
curl https://frameport.ai/mcp \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
       "params": {"name": "get_quote", "arguments": {"model": "nano-banana-pro", "n": 2}}}'

The MCP docs keep these configs current.

A step-by-step for Claude Code alone is in Claude Code image and video generation.

The tools

ToolWhat it doesSpends
list_modelsThe models on sale, their prices per image or per second, and the options a request may useNo
get_quoteThe price of a request before it runs, against your balanceNo
generate_imageStarts 1 to 4 images from a prompt, with optional reference picturesYes
generate_videoStarts a clip from a prompt, a first frame (and a last) or reference picturesYes
edit_videoChanges a clip you send: swaps faces or upscales itYes
get_generationReads a generation, moving it forward: status, price, a link per fileNo
list_generationsThe workspace's generations, newest first, filtered by status, type or modelNo
get_balanceWhat is available and what is heldNo

Every model of the catalog is there: Nano Banana Pro and Nano Banana 2.1, Flux 3 Image, Veo 3.1, Runway Gen-4.5, Seedance 2.5, the Frameport engines such as Frameport Image 1 and Frameport Replace 1, and the rest. The tool schemas list the model ids, so the agent picks from what is on sale.

The tools that start work return at once with the generation queued and its price held. The work goes on after that answer, so the agent calls get_generation until the job settles. When an image generation has succeeded, get_generation also returns up to two of its images inline (each up to 4 MB), so the agent can look at what it made; every file also comes as a download link that works without a key for about an hour.

A refusal, such as a model that does not take an option or a balance too low, comes back as a tool error with the reason and its code, so the agent can fix the request and try again.

Spending: quotes, caps and one key per agent

An agent spends real money, so the server gives it the same guards as the API:

  • Quotes first. get_quote takes the same fields as the tool that starts work and answers with the price and whether the balance covers it. Nothing is held.
  • A cap per call. Every tool that starts work takes max_cost_usd: a request priced above it is refused before anything is held.
  • One key per agent. Its generations show under the key's name in the dashboard, and you can revoke that key alone.
  • A bounded balance. There is no limit per key: a key spends from its workspace. To bound an agent, give it a workspace of its own funded with a fixed amount and leave auto top-up off.
  • Paid on success. A generation that fails costs nothing, and its hold goes back to the balance.

The guide on pricing a clip before it runs covers quotes, holds and budgets in detail.

Retries without paying twice

Agents retry: a call times out, the client reconnects, the model calls the tool again. generate_image, generate_video and edit_video take an idempotency_key. Called again with the same key and the same fields, the tool returns the first generation and says that nothing new was charged. A key holds for 24 hours, within the workspace.

The tool descriptions ask the agent to send one. To be sure, say it in your prompt: "use a new idempotency_key for each new image, and the same one if you retry".

Example prompts that work

The agent reads the tool descriptions, so plain requests work. Naming the model, the format and a cap makes the result predictable:

List the video models that make sound, with their price for 5 seconds at 720p.

What would 4 images on nano-banana-pro cost? Don't start anything.

Generate a 16:9 hero image of a lighthouse at dawn in soft fog with nano-banana-pro.
Quote it first and set max_cost_usd to the quote.

Turn that image into a 5-second clip on seedance-2-5 at 720p, slow push-in.
Check back every 10 seconds until it is done, then give me the link.

Swap my face from https://example.com/me.jpg into https://example.com/dance.mp4
with fp-replace-1, keep the outfit.

The tools take pictures and clips as public https URLs or as files already in your workspace (outputs and uploads), so host local files first. Only use faces you have the right to use. The rules of the acceptable use policy apply to every tool, whoever calls it.

New to MCP? Start with what an MCP server for image generation is. Working in an editor? Cursor MCP image generation walks through that setup. The MCP config holds your key, so the advice in API key security applies to it too.

FAQ

What is an MCP server for image generation?

A server that exposes image and video generation as tools an AI client can call over the Model Context Protocol. The agent decides when to call them; the server runs the request on a model and returns the result.

Which MCP clients can use it?

Claude Code, Claude Desktop (through the mcp-remote bridge), Cursor, and any client that speaks Streamable HTTP and can send an Authorization header. The server keeps no session: a GET answers 405.

Does it work with Nano Banana Pro and Veo 3?

Yes. Every model of the catalog is available through the same tools, including Nano Banana Pro, Nano Banana 2.1, Veo 3.1, Veo 3.1 Fast, Flux 3 Image and Runway Gen-4.5. list_models shows each one's price and options.

Can I see the generated images in the chat?

Yes, for images: once a generation has succeeded, get_generation returns up to two of its images inline, along with a download link per file. Videos come as links, which work without a key for about an hour.

Is the MCP server free?

Connecting is free, and so are the tools that only read: models, quotes, generations and the balance. Images, clips and edits are paid from the workspace's prepaid balance, at the same prices as the API, and only when they succeed.

Start building.

Your API key is free. Top up from $10 when you are ready.