Website Graphics From Inside Cursor - Kadraris MCP for Heroes and Illustrations
Generate website graphics without leaving Cursor: add the Kadraris MCP server, let the agent quote each image, approve, and save checked files locally.
You are building a page in Cursor and it needs a hero image and a couple of illustrations. Instead of switching to a browser, let the Cursor agent order them through the Kadraris MCP server and drop the files into the project. The chat model you picked in Cursor keeps doing the planning and coding; an image model such as FLUX.2 [pro] does the drawing. Adding the server does not change which model Cursor talks to.
Before you connect
- Create a key for Cursor under API keys and set a monthly cap on it.
- Copy the key the moment it is displayed, and keep it out of the repo and out of prompts.
- Cursor reads the key from an environment variable. In PowerShell:
$env:KADRARIS_API_KEY="sk-kd-..."; on macOS and Linux:export KADRARIS_API_KEY="sk-kd-...". For a permanent setting, set it in your system and restart Cursor so it sees the change.
Connecting costs nothing. Only an approved generation is charged, and it needs funds on the account.
Add the server to Cursor
The quick way is the install link: Add to Cursor. It registers a server named kadraris that takes the key from KADRARIS_API_KEY.
To do it by hand, put this in .cursor/mcp.json in the project:
{
"mcpServers": {
"kadraris": {
"url": "https://kadraris.com/mcp",
"headers": {
"Authorization": "Bearer ${env:KADRARIS_API_KEY}"
}
}
}
}The file contains only the variable reference, not the key, so it is safe to commit. Other editors and options are in the MCP docs.
One prompt for the whole set
The landing page needs a hero image and two
illustrations for the features section. Check the
image models in the kadraris MCP and what inputs
they take. Run estimate_cost for each image, show
the sum and wait. Once I approve, generate with
confirm_token. Save to public/generated/, verify
format and pixel size, never overwrite existing
files and never publish on your own.For photographic web graphics, FLUX.2 [pro] is a good starting model, at from $0.0688 per image. That rate is per unit; for the full set, multiply by the number of images and check the settings in the cost calculator or on pricing. If the graphics need words in them, read the lettering notes in the image generator ranking first, because FLUX.2 [pro] struggled with accented letters there.
How the agent works through it
search_modelsnarrows the field;get_modellists the inputs of the chosen model.estimate_costprices each planned image and returns aconfirm_token, with no charge.- You approve.
generateruns with the matchingconfirm_token. wait_for_taskorget_taskreports progress until the task is done.
A new prompt, model or size means a new quote and a new approval, and the tokens expire after a while.
Before the images go live
- Wait for
succeeded; a queued task has nothing to download. - Let the agent copy each
outputURL intopublic/generated/. The links are temporary, so the page must point at the local file. - Open each image, check its size, and look at the whole frame, not just the thumbnail.
- Keep a note of model, prompt, settings and price. Images you reject after a successful render are still billed; failed ones are free.
When something goes wrong
- Server shows as disconnected: check the
/mcpURL, whether the key is active, and whether Cursor's process can seeKADRARIS_API_KEY. - Authorization or balance message: look at the key's cap and the account balance.
- Input refused: ask the agent to read
get_modelagain for this model instead of copying values from another one. - The reply stopped halfway: look up the saved task id before you start a new generation.
More editor and agent setups are on AI agents. For standing API instructions in the repo, add AGENTS.md. Claude Code users can follow the Claude Code MCP guide.
Questions
Is it safe to commit .cursor/mcp.json?
Yes, as long as it uses ${env:KADRARIS_API_KEY} as shown. The key stays in your environment, and teammates set their own.
Does the Cursor subscription pay for the images?
No. Cursor bills its own chat model as usual. The images are charged to your Kadraris balance, the same one Studio and the API use.
Can the agent resize the images for the page after saving them?
Yes, if it has access to your project and a tool such as ffmpeg or an image library. Ask it to keep the original file and write the resized copies next to it.


























