Skip to content

MCP Quickstart

The Picsart MCP server exposes the full model catalog as Model Context Protocol tools. Connect it to any MCP-compatible agent and that agent can generate image, video, and audio across 201 models using natural language or structured tool calls.

New to MCP? Start with What is MCP? first.

Prerequisites

  1. Install the gen-ai CLI — see Installation.
  2. Run gen-ai login once (opens your browser for OAuth).

That is all. The MCP server (gen-ai-mcp) ships with the CLI and uses the same credentials.

Connect to your agent

Claude Code

bash
claude mcp add picsart-gen-ai -- gen-ai-mcp

Then use it in any conversation:

"Generate a product image on a white background using Flux 2 Pro, 4:3 aspect ratio."

For full Claude Code setup including Skills and troubleshooting, see Claude Code integration.

Cursor

Add the following to your Cursor MCP configuration file (.cursor/mcp.json or equivalent):

json
{
  "mcpServers": {
    "picsart-gen-ai": {
      "command": "gen-ai-mcp"
    }
  }
}

See Cursor integration.

Windsurf

Add to your Windsurf MCP config:

json
{
  "mcpServers": {
    "picsart-gen-ai": {
      "command": "gen-ai-mcp"
    }
  }
}

See Windsurf integration.

VS Code (Copilot)

Add to .vscode/mcp.json in your workspace or to your user settings:

json
{
  "servers": {
    "picsart-gen-ai": {
      "type": "stdio",
      "command": "gen-ai-mcp"
    }
  }
}

See VS Code integration.

Codex (OpenAI)

bash
codex mcp add picsart-gen-ai -- gen-ai-mcp

See Codex integration.

ChatGPT and other MCP clients

See ChatGPT integration or the official page at picsart.com/gen-ai-mcp for the current connector config.


Tool catalog

Connecting exposes the generation, catalog and Drive tools below, plus picsart_media_* tools for building video and images out of material you already have.

Building rather than generating?

Picsart Media Studio is a connector dedicated to that kind of work. It is added and signed in to separately, and sits happily alongside this one.

Every tool is available to the agent once connected. Tools that do not spend credits are free to call as many times as needed.

Generation

ToolPurposeSpends credits
picsart_generateRun any model end-to-end (image / video / audio / text)yes
picsart_remove_bgRemove an image backgroundyes
picsart_change_bgReplace an image background from a promptyes
picsart_enhanceUpscale / enhance an imageyes
picsart_vectorizeConvert a raster image to SVGyes
picsart_music_studioOpen Music Studio (music / SFX / album art)no¹

¹ Opening the studio is free; generating inside it spends credits.

Catalog & cost

ToolPurposeSpends credits
picsart_list_modelsModel picker widget — for the user to browse visuallyno
picsart_model_catalogThe same catalog as plain data, for the agent's own reasoningno
picsart_model_paramsParameter schema of one model (type, required, enum, min/max)no
picsart_preflightValidate a params payload and quote its credit cost — one free dry runno
picsart_creditsCurrent credit balance and quota breakdownno
picsart_job_statusPoll a job started by picsart_generate with async: trueno

Drive

ToolPurposeSpends credits
picsart_driveSingle entry point for Picsart Drive — behavior selected by actionno

picsart_drive takes an action parameter; there are no separate per-operation Drive tools:

actionWhat it does
listBrowse a folder (folderUid omitted = root; flat: true lists every file)
create_folderCreate a folder (name, optional parent folderUid, description)
uploadSave a file — either file (a chat attachment) or url + name (HTTPS URL or inline data: URI). result.url is a CDN URL ready to pass to imageUrls
moveMove itemUids into targetFolderUid
deleteSoft-delete itemUids to trash (permanent: true to erase)
updateSet custom attributes on one file (itemUid + attributes)

Every action returns the current folder listing so the Drive widget can render. See Files & Drive for details, and Local files → URLs for getting a file off your disk in the first place.

No tool accepts a filesystem path

Every image/video input is a URL. There is no filePath parameter anywhere in the MCP contract — see Local files → URLs for the three paths that actually work.

The tools are designed to chain. This sequence avoids surprises:

  1. picsart_model_catalog (or picsart_list_models to let the user pick visually) → pick a model
  2. picsart_model_params → learn its inputs
  3. picsart_preflight → validate the payload and quote the cost in one free call
  4. picsart_generate → actually run it

If you already have a model id in hand, skip straight to picsart_generate.

Example tool calls

Generate an image:

json
{
  "name": "picsart_generate",
  "arguments": {
    "model": "flux-2-pro",
    "prompt": "a ceramic cup, studio lighting, 4:3",
    "aspectRatio": "4:3",
    "count": 1
  }
}

Generate a video:

json
{
  "name": "picsart_generate",
  "arguments": {
    "model": "seedance-2.0",
    "prompt": "a cat skiing down a mountain",
    "duration": 8,
    "aspectRatio": "16:9",
    "generateAudio": true
  }
}

Validate and quote a cost first:

json
{
  "name": "picsart_preflight",
  "arguments": {
    "model": "veo-3.1",
    "params": { "prompt": "a drone shot over a snowy ridge", "duration": 8, "resolution": "1080p" }
  }
}

Remove a background:

json
{
  "name": "picsart_remove_bg",
  "arguments": {
    "imageUrls": ["https://example.com/product.jpg"]
  }
}

Inputs reference

picsart_generate takes:

  • Required: model (model id), prompt (text prompt)
  • Common optional: aspectRatio, resolution, duration, count (1 to 8), quality, style, negativePrompt
  • Image input: imageUrls (array of URLs — for image-to-image or image-to-video models)
  • Video input: videoUrl (single URL — for video-to-video models)
  • Audio generation: generateAudio (boolean — for video models that support native audio)
  • Prompt enhancement: enhancePrompt (boolean — routes through an LLM before generation)
  • Model-specific params: extra (free-form object — use picsart_model_params to see what a model accepts)

Results come back as results: [{ url, metadata? }]. Assets are URLs, never base64. Each result also includes a resource_link so the agent can reference it in follow-up tool calls.

FAQ

Does the MCP server require a separate API key?

No. It uses the same OAuth session as the CLI. Run gen-ai login once; the MCP server picks up those credentials automatically.

Can I use MCP and the CLI on the same machine at the same time?

Yes. Both use the same credentials file (~/.gen-ai/credentials.json) and the same credit balance. Running them in parallel is fine.

The agent connected but the tools do not appear.

Restart the agent after adding the MCP config. Most agents load the tool list at startup, not dynamically.

Which models work via MCP?

All 201 models in the catalog. There is no MCP-specific subset. Use picsart_list_models to filter by mode or provider, or browse the Model Catalog.

Can the agent save generated files to Drive?

Yes. Pass "saveToDrive": true in the picsart_generate arguments, or use picsart_drive to upload a local file or URL. See Files and Drive.

How do I know what a model costs before running it?

Call picsart_preflight with the model id and the parameters you plan to use. It validates the payload and returns a credit estimate without running the generation.

What happens if my credit balance runs out mid-generation?

Check your balance with picsart_credits and top up at picsart.com before retrying.

Built on @picsart/ai-sdk · gen-ai CLI · Picsart MCP · Media Studio · Skills