Skip to main content
Glama
pvliesdonk

io.github.pvliesdonk/image-generation-mcp

by pvliesdonk

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FASTMCP_LOG_LEVELNoLog level for FastMCP internals and app loggers (DEBUG/INFO/WARNING/ERROR). The -v CLI flag overrides to DEBUG.INFO
FASTMCP_ENABLE_RICH_LOGGINGNoSet to false for plain/structured JSON log output.true
IMAGE_GENERATION_MCP_BASE_URLNoPublic base URL for OIDC and MCP File Exchange downloads (e.g. https://mcp.example.com).
IMAGE_GENERATION_MCP_HTTP_PATHNoHTTP endpoint mount path./mcp
IMAGE_GENERATION_MCP_READ_ONLYNoHide write-tagged tools (generate_image). Set to false to enable generation.true
IMAGE_GENERATION_MCP_APP_DOMAINNoMCP Apps widget sandbox domain. Auto-computed from BASE_URL for Claude; override for other hosts.(auto)
IMAGE_GENERATION_MCP_SCRATCH_DIRNoDirectory for saved generated images.~/.image-generation-mcp/images/
IMAGE_GENERATION_MCP_SERVER_NAMENoServer name shown to MCP clients.image-generation-mcp
IMAGE_GENERATION_MCP_BEARER_TOKENNoStatic bearer token; enables bearer auth when set.
IMAGE_GENERATION_MCP_INSTRUCTIONSNoSystem instructions for LLM context.(dynamic)
IMAGE_GENERATION_MCP_OIDC_AUDIENCENoExpected JWT audience claim.
IMAGE_GENERATION_MCP_SD_WEBUI_HOSTNoSD WebUI URL (e.g. http://localhost:7860); enables SD WebUI provider when set. Deprecated alias: A1111_HOST.
IMAGE_GENERATION_MCP_GOOGLE_API_KEYNoGoogle API key with Gemini access; enables Gemini provider when set.
IMAGE_GENERATION_MCP_OIDC_CLIENT_IDNoOIDC client ID.
IMAGE_GENERATION_MCP_OPENAI_API_KEYNoOpenAI API key; enables OpenAI provider when set.
IMAGE_GENERATION_MCP_PAID_PROVIDERSNoComma-separated paid provider names. Triggers elicitation confirmation on capable clients. Set to empty to disable.openai,gemini
IMAGE_GENERATION_MCP_SD_WEBUI_MODELNoSD WebUI checkpoint name for preset detection and override. Deprecated alias: A1111_MODEL.
IMAGE_GENERATION_MCP_EVENT_STORE_URLNoEvent store backend for HTTP session persistence — memory:// (dev), file:///path (survives restarts).memory://
IMAGE_GENERATION_MCP_OIDC_CONFIG_URLNoOIDC discovery endpoint URL.
IMAGE_GENERATION_MCP_DEFAULT_PROVIDERNoDefault provider: auto, openai, gemini, sd_webui, placeholder.auto
IMAGE_GENERATION_MCP_FILE_EXCHANGE_TTLNoDefault and maximum TTL (seconds) for published files and download URLs. create_download_link's ttl_seconds is clamped to this.3600
IMAGE_GENERATION_MCP_OIDC_CLIENT_SECRETNoOIDC client secret.
IMAGE_GENERATION_MCP_OIDC_JWT_SIGNING_KEYNoJWT signing key. Required on Linux/Docker, otherwise ephemeral.ephemeral
IMAGE_GENERATION_MCP_OIDC_REQUIRED_SCOPESNoComma-separated required scopes.openid
IMAGE_GENERATION_MCP_TRANSFORM_CACHE_SIZENoMax cached transforms. Set to 0 to disable caching.64
IMAGE_GENERATION_MCP_FILE_EXCHANGE_CONSUMENoMaster switch for the consumer side. This server is producer-only; set false to silence the upstream startup warning.true
IMAGE_GENERATION_MCP_FILE_EXCHANGE_ENABLEDNoMaster switch for the file-exchange producer. Set false to suppress all file_ref publishing.true on http/sse, false on stdio
IMAGE_GENERATION_MCP_OIDC_VERIFY_ACCESS_TOKENNoVerify access token as JWT instead of id token.false

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    },
    "prompts": {
      "get": {}
    },
    "resources": {
      "read": {}
    }
  }
}
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
check_generation_statusA

Check whether a background image generation has finished.

Call this after generate_image to wait for completion. Returns a short JSON status — no image data, no heavy UI.

  • "completed" → call show_image(uri=original_uri) to display the finished image.

  • "generating" → wait and check again.

  • "failed" → report the error to the user.

show_imageA

Display a completed image with optional on-demand transforms.

Only call this for completed images — use check_generation_status to poll, then call this once when status is "completed".

Accepts a full image:// resource URI (e.g. image://abc123/view or image://abc123/view?format=webp&width=512). Transforms are encoded in the URI query string — no separate parameters needed.

Read the image://list resource to browse available image IDs.

browse_galleryA

Browse all generated images in an interactive visual gallery.

Opens a gallery view showing thumbnail previews of images in the scratch directory, filtered by origin (generated images by default).

For non-UI clients the response is a JSON object with total, page, page_size, origin, and items. Each completed item includes image_id, prompt, provider, dimensions, created_at, thumbnail_b64 (128 px WebP, base64-encoded), content_type, and origin. Pending/generating items include status, progress, and progress_message instead of a thumbnail.

Use browse_gallery to see all images; use show_image(uri="image://{image_id}/view") to view one image at full resolution.

gallery_pageA

Return a page of image thumbnails for the gallery UI.

App-only helper called by the gallery UI to load additional pages when the user paginates. Not intended for direct model invocation.

gallery_full_imageA

Return full-resolution image data for the gallery lightbox.

App-only helper called by the gallery lightbox to load a single image at full (or near-full) resolution. Images larger than 1 MB are downscaled to 1024 px wide WebP before encoding.

list_providersA

List available image generation providers, models, and capabilities.

Returns provider names, available models, and capability details. Each model includes a prompt_style field: use "clip" for comma-separated CLIP tags (SD 1.5/SDXL) or "natural_language" for descriptive sentences (Flux, OpenAI). Each call includes a refreshed_at timestamp. Pass force_refresh=true if providers may have changed since the last check.

Also available as the info://providers resource for clients that support MCP resources.

edit_imageA

Open an image for interactive editing (crop, rotate, flip).

The user edits in the viewer UI and saves as a new image. Always edits the original image — resource template transforms are ephemeral and LLM-facing; editor transforms are persistent and user-facing.

get_server_infoA

Report wrapper and upstream version info for image-generation-mcp. Returns server_name, server_version, core_version (fastmcp-pvl-core), and (when configured) an upstream version block. Useful for verifying a deployment matches the expected build.

list_resourcesA

List all available resources and resource templates.

Returns JSON with resource metadata. Static resources have a 'uri' field, while templates have a 'uri_template' field with placeholders like {name}.

read_resourceA

Read a resource by its URI.

For static resources, provide the exact URI. For templated resources, provide the URI with template parameters filled in.

Returns the resource content as a string. Binary content is base64-encoded.

Prompts

Interactive templates invoked by user choice

NameDescription
select_providerUse when choosing a specific provider instead of auto-selection. Not needed when provider='auto' (the default).
sd_prompt_guideGuide for writing SD WebUI prompts — CLIP tags (SD 1.5 / SDXL / Pony / Illustrious / NoobAI), prose (Flux 1 / FLUX.2 / Schnell / SD 3 / 3.5)
apply_styleApply a saved style preset to an image generation request. Loads the style's creative brief and instructs the LLM to interpret it per-provider — not copy it verbatim.

Resources

Contextual data attached and managed by the client

NameDescription
prompt_guideProvider-specific prompt writing tips. Covers CLIP tag format for SD 1.5/SDXL, Flux natural language style, OpenAI prompt guidance, quality tags, negative prompt templates, and provider selection.
provider_capabilitiesDiscover configured providers, available models, each model's prompt_style, supported aspect ratios, quality levels, and background options.
image_listList all gallery images (generated and imported) with their IDs, resource URIs, and prompts. Read this to find image_ids for use with image://*/view and image://*/metadata resources.
style_listList all available style presets with their names, tags, and default parameters. Use to browse styles before applying one via the apply_style prompt.
image_viewerInteractive image viewer for show_image results.
image_galleryInteractive gallery for browsing all generated images.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pvliesdonk/image-generation-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server