Skip to content
Guides

Claude Code Image Generation and Video via MCP

Add image and video generation to Claude Code with one MCP command: setup, an ask-before-spending rule, prompts that work and files in your repo.

Updated 5 min read

Claude Code image generation takes one command: add the Frameport MCP server with your API key, and Claude can make images and videos from your terminal, look at them, and save them into your project. The same tools price each request first, so nothing is spent that you did not plan for.

This guide covers the setup, sharing it with a team without committing the key, a rule that makes Claude ask before each paid call, video jobs, and a workflow for making app assets.

One command to connect

Create an API key in the dashboard (it starts with fp_live_ and is shown once), then add the server:

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

Run /mcp inside Claude Code to see the server and its status; claude mcp list and claude mcp remove frameport work from the shell. By default the server is added for you alone, in the current project. Add --scope user to have it in every project.

To share it with a team, put it in .mcp.json at the project root with the key read from an environment variable, so the file can be committed and each person uses their own key:

.mcp.json
{
  "mcpServers": {
    "frameport": {
      "type": "http",
      "url": "https://frameport.ai/mcp",
      "headers": { "Authorization": "Bearer ${FRAMEPORT_API_KEY}" }
    }
  }
}

Claude Code fills in ${…} from the environment when it loads the file. Each person then sets the variable in their own shell (export FRAMEPORT_API_KEY=...) and approves the project's server the first time. The MCP docs have the setup for Claude Desktop and Cursor too.

Ask for an image, get a file

Once connected, ask in plain words. Claude picks the tools: get_quote for the price, generate_image to start, get_generation to read the result.

Generate a 16:9 hero image for this landing page: a lighthouse on a cliff at dawn,
soft fog, calm and minimal. Use nano-banana-pro, quote it first, then save it
as public/images/hero.png.

When the image is ready, get_generation returns it inline, so Claude sees what it made and can judge it against your request ("the horizon is too high, try again lower"). Each file also comes with a signed download link that works without a key for about an hour. To get it into your repo, Claude downloads that link with curl into the path you named, under the same permissions as any other shell command.

Which model to ask for depends on the job:

JobModelPer imageWhy
Final visuals, text in the pictureNano Banana Pro$0.16Its maker's highest-fidelity model; edits from up to 6 pictures
Drafts, series, editsFrameport Image 1$0.025Up to 10 reference pictures, plain-language edits
Posters, UI mockups with letteringGPT Image 2.5 Sunburst$0.085Close prompt adherence and legible text

To edit an earlier image, refer to it by its file id (file_…), which Claude has from the generation: "change the background of that image to night". A picture on your disk has to be reachable first: a public https URL, or an upload to your workspace.

Video jobs and waiting for them

Claude Code video generation works the same way through generate_video, with one difference: a clip takes longer to render than an image. The tool starts the job, returns it queued with its price held, and tells Claude to read it again about every 10 seconds. Each get_generation call is free.

Turn public/images/hero.png into a 5-second clip on seedance-2-5 at 720p: slow push-in,
fog drifting, waves below. Quote it first. Check back until it is done, then save it
as public/video/hero.mp4.

The image has to reach the server first, so Claude uses the earlier output's file id or a public URL rather than the local path; asking right after the image was made keeps that id in the conversation. A 5-second Seedance 2.5 clip at 720p is $1.35; for cheaper drafts, Frameport Motion 1 makes 5 seconds at 480p for $0.10. If you close the session before a clip finishes, nothing is lost: ask later for "my last generations" and Claude reads them with list_generations.

Keep spending in check

Every paid tool holds its price on the workspace's balance and charges only on success; a failure costs nothing. Three settings keep the rest under control.

Ask before each paid call. Claude Code's permission rules name MCP tools as mcp__<server>__<tool>. Put the tools that spend under ask and the free ones under allow, in .claude/settings.json:

.claude/settings.json
{
  "permissions": {
    "ask": [
      "mcp__frameport__generate_image",
      "mcp__frameport__generate_video",
      "mcp__frameport__edit_video"
    ],
    "allow": [
      "mcp__frameport__list_models",
      "mcp__frameport__get_quote",
      "mcp__frameport__get_generation",
      "mcp__frameport__list_generations",
      "mcp__frameport__get_balance"
    ]
  }
}

Cap each request. Every tool that starts work takes max_cost_usd; a request priced above it is refused before anything is held. "Quote it first and set max_cost_usd to the quote" in your prompt does it.

Bound the balance. A key has no spending limit of its own: it spends from its workspace. Give Claude Code its own key, or its own workspace funded with a fixed amount and auto top-up off. The guide on pricing a clip before it runs covers quotes, holds and budgets.

Use it to make app assets

Claude Code already reads your code, so it can generate assets that fit it and wire them in:

Read src/pages/pricing.vue. Make one 4:3 illustration per plan card that matches its copy,
in a flat, warm style, on fp-image-1. Quote the batch first. Save them as
public/img/plan-<name>.png and update the <img> tags and their alt text.

A few habits help. Ask for one model's options (list_models with a model id) rather than the whole catalog, to keep tool answers short. Give the size as an aspect ratio the models take (1:1, 3:4, 4:3, 9:16, 16:9) and let Claude crop to the exact pixels with your usual tools. For a series that must look alike, generate a first image, then pass its file id as a reference for the next ones. The MCP server guide lists every tool and more example prompts. The same server works inside an editor as well: Cursor MCP image generation has that setup.

FAQ

Can Claude Code generate images?

Yes, through an MCP server. With Frameport connected, Claude Code calls image models such as Nano Banana Pro or Frameport Image 1, sees the result, and can save the file into your project.

Can Claude Code generate videos too?

Yes. generate_video starts a clip on any video model of the catalog, such as Seedance 2.5 or Veo 3.1, and Claude reads it back until it is done, then downloads the link.

Do I need a Claude image generation skill or plugin?

No: the MCP server is the integration. If you repeat the same request often, you can save it as a skill or a custom slash command in your project; it calls the same tools.

Is Claude video generation free?

Connecting the server and the tools that only read are free. Images and clips are paid from your prepaid balance at the API's prices, only when they succeed.

How do I stop Claude Code from spending without asking?

Add the tools that spend to the ask list of your permissions, as above, and cap each request with max_cost_usd. The balance itself is the last limit: Claude Code can never spend more than the workspace holds.

Start building.

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