Build Integrations from Cursor/Windsurf Using the Picsart MCP
The Picsart Creative APIs Model Context Protocol (MCP) server lets AI‑powered editors (Cursor, Windsurf, Claude Desktop) interact directly with Picsart tools and documentation. Use MCP to run live operations in‑chat and have the assistant author production‑ready integration code that mirrors what it just executed.
Why MCP for Integrations
- Execute and generate: Invoke real Picsart tools, then turn successful calls into ready‑to‑paste code.
- Docs on tap: A docs tool provides inline guidance and examples.
- Right‑sized toolsets: Enable only what you need (e.g., image-remove-background, video, genai) to keep tokens and tool counts efficient.
What You’ll Need
- MCP endpoint: wss://mcp.picsart.com
- A Picsart API key (same key you use for REST). Use the x-picsart-api-key header.
- Cursor, Windsurf, or Claude Desktop with MCP support.
Connect Your Editor to the MPC Server
Step 1: Configure MCP
Add Picsart to your MCP configuration (for example, Cursor’s ~/.cursor/mcp.json):
{
"mcpServers": {
"picsart": {
"type": "http",
"url": "wss://mcp.picsart.com",
"headers": {
"x-picsart-api-key": "<YOUR_API_KEY>"
}
}
}
}See the MCP guide for the latest configuration details and client‑specific instructions.
Step 2: Choose only the tools you need
To avoid hitting tool limits, enable a focused set (e.g., image, or just image-remove-background). Editors like Cursor let you filter the Picsart tools list under MCP settings.
If you see “Exceeding total tools limit…”, narrow the enabled tool list and retry.
Step 3: Try interactive prompts
Ask the assistant to perform operations and then write code that reproduces them:
- “Use picsart.image-remove-background on this image URL and save the result.”
- “Call genai.text2image from a prompt and return the image path; then write a TypeScript function that does the same.”
- “Fetch video metadata for this clip; provide a Python example and error handling.”
The MCP page lists the available tool groups you can enable.
Step 4: Generate integration code from successful calls
After a tool call succeeds, ask for a language‑specific implementation (Node.js, Python, Java). Provide your preferred HTTP client and error‑handling conventions; the assistant will align types and payloads with the API Reference.
Step 5: Verify credentials with a quick request
Before wiring complex flows, confirm access with the Credits Balance check:
curl "https://api.picsart.io/tools/1.0/balance" \
-H "x-picsart-api-key: $PICSART_API_KEY"A 200 OK validates your configuration; proceed to image, video, or GenAI operations from there.
Troubleshooting & Best Practices
- Tool limits: If you exceed tool limits, disable nonessential tools (you can re‑enable as needed).
- Keep docs in sync: When APIs change, update your enabled tools or consult the latest reference.
- Auth header: Use x-picsart-api-key for REST code you generate from MCP context.
- Scope prompts: Be explicit about endpoints and outputs (file paths, formats) to produce reusable code.
Updated about 3 hours ago