imagemcpserver documentation
Everything needed to give an AI agent image generation and editing: connect over MCP, install the agent skill, or call the REST API directly. Eleven tools, one API key.
What this is
imagemcpserver is one service that gives any AI agent the ability to make and change images. The same eleven tools are exposed three ways — as an MCP server, as an agent skill with a CLI, and as a plain REST API — and all three bill against one API key and one credit balance.
Nothing here needs a GPU, a model account, or a per-provider integration on your side. You send a prompt or an image, the server routes the call to the right model, uploads the result, and hands back a URL.
Three ways to connect
MCP server
Add one entry to your MCP client config and the tools appear in Claude, Cursor, and any other MCP-speaking client.
For terminal agentsAgent skill & CLI
A skill directory with a Node CLI that outputs structured JSON, so a coding agent can call it directly.
For your own codeREST API
Eleven HTTP endpoints with bearer-token auth. Nothing MCP-specific required.
- MCP endpoint:
https://mcp.imagemcpserver.com/mcp - REST base URL:
https://api.imagemcpserver.com - Auth on both:
Authorization: Bearer <IMAGEMCP_API_KEY>
The eleven tools
Every tool below is a real endpoint and a real MCP tool name. Follow a row through to its reference page for parameters, response fields and copy-paste samples in four languages.
| Tool | Endpoint | Credits | What it does |
|---|---|---|---|
| get_user_info | GET/auth/user-data | Free | Read the authenticated account's profile, plan and remaining credit balance. |
| list_models | GET/playground/models | Free | List every live image model you can pass as the `model` parameter, with its credit cost. |
| generate_image | POST/playground/generate | Model cost | Turn a text prompt — optionally guided by reference images — into a hosted image. |
| generate_transparent_image | POST/playground/generate-transparent | Model cost + 8 | Generate an image from a prompt and return it as a cut-out PNG with a transparent background. |
| edit_image | POST/playground/edit | Model cost | Change an existing image with natural-language instructions. |
| remove_background | POST/playground/remove-background | 8 credits | Strip the background from an image and return a transparent PNG. |
| upscale_image | POST/playground/upscale | 15 credits | Increase an image's resolution while sharpening detail. |
| text_to_svg | POST/playground/text-to-svg | 5 credits | Generate real vector SVG markup — icons, logos and marks — from a prompt. |
| compress_image | POST/playground/compress | 1 credit | Shrink an image's file size with quality control, and report exactly how much was saved. |
| convert_format | POST/playground/convert-format | 1 credit | Convert an image between PNG, JPEG, WebP and other common formats. |
| multicall | POST/playground/multicall | Sum of the batch | Run several image tools concurrently in a single request. |
How a call is shaped
Every image endpoint answers with the same envelope: a success flag, the credits this call took, your remaining balance, and a result object holding the output. Read result.imageUrl for image tools and result.svgCode for the vector tool.
{
"success": true,
"message": "Image processed successfully via OpenRouter Images API",
"deductedCredits": 15,
"userCredits": 2485,
"result": {
"imageUrl": "https://cdn.imagemcpserver.com/gen/gen_91827364.png",
"model": "google/gemini-2.5-flash-image",
"latency": "4.21s",
"deductedCredits": 15,
"userCredits": 2485
}
}Watch the balance in the response
userCredits comes back on every call, an agent never needs a separate balance check in a loop — it can read the remaining balance from the response it already has.Where to go next
Quickstart
Key, first call, first image — about five minutes end to end.
Authentication
Where keys come from, which headers work, and how to keep them out of your repo.
Credits & pricing
Exactly what each of the eleven tools deducts, and how batches are billed.
Errors & troubleshooting
Every status code the API returns and what to do about it.