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
- Install the gen-ai CLI — see Installation.
- Run
gen-ai loginonce (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
claude mcp add picsart-gen-ai -- gen-ai-mcpThen 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):
{
"mcpServers": {
"picsart-gen-ai": {
"command": "gen-ai-mcp"
}
}
}See Cursor integration.
Windsurf
Add to your Windsurf MCP config:
{
"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:
{
"servers": {
"picsart-gen-ai": {
"type": "stdio",
"command": "gen-ai-mcp"
}
}
}See VS Code integration.
Codex (OpenAI)
codex mcp add picsart-gen-ai -- gen-ai-mcpSee 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
| Tool | Purpose | Spends credits |
|---|---|---|
picsart_generate | Run any model end-to-end (image / video / audio / text) | yes |
picsart_remove_bg | Remove an image background | yes |
picsart_change_bg | Replace an image background from a prompt | yes |
picsart_enhance | Upscale / enhance an image | yes |
picsart_vectorize | Convert a raster image to SVG | yes |
picsart_music_studio | Open Music Studio (music / SFX / album art) | no¹ |
¹ Opening the studio is free; generating inside it spends credits.
Catalog & cost
| Tool | Purpose | Spends credits |
|---|---|---|
picsart_list_models | Model picker widget — for the user to browse visually | no |
picsart_model_catalog | The same catalog as plain data, for the agent's own reasoning | no |
picsart_model_params | Parameter schema of one model (type, required, enum, min/max) | no |
picsart_preflight | Validate a params payload and quote its credit cost — one free dry run | no |
picsart_credits | Current credit balance and quota breakdown | no |
picsart_job_status | Poll a job started by picsart_generate with async: true | no |
Drive
| Tool | Purpose | Spends credits |
|---|---|---|
picsart_drive | Single entry point for Picsart Drive — behavior selected by action | no |
picsart_drive takes an action parameter; there are no separate per-operation Drive tools:
action | What it does |
|---|---|
list | Browse a folder (folderUid omitted = root; flat: true lists every file) |
create_folder | Create a folder (name, optional parent folderUid, description) |
upload | Save 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 |
move | Move itemUids into targetFolderUid |
delete | Soft-delete itemUids to trash (permanent: true to erase) |
update | Set 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.
Recommended generation flow
The tools are designed to chain. This sequence avoids surprises:
picsart_model_catalog(orpicsart_list_modelsto let the user pick visually) → pick a modelpicsart_model_params→ learn its inputspicsart_preflight→ validate the payload and quote the cost in one free callpicsart_generate→ actually run it
If you already have a model id in hand, skip straight to picsart_generate.
Example tool calls
Generate an image:
{
"name": "picsart_generate",
"arguments": {
"model": "flux-2-pro",
"prompt": "a ceramic cup, studio lighting, 4:3",
"aspectRatio": "4:3",
"count": 1
}
}Generate a video:
{
"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:
{
"name": "picsart_preflight",
"arguments": {
"model": "veo-3.1",
"params": { "prompt": "a drone shot over a snowy ridge", "duration": 8, "resolution": "1080p" }
}
}Remove a background:
{
"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 — usepicsart_model_paramsto 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.