Image Generation MCP Server

io.github.pvliesdonk/image-generation-mcp

MCP server for AI image generation via OpenAI, Stable Diffusion (SD WebUI), or placeholders.

Connect this server

Add this to your MCP client config — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor).Suits: Claude Desktop · Cursor.

{
  "mcpServers": {
    "image-generation-mcp": {
      "command": "uvx",
      "args": [
        "image-generation-mcp"
      ],
      "env": {
        "IMAGE_GENERATION_MCP_KV_STORE_URL": "file:///data/state",
        "FASTMCP_LOG_LEVEL": "INFO",
        "FASTMCP_ENABLE_RICH_LOGGING": "true",
        "IMAGE_GENERATION_MCP_READ_ONLY": "true",
        "IMAGE_GENERATION_MCP_SCRATCH_DIR": "~/.image-generation-mcp/images",
        "IMAGE_GENERATION_MCP_OPENAI_API_KEY": "<your IMAGE_GENERATION_MCP_OPENAI_API_KEY>",
        "IMAGE_GENERATION_MCP_GOOGLE_API_KEY": "<your IMAGE_GENERATION_MCP_GOOGLE_API_KEY>",
        "IMAGE_GENERATION_MCP_DEFAULT_PROVIDER": "auto",
        "IMAGE_GENERATION_MCP_TRANSFORM_CACHE_SIZE": "64",
        "IMAGE_GENERATION_MCP_PAID_PROVIDERS": "openai",
        "IMAGE_GENERATION_MCP_STYLES_DIR": "~/.image-generation-mcp/styles",
        "IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUT": "false",
        "IMAGE_GENERATION_MCP_MAX_INPUT_IMAGE_BYTES": "20971520",
        "IMAGE_GENERATION_MCP_FETCH_TIMEOUT_S": "30.0",
        "IMAGE_GENERATION_MCP_TRANSFER_TTL_DEFAULT_S": "3600.0",
        "IMAGE_GENERATION_MCP_TRANSFER_TTL_MAX_S": "86400.0",
        "IMAGE_GENERATION_MCP_TRANSFER_GRACE_TTL_S": "60.0",
        "IMAGE_GENERATION_MCP_TRANSFER_LEASE_S": "60.0",
        "IMAGE_GENERATION_MCP_TRANSFER_MAX_UPLOAD_BYTES": "104857600"
      }
    }
  }
}
Environment variables
  • IMAGE_GENERATION_MCP_KV_STORE_URLPersistent-state backend URL shared by every pvl-core subsystem that needs state. `memory://` is in-process and lost on restart; `file:///path` persists on one server; `redis://`, `dynamodb://` and `mongodb://` each need their matching extra. When unset, defaults to `file:///data/state` (the volume family Docker images mount), or to `memory://` — with a warning — on a host where that directory is not usable.
  • FASTMCP_LOG_LEVELLog level for FastMCP internals and app loggers (DEBUG / INFO / WARNING / ERROR / CRITICAL). The -v CLI flag overrides to DEBUG.
  • FASTMCP_ENABLE_RICH_LOGGINGSet false for plain or structured JSON log output.
  • IMAGE_GENERATION_MCP_READ_ONLYWhen true, write-tagged tools (image generation, transforms, uploads) are hidden from clients. Set false to enable them.
  • IMAGE_GENERATION_MCP_SCRATCH_DIRDirectory where generated images are saved. Created automatically on first use.
  • IMAGE_GENERATION_MCP_OPENAI_API_KEYsecretOpenAI API key. Enables the OpenAI provider (gpt-image-2, gpt-image-1.5, dall-e-3) when set.
  • IMAGE_GENERATION_MCP_GOOGLE_API_KEYsecretGoogle API key. Enables the Gemini provider (gemini-3.1-flash-image and others) when set. Get a key at https://aistudio.google.com/apikey.
  • IMAGE_GENERATION_MCP_DEFAULT_PROVIDERProvider used when no keyword triggers auto-selection: auto, openai, gemini, sd_webui, or placeholder. auto picks the first configured provider.
  • IMAGE_GENERATION_MCP_TRANSFORM_CACHE_SIZEMaximum number of transformed image results (resize, crop, convert) kept in memory. Set 0 to disable caching.
  • IMAGE_GENERATION_MCP_PAID_PROVIDERSComma-separated provider names that cost money; generate_image asks for confirmation (client elicitation) before using them. An empty value falls back to this default; to disable confirmation, set a value that names no provider (such as none).
  • IMAGE_GENERATION_MCP_STYLES_DIRDirectory for style preset files (Markdown with YAML front matter). Created automatically if it does not exist.
  • IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUTAllow reading input images from local filesystem paths. Off by default: only URLs and uploads are accepted.
  • IMAGE_GENERATION_MCP_MAX_INPUT_IMAGE_BYTESMaximum accepted input image size in bytes.
  • IMAGE_GENERATION_MCP_FETCH_TIMEOUT_SHTTP timeout in seconds when fetching remote image URLs (fetch_image and URL inputs).
  • IMAGE_GENERATION_MCP_TRANSFER_TTL_DEFAULT_SLink lifetime in seconds when the caller requests no explicit TTL.
  • IMAGE_GENERATION_MCP_TRANSFER_TTL_MAX_SCeiling in seconds a caller-requested link TTL is clamped to.
  • IMAGE_GENERATION_MCP_TRANSFER_GRACE_TTL_SPost-success grace window in seconds: a served token's TTL shrinks to this so a stalled transfer can retry within it.
  • IMAGE_GENERATION_MCP_TRANSFER_LEASE_SCrashed-handler reclaim window in seconds for an in-flight reservation.
  • IMAGE_GENERATION_MCP_TRANSFER_MAX_UPLOAD_BYTESMaximum size in bytes of a single upload.

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Developer Tools
Version
1.12.1
Registry
active
Published
8/25/2026
Browse all Developer Tools →

Add the badge to your site

Show visitors that Image Generation MCP Server is listed here — it’s also the link we check for a free listing.

Image Generation MCP Server — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-pvliesdonk-image-generation-mcp?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="Image Generation MCP Server — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![Image Generation MCP Server — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-pvliesdonk-image-generation-mcp?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.