MCP and agents
Connect an MCP client
Point Claude Desktop, Cursor or any MCP client at the Flashly MCP server with an API key, and see which tools it exposes.
Last updated · 4 min read
What the MCP server is
The Flashly MCP server lets an AI assistant generate images and videos, refine them, check your credits and manage webhooks from inside its own chat, using your account. It speaks the Model Context Protocol (MCP) over HTTP: the client sends JSON-RPC 2.0 messages with POST, and the server answers in JSON. It advertises protocol version 2025-03-26 and accepts 2025-06-18, 2025-03-26 and 2024-11-05; when your client asks for one of these, the server answers with that version.
The endpoint is:
https://uhbetxlhnjsohjiwmunt.functions.supabase.co/mcp-server
Each tool uses the same backend as the REST API, so a generation made from an MCP client appears in your usage analytics and spends credits exactly as an API call would.
Create an API key
API keys are available on the Agency Lite and Agency plans.
- Open the Studio and choose API & webhooks under Developer (or open Profile; the API Access card shows when your plan includes it).
- Click Create API Key, enter a Key Name and click Generate Key.
- Copy the key once. It starts with
flsh_and is shown only at creation; Flashly stores a hash.
A key expires 365 days after creation. Every request to the MCP server carries it in the x-api-key header; a missing, inactive or expired key is answered with a JSON-RPC error and HTTP 401.
Connect a client that speaks HTTP
Cursor and other clients that connect to remote MCP servers take a URL and headers:
{
"mcpServers": {
"flashly": {
"url": "https://uhbetxlhnjsohjiwmunt.functions.supabase.co/mcp-server",
"headers": { "x-api-key": "flsh_your_key_here" }
}
}
}
The server does not open an SSE stream: a GET request is refused with HTTP 405, so choose the plain HTTP (streamable, JSON responses) transport where your client asks.
Connect Claude Desktop (stdio)
Claude Desktop launches MCP servers as local processes. The repository ships mcp/stdio-bridge.mjs, a small Node script that forwards stdio JSON-RPC to the HTTP endpoint. Add it to Claude Desktop's configuration file:
{
"mcpServers": {
"flashly": {
"command": "node",
"args": ["/absolute/path/to/flashlystudio/mcp/stdio-bridge.mjs"],
"env": {
"FLASHLY_MCP_URL": "https://uhbetxlhnjsohjiwmunt.functions.supabase.co/mcp-server",
"FLASHLY_API_KEY": "flsh_your_key_here"
}
}
}
}
Both environment variables are required; the bridge exits with a message on stderr when either is missing.
Tools
| Tool | What it does |
|---|---|
generate_image | Text to image, tailored by vertical and goal; optional template, brand kit, in-image text and a verify QA pass |
generate_video | Text (plus optional input image) to video; async: true returns a job_id to poll |
generate_ugc_video | Creator-style 9:16 video (testimonial, unboxing, demo, tour) |
refine_image | Edit an existing image from an instruction, fully or through a mask |
analyze_picture | Professional feedback on an image (lighting, composition, retouching) |
analyze_image_suggestions | Scene analysis and three video prompt ideas for an image |
recommend_models | Best image, video and UGC models for a vertical and goal |
enhance_prompt | Rewrite a rough idea into a model-ready prompt |
ingest_brand | Extract a brand kit from a website URL or a brand-guideline PDF |
create_image_pack | Several variants of one prompt in a single call; accepts template_variables and model |
list_templates | Browse generation templates |
get_credits | Remaining image and video credits and your plan |
get_subscription | Plan, Stripe link status and the next credit reset date |
get_queue_status | Poll an async video job by job_id |
get_rate_limit_status | Requests used in the last minute and day against the key's limits |
get_analytics | Requests, success rate, credits used and recent logs |
list_generations | Recent API generations; completed items can be re-fetched with get_generation |
get_generation | One past generation, with a fresh signed URL for stored images or the video URL |
list_webhooks, create_webhook, toggle_webhook, delete_webhook | Manage webhook endpoints for video.completed and video.failed events |
Every tool carries MCP annotations (readOnlyHint, destructiveHint, idempotentHint), so clients can approve read-only tools such as get_credits automatically and ask before a tool that spends credits. generate_image, generate_video, generate_ugc_video and create_image_pack accept an idempotency_key: a retried call with the same key returns the first result instead of spending again.
Rate limits
Each key has its own limits, set when the key is created: 60 requests per minute and 1,000 per day by default, up to 120 per minute and 10,000 per day. Every MCP request counts against them, including read-only tools, and a request over the limit is refused with a JSON-RPC error and HTTP 401 before any tool runs. get_rate_limit_status shows the current usage. A single HTTP request may carry a batch of at most 25 JSON-RPC messages.