leo-recraft-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
leo-recraft
Recraft as a Leo package, over MCP — image generation, vectorizing and background removal, from Recraft.
This replaces the compiled leo-recraft package, and is the first extracted
package that is both a tool provider and a subsystem provider:
It fills Leo's
image_genprovider role, which is what the gallery calls when something asks Leo for an image. The gallery does the database write (leo-gallery/src/api.rs); this server only produces bytes.It keeps the three tools the compiled package exposed, for an agent driving Recraft directly.
Tools
Tool | Requires | What it is |
|
| The |
|
| Recraft's own vocabulary — model, style, size, palette. Returns paths. |
|
| Raster → SVG. |
|
| Cut-out PNG. |
generate and recraft_generate are separate on purpose rather than one tool
wearing two hats. The role has a fixed contract Leo depends on — prompt in,
base64 out — while the tool carries Recraft's models, styles and palettes, which
are far wider than the role and change with the vendor.
Related MCP server: Replicate MCP Server
Configuration
One setting, recraft_api_key. Leo hands it to this process under that key
verbatim and lower-case, so the descriptor's settings_read and
process.env.recraft_api_key have to agree or the credential silently never
arrives.
Development
npm install
node test.js # no network neededThe test covers what fails quietly — the API's own errors are loud:
The palette.
parseInt("zz", 16)isNaN, which serializes tonulland either fails the request or renders a different palette than the one asked for. One typo among good colours renders in the good ones; a palette where nothing parsed sends nocontrolsat all, rather than an empty array the API reads as "use no colours".Absent vs empty. Recraft's v4 models reject a
styleoutright, so omitting the key and sending""are different requests.The two response shapes.
generationsanswers{data:[{url}]};vectorizeandremoveBackgroundanswer{image:{url}}. Read one with the other's shape and you get nothing, silently — and adatathat is present but not an array survives?? []and then throws on.map, turning a bad response into a crashed tool. (That one was a real bug, caught by this test.)Error bodies. Recraft's
messageis often empty, so a failure can be the whole of{"code":"not_enough_credits","message":""}. The known codes are spelled out as something the owner can act on (an account out of credits, a rejected key); unknown ones keep the vendor's words.
Publishing
./store/publish.sh # live
./store/publish.sh draft # stage for review at admin.leoconnect.ioRelated MCP Connectors
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Image and video AI tools and your own pipelines, run from any AI assistant.
Generate images and video, run Spaces and build canvases from your agent. OAuth sign-in.
Generate reproducible image, video, and audio assets with leading models and your own provider keys.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables text-to-image generation using the api.airforce API, with a generate_image tool and model discovery resource.MIT
- FlicenseBqualityDmaintenanceEnables LLM clients to generate, edit, and evaluate images through the Replicate API.4-
- AlicenseBqualityBmaintenanceEnables background removal and upscaling of images using Recraft models via RunAPI, with task polling and pricing lookup.5124 npmApache 2.0
- AlicenseBqualityDmaintenanceEnables generating images from text or transforming existing images using GPT-Image-compatible APIs, with support for OpenAI and Agnes AI backends.2MIT