Image Generation MCP Server

السجل الرسمي الوسائط والتصميم

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

ماذا يمكنك أن تفعل مع Image Generation MCP Server؟

  • Multi-provider: OpenAI (gpt-image-2, gpt-image-1.5, dall-e-3), Google Gemini (gemini-3.1-flash-image, gemini-3-pro-image, gemini-3.1-flash-lite-image), SD WebUI (Stable Diffusion / Forge / reForge), and a zero-cost placeholder for testing.
  • Per-model style metadata: every model carries a style_profile (strengths, prompt grammar, lifecycle); list_providers includes a top-level warnings array for deprecated models. See [Model Catalog](https://pvliesdonk.github.io/image-generation-mcp/p...
  • Keyword-based auto-selection: provider="auto" routes by prompt content (text/logo → OpenAI, photoreal/anime → SD WebUI, draft → placeholder).
  • CDN-style image transforms: image://{id}/view?format=webp&width=512&crop_x=... resizes / re-encodes / crops on demand without re-generating.
  • Hybrid background tasks: long-running SD generations run with task=True (poll for status); short OpenAI calls stream progress in the foreground.
  • MCP Apps gallery + viewer: interactive UI surfaces (browse generated images, edit / crop / rotate) for clients that support app: resources.
  • Production deployment: Docker (multi-arch), .deb/.rpm with hardened systemd, OIDC + bearer auth, persistent EventStore for HTTP session resumability.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package image-generation-mcp
Claude Code
claude mcp add image-generation-mcp-server -e 'IMAGE_GENERATION_MCP_KV_STORE_URL=file:///data/state' -e 'IMAGE_GENERATION_MCP_TOOLS_ALLOW=<IMAGE_GENERATION_MCP_TOOLS_ALLOW>' -e 'IMAGE_GENERATION_MCP_TOOLS_DENY=<IMAGE_GENERATION_MCP_TOOLS_DENY>' -e 'IMAGE_GENERATION_MCP_SERVER_NAME=<IMAGE_GENERATION_MCP_SERVER_NAME>' -e 'IMAGE_GENERATION_MCP_INSTRUCTIONS=<IMAGE_GENERATION_MCP_INSTRUCTIONS>' -e 'FASTMCP_LOG_LEVEL=INFO' -e 'FASTMCP_ENABLE_RICH_LOGGING=true' -e 'IMAGE_GENERATION_MCP_A1111_HOST=<IMAGE_GENERATION_MCP_A1111_HOST>' -e 'IMAGE_GENERATION_MCP_A1111_MODEL=<IMAGE_GENERATION_MCP_A1111_MODEL>' -e 'IMAGE_GENERATION_MCP_READ_ONLY=true' -e 'IMAGE_GENERATION_MCP_SCRATCH_DIR=~/.image-generation-mcp/images' -e 'IMAGE_GENERATION_MCP_OPENAI_API_KEY=<your image_generation_mcp_openai_api_key>' -e 'IMAGE_GENERATION_MCP_GOOGLE_API_KEY=<your image_generation_mcp_google_api_key>' -e 'IMAGE_GENERATION_MCP_SD_WEBUI_HOST=<IMAGE_GENERATION_MCP_SD_WEBUI_HOST>' -e 'IMAGE_GENERATION_MCP_SD_WEBUI_MODEL=<IMAGE_GENERATION_MCP_SD_WEBUI_MODEL>' -e 'IMAGE_GENERATION_MCP_DEFAULT_PROVIDER=auto' -e 'IMAGE_GENERATION_MCP_TRANSFORM_CACHE_SIZE=64' -e 'IMAGE_GENERATION_MCP_PAID_PROVIDERS=openai' -e 'IMAGE_GENERATION_MCP_STYLES_DIR=~/.image-generation-mcp/styles' -e 'IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUT=false' -e 'IMAGE_GENERATION_MCP_MAX_INPUT_IMAGE_BYTES=20971520' -e 'IMAGE_GENERATION_MCP_FETCH_TIMEOUT_S=30.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_TTL_DEFAULT_S=3600.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_TTL_MAX_S=86400.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_GRACE_TTL_S=60.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_LEASE_S=60.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_MAX_UPLOAD_BYTES=104857600' -- uvx image-generation-mcp==1.12.1
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "image-generation-mcp-server": {
            "command": "uvx",
            "args": [
                "image-generation-mcp==1.12.1"
            ],
            "env": {
                "IMAGE_GENERATION_MCP_KV_STORE_URL": "file:///data/state",
                "IMAGE_GENERATION_MCP_TOOLS_ALLOW": "<IMAGE_GENERATION_MCP_TOOLS_ALLOW>",
                "IMAGE_GENERATION_MCP_TOOLS_DENY": "<IMAGE_GENERATION_MCP_TOOLS_DENY>",
                "IMAGE_GENERATION_MCP_SERVER_NAME": "<IMAGE_GENERATION_MCP_SERVER_NAME>",
                "IMAGE_GENERATION_MCP_INSTRUCTIONS": "<IMAGE_GENERATION_MCP_INSTRUCTIONS>",
                "FASTMCP_LOG_LEVEL": "INFO",
                "FASTMCP_ENABLE_RICH_LOGGING": "true",
                "IMAGE_GENERATION_MCP_A1111_HOST": "<IMAGE_GENERATION_MCP_A1111_HOST>",
                "IMAGE_GENERATION_MCP_A1111_MODEL": "<IMAGE_GENERATION_MCP_A1111_MODEL>",
                "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_SD_WEBUI_HOST": "<IMAGE_GENERATION_MCP_SD_WEBUI_HOST>",
                "IMAGE_GENERATION_MCP_SD_WEBUI_MODEL": "<IMAGE_GENERATION_MCP_SD_WEBUI_MODEL>",
                "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"
            }
        }
    }
}

متغيرات البيئة

  • IMAGE_GENERATION_MCP_KV_STORE_URL Persistent-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.
  • IMAGE_GENERATION_MCP_TOOLS_ALLOW Comma-separated explicit tool names this instance exposes; every other tool is hidden from listings and cannot be invoked. Names matching no registered tool are inert. Mutually exclusive with `tools_deny`. Takes effect through `apply_tool_visibility`.
  • IMAGE_GENERATION_MCP_TOOLS_DENY Comma-separated explicit tool names hidden from this instance (absent from listings, cannot be invoked). Names matching no registered tool are inert. Mutually exclusive with `tools_allow`. Takes effect through `apply_tool_visibility`.
  • IMAGE_GENERATION_MCP_SERVER_NAME Rename this server instance; defaults to the project name.
  • IMAGE_GENERATION_MCP_INSTRUCTIONS Replaces the default MCP instructions text sent to clients.
  • FASTMCP_LOG_LEVEL Log level for FastMCP internals and app loggers (DEBUG / INFO / WARNING / ERROR / CRITICAL). The -v CLI flag overrides to DEBUG.
  • FASTMCP_ENABLE_RICH_LOGGING Set false for plain or structured JSON log output.
  • IMAGE_GENERATION_MCP_A1111_HOST Deprecated alias for IMAGE_GENERATION_MCP_SD_WEBUI_HOST; logs a warning when used.
  • IMAGE_GENERATION_MCP_A1111_MODEL Deprecated alias for IMAGE_GENERATION_MCP_SD_WEBUI_MODEL; logs a warning when used.
  • IMAGE_GENERATION_MCP_READ_ONLY When true, write-tagged tools (image generation, transforms, uploads) are hidden from clients. Set false to enable them.
  • IMAGE_GENERATION_MCP_SCRATCH_DIR Directory where generated images are saved. Created automatically on first use.
  • IMAGE_GENERATION_MCP_OPENAI_API_KEY سري OpenAI API key. Enables the OpenAI provider (gpt-image-2, gpt-image-1.5, dall-e-3) when set.
  • IMAGE_GENERATION_MCP_GOOGLE_API_KEY سري Google 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_SD_WEBUI_HOST SD WebUI base URL (such as http://localhost:7860). Enables the SD WebUI provider when set. Compatible with AUTOMATIC1111, Forge, reForge, and Forge-neo.
  • IMAGE_GENERATION_MCP_SD_WEBUI_MODEL SD WebUI checkpoint name, used for model-aware preset detection (SD 1.5 / SDXL / Lightning) and checkpoint override. Unset uses the instance's current model.
  • IMAGE_GENERATION_MCP_DEFAULT_PROVIDER Provider 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_SIZE Maximum number of transformed image results (resize, crop, convert) kept in memory. Set 0 to disable caching.
  • IMAGE_GENERATION_MCP_PAID_PROVIDERS Comma-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_DIR Directory for style preset files (Markdown with YAML front matter). Created automatically if it does not exist.
  • IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUT Allow reading input images from local filesystem paths. Off by default: only URLs and uploads are accepted.
  • IMAGE_GENERATION_MCP_MAX_INPUT_IMAGE_BYTES Maximum accepted input image size in bytes.
  • IMAGE_GENERATION_MCP_FETCH_TIMEOUT_S HTTP timeout in seconds when fetching remote image URLs (fetch_image and URL inputs).
  • IMAGE_GENERATION_MCP_TRANSFER_TTL_DEFAULT_S Link lifetime in seconds when the caller requests no explicit TTL.
  • IMAGE_GENERATION_MCP_TRANSFER_TTL_MAX_S Ceiling in seconds a caller-requested link TTL is clamped to.
  • IMAGE_GENERATION_MCP_TRANSFER_GRACE_TTL_S Post-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_S Crashed-handler reclaim window in seconds for an in-flight reservation.
  • IMAGE_GENERATION_MCP_TRANSFER_MAX_UPLOAD_BYTES Maximum size in bytes of a single upload.
OCI package ghcr.io/pvliesdonk/image-generation-mcp:v1.12.1
Claude Code
claude mcp add image-generation-mcp-server -e 'IMAGE_GENERATION_MCP_BASE_URL=<IMAGE_GENERATION_MCP_BASE_URL>' -e 'IMAGE_GENERATION_MCP_BEARER_TOKEN=<your image_generation_mcp_bearer_token>' -e 'IMAGE_GENERATION_MCP_OIDC_CONFIG_URL=<IMAGE_GENERATION_MCP_OIDC_CONFIG_URL>' -e 'IMAGE_GENERATION_MCP_OIDC_CLIENT_ID=<IMAGE_GENERATION_MCP_OIDC_CLIENT_ID>' -e 'IMAGE_GENERATION_MCP_OIDC_CLIENT_SECRET=<your image_generation_mcp_oidc_client_secret>' -e 'IMAGE_GENERATION_MCP_OIDC_AUDIENCE=<IMAGE_GENERATION_MCP_OIDC_AUDIENCE>' -e 'IMAGE_GENERATION_MCP_OIDC_REQUIRED_SCOPES=openid' -e 'IMAGE_GENERATION_MCP_OIDC_ADVERTISED_SCOPES=openid offline_access' -e 'IMAGE_GENERATION_MCP_OIDC_JWT_SIGNING_KEY=<your image_generation_mcp_oidc_jwt_signing_key>' -e 'IMAGE_GENERATION_MCP_OIDC_VERIFY_ACCESS_TOKEN=false' -e 'IMAGE_GENERATION_MCP_KV_STORE_URL=file:///data/state' -e 'IMAGE_GENERATION_MCP_APP_DOMAIN=<IMAGE_GENERATION_MCP_APP_DOMAIN>' -e 'IMAGE_GENERATION_MCP_TOOLS_ALLOW=<IMAGE_GENERATION_MCP_TOOLS_ALLOW>' -e 'IMAGE_GENERATION_MCP_TOOLS_DENY=<IMAGE_GENERATION_MCP_TOOLS_DENY>' -e 'IMAGE_GENERATION_MCP_AUTH_MODE=<IMAGE_GENERATION_MCP_AUTH_MODE>' -e 'IMAGE_GENERATION_MCP_BEARER_TOKENS_FILE=<IMAGE_GENERATION_MCP_BEARER_TOKENS_FILE>' -e 'IMAGE_GENERATION_MCP_BEARER_DEFAULT_SUBJECT=bearer-anon' -e 'IMAGE_GENERATION_MCP_SERVER_NAME=<IMAGE_GENERATION_MCP_SERVER_NAME>' -e 'IMAGE_GENERATION_MCP_INSTRUCTIONS=<IMAGE_GENERATION_MCP_INSTRUCTIONS>' -e 'IMAGE_GENERATION_MCP_HTTP_PATH=/mcp' -e 'PUID=1000' -e 'PGID=1000' -e 'FASTMCP_LOG_LEVEL=INFO' -e 'FASTMCP_ENABLE_RICH_LOGGING=true' -e 'IMAGE_GENERATION_MCP_A1111_HOST=<IMAGE_GENERATION_MCP_A1111_HOST>' -e 'IMAGE_GENERATION_MCP_A1111_MODEL=<IMAGE_GENERATION_MCP_A1111_MODEL>' -e 'IMAGE_GENERATION_MCP_READ_ONLY=true' -e 'IMAGE_GENERATION_MCP_SCRATCH_DIR=~/.image-generation-mcp/images' -e 'IMAGE_GENERATION_MCP_OPENAI_API_KEY=<your image_generation_mcp_openai_api_key>' -e 'IMAGE_GENERATION_MCP_GOOGLE_API_KEY=<your image_generation_mcp_google_api_key>' -e 'IMAGE_GENERATION_MCP_SD_WEBUI_HOST=<IMAGE_GENERATION_MCP_SD_WEBUI_HOST>' -e 'IMAGE_GENERATION_MCP_SD_WEBUI_MODEL=<IMAGE_GENERATION_MCP_SD_WEBUI_MODEL>' -e 'IMAGE_GENERATION_MCP_DEFAULT_PROVIDER=auto' -e 'IMAGE_GENERATION_MCP_TRANSFORM_CACHE_SIZE=64' -e 'IMAGE_GENERATION_MCP_PAID_PROVIDERS=openai' -e 'IMAGE_GENERATION_MCP_STYLES_DIR=~/.image-generation-mcp/styles' -e 'IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUT=false' -e 'IMAGE_GENERATION_MCP_MAX_INPUT_IMAGE_BYTES=20971520' -e 'IMAGE_GENERATION_MCP_FETCH_TIMEOUT_S=30.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_TTL_DEFAULT_S=3600.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_TTL_MAX_S=86400.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_GRACE_TTL_S=60.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_LEASE_S=60.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_MAX_UPLOAD_BYTES=104857600' -- docker run -i --rm ghcr.io/pvliesdonk/image-generation-mcp:v1.12.1 --port
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "image-generation-mcp-server": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/pvliesdonk/image-generation-mcp:v1.12.1",
                "--port"
            ],
            "env": {
                "IMAGE_GENERATION_MCP_BASE_URL": "<IMAGE_GENERATION_MCP_BASE_URL>",
                "IMAGE_GENERATION_MCP_BEARER_TOKEN": "<your image_generation_mcp_bearer_token>",
                "IMAGE_GENERATION_MCP_OIDC_CONFIG_URL": "<IMAGE_GENERATION_MCP_OIDC_CONFIG_URL>",
                "IMAGE_GENERATION_MCP_OIDC_CLIENT_ID": "<IMAGE_GENERATION_MCP_OIDC_CLIENT_ID>",
                "IMAGE_GENERATION_MCP_OIDC_CLIENT_SECRET": "<your image_generation_mcp_oidc_client_secret>",
                "IMAGE_GENERATION_MCP_OIDC_AUDIENCE": "<IMAGE_GENERATION_MCP_OIDC_AUDIENCE>",
                "IMAGE_GENERATION_MCP_OIDC_REQUIRED_SCOPES": "openid",
                "IMAGE_GENERATION_MCP_OIDC_ADVERTISED_SCOPES": "openid offline_access",
                "IMAGE_GENERATION_MCP_OIDC_JWT_SIGNING_KEY": "<your image_generation_mcp_oidc_jwt_signing_key>",
                "IMAGE_GENERATION_MCP_OIDC_VERIFY_ACCESS_TOKEN": "false",
                "IMAGE_GENERATION_MCP_KV_STORE_URL": "file:///data/state",
                "IMAGE_GENERATION_MCP_APP_DOMAIN": "<IMAGE_GENERATION_MCP_APP_DOMAIN>",
                "IMAGE_GENERATION_MCP_TOOLS_ALLOW": "<IMAGE_GENERATION_MCP_TOOLS_ALLOW>",
                "IMAGE_GENERATION_MCP_TOOLS_DENY": "<IMAGE_GENERATION_MCP_TOOLS_DENY>",
                "IMAGE_GENERATION_MCP_AUTH_MODE": "<IMAGE_GENERATION_MCP_AUTH_MODE>",
                "IMAGE_GENERATION_MCP_BEARER_TOKENS_FILE": "<IMAGE_GENERATION_MCP_BEARER_TOKENS_FILE>",
                "IMAGE_GENERATION_MCP_BEARER_DEFAULT_SUBJECT": "bearer-anon",
                "IMAGE_GENERATION_MCP_SERVER_NAME": "<IMAGE_GENERATION_MCP_SERVER_NAME>",
                "IMAGE_GENERATION_MCP_INSTRUCTIONS": "<IMAGE_GENERATION_MCP_INSTRUCTIONS>",
                "IMAGE_GENERATION_MCP_HTTP_PATH": "/mcp",
                "PUID": "1000",
                "PGID": "1000",
                "FASTMCP_LOG_LEVEL": "INFO",
                "FASTMCP_ENABLE_RICH_LOGGING": "true",
                "IMAGE_GENERATION_MCP_A1111_HOST": "<IMAGE_GENERATION_MCP_A1111_HOST>",
                "IMAGE_GENERATION_MCP_A1111_MODEL": "<IMAGE_GENERATION_MCP_A1111_MODEL>",
                "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_SD_WEBUI_HOST": "<IMAGE_GENERATION_MCP_SD_WEBUI_HOST>",
                "IMAGE_GENERATION_MCP_SD_WEBUI_MODEL": "<IMAGE_GENERATION_MCP_SD_WEBUI_MODEL>",
                "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"
            }
        }
    }
}

متغيرات البيئة

  • IMAGE_GENERATION_MCP_BASE_URL Public base URL of the deployed server, e.g. `https://mcp.example.com`. Required for OIDC. Also the fallback source of the MCP Apps domain when `app_domain` is unset.
  • IMAGE_GENERATION_MCP_BEARER_TOKEN سري Single shared bearer token; enables bearer auth unless `bearer_tokens_file` is set, which takes precedence.
  • IMAGE_GENERATION_MCP_OIDC_CONFIG_URL OIDC discovery document URL, e.g. `https://auth.example.com/.well-known/openid-configuration`.
  • IMAGE_GENERATION_MCP_OIDC_CLIENT_ID OIDC client identifier registered with the provider.
  • IMAGE_GENERATION_MCP_OIDC_CLIENT_SECRET سري OIDC client secret registered with the provider.
  • IMAGE_GENERATION_MCP_OIDC_AUDIENCE Expected `aud` claim; tokens issued for another audience are rejected.
  • IMAGE_GENERATION_MCP_OIDC_REQUIRED_SCOPES Scopes a caller must present, space- or comma-separated. Defaults to `openid` in oidc-proxy mode.
  • IMAGE_GENERATION_MCP_OIDC_ADVERTISED_SCOPES Scopes advertised to MCP clients in protected-resource metadata, space- or comma-separated. Overrides the default `openid offline_access`; `oidc_required_scopes` is always added on top. Set this when the registered client is not permitted `offline_access`, or to have clients request extra claim scopes (e.g. `groups`) without also requiring them in every token.
  • IMAGE_GENERATION_MCP_OIDC_JWT_SIGNING_KEY سري Signing key for issued JWTs; used in oidc-proxy mode only. When unset, the key is derived deterministically from `oidc_client_secret`, so tokens survive a restart — but rotating that secret invalidates every issued token. Set this explicitly to decouple token validity from secret rotation. Generate with `openssl rand -hex 32`.
  • IMAGE_GENERATION_MCP_OIDC_VERIFY_ACCESS_TOKEN Validate the access token instead of the id token.
  • IMAGE_GENERATION_MCP_KV_STORE_URL Persistent-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.
  • IMAGE_GENERATION_MCP_APP_DOMAIN MCP Apps iframe domain, used for CSP sandboxing. Overrides the host derived from `base_url`.
  • IMAGE_GENERATION_MCP_TOOLS_ALLOW Comma-separated explicit tool names this instance exposes; every other tool is hidden from listings and cannot be invoked. Names matching no registered tool are inert. Mutually exclusive with `tools_deny`. Takes effect through `apply_tool_visibility`.
  • IMAGE_GENERATION_MCP_TOOLS_DENY Comma-separated explicit tool names hidden from this instance (absent from listings, cannot be invoked). Names matching no registered tool are inert. Mutually exclusive with `tools_allow`. Takes effect through `apply_tool_visibility`.
  • IMAGE_GENERATION_MCP_AUTH_MODE Explicit auth-mode override, accepting `remote` or `oidc-proxy` (case- and whitespace-insensitive). When unset the mode is auto-detected from which auth variables are set; the override exists because having all four OIDC variables set is ambiguous between those two modes. Other values are ignored with a warning.
  • IMAGE_GENERATION_MCP_BEARER_TOKENS_FILE Path to a TOML file mapping bearer tokens to subjects; overrides the single-token `bearer_token` mode.
  • IMAGE_GENERATION_MCP_BEARER_DEFAULT_SUBJECT Subject assigned to the single-token bearer mode; ignored when `bearer_tokens_file` is set, since mapped mode carries per-token subjects.
  • IMAGE_GENERATION_MCP_SERVER_NAME Rename this server instance; defaults to the project name.
  • IMAGE_GENERATION_MCP_INSTRUCTIONS Replaces the default MCP instructions text sent to clients.
  • IMAGE_GENERATION_MCP_HTTP_PATH Mount path for the MCP endpoint.
  • PUID Run the server process as this UID; the container entrypoint chowns writable paths to match.
  • PGID Run the server process as this GID; pair with PUID to match the owner of a mounted volume.
  • FASTMCP_LOG_LEVEL Log level for FastMCP internals and app loggers (DEBUG / INFO / WARNING / ERROR / CRITICAL). The -v CLI flag overrides to DEBUG.
  • FASTMCP_ENABLE_RICH_LOGGING Set false for plain or structured JSON log output.
  • IMAGE_GENERATION_MCP_A1111_HOST Deprecated alias for IMAGE_GENERATION_MCP_SD_WEBUI_HOST; logs a warning when used.
  • IMAGE_GENERATION_MCP_A1111_MODEL Deprecated alias for IMAGE_GENERATION_MCP_SD_WEBUI_MODEL; logs a warning when used.
  • IMAGE_GENERATION_MCP_READ_ONLY When true, write-tagged tools (image generation, transforms, uploads) are hidden from clients. Set false to enable them.
  • IMAGE_GENERATION_MCP_SCRATCH_DIR Directory where generated images are saved. Created automatically on first use.
  • IMAGE_GENERATION_MCP_OPENAI_API_KEY سري OpenAI API key. Enables the OpenAI provider (gpt-image-2, gpt-image-1.5, dall-e-3) when set.
  • IMAGE_GENERATION_MCP_GOOGLE_API_KEY سري Google 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_SD_WEBUI_HOST SD WebUI base URL (such as http://localhost:7860). Enables the SD WebUI provider when set. Compatible with AUTOMATIC1111, Forge, reForge, and Forge-neo.
  • IMAGE_GENERATION_MCP_SD_WEBUI_MODEL SD WebUI checkpoint name, used for model-aware preset detection (SD 1.5 / SDXL / Lightning) and checkpoint override. Unset uses the instance's current model.
  • IMAGE_GENERATION_MCP_DEFAULT_PROVIDER Provider 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_SIZE Maximum number of transformed image results (resize, crop, convert) kept in memory. Set 0 to disable caching.
  • IMAGE_GENERATION_MCP_PAID_PROVIDERS Comma-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_DIR Directory for style preset files (Markdown with YAML front matter). Created automatically if it does not exist.
  • IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUT Allow reading input images from local filesystem paths. Off by default: only URLs and uploads are accepted.
  • IMAGE_GENERATION_MCP_MAX_INPUT_IMAGE_BYTES Maximum accepted input image size in bytes.
  • IMAGE_GENERATION_MCP_FETCH_TIMEOUT_S HTTP timeout in seconds when fetching remote image URLs (fetch_image and URL inputs).
  • IMAGE_GENERATION_MCP_TRANSFER_TTL_DEFAULT_S Link lifetime in seconds when the caller requests no explicit TTL.
  • IMAGE_GENERATION_MCP_TRANSFER_TTL_MAX_S Ceiling in seconds a caller-requested link TTL is clamped to.
  • IMAGE_GENERATION_MCP_TRANSFER_GRACE_TTL_S Post-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_S Crashed-handler reclaim window in seconds for an in-flight reservation.
  • IMAGE_GENERATION_MCP_TRANSFER_MAX_UPLOAD_BYTES Maximum size in bytes of a single upload.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Image Generation MCP
  2. Features
  3. What you can do with it
  4. Installation
  5. Release channels
  6. Quick start
  7. Configuration
  8. Authentication
  9. Post-scaffold checklist
  10. GitHub secrets
  11. Local development
  12. Troubleshooting
  13. Links
  14. Domain configuration
  15. Key design decisions

Image Generation MCP

Multi-provider image generation MCP server built on FastMCP. Generate images from Claude Desktop, Claude Code, or any MCP client using OpenAI, Google Gemini, Stable Diffusion (SD WebUI), or a zero-cost placeholder provider.

Documentation | Config wizard | PyPI | Docker

Features

  • Multi-provider: OpenAI (gpt-image-2, gpt-image-1.5, dall-e-3), Google Gemini (gemini-3.1-flash-image, gemini-3-pro-image, gemini-3.1-flash-lite-image), SD WebUI (Stable Diffusion / Forge / reForge), and a zero-cost placeholder for testing.
  • Per-model style metadata: every model carries a style_profile (strengths, prompt grammar, lifecycle); list_providers includes a top-level warnings array for deprecated models. See Model Catalog.
  • Keyword-based auto-selection: provider="auto" routes by prompt content (text/logo → OpenAI, photoreal/anime → SD WebUI, draft → placeholder).
  • CDN-style image transforms: image://{id}/view?format=webp&width=512&crop_x=... resizes / re-encodes / crops on demand without re-generating.
  • Hybrid background tasks: long-running SD generations run with task=True (poll for status); short OpenAI calls stream progress in the foreground.
  • MCP Apps gallery + viewer: interactive UI surfaces (browse generated images, edit / crop / rotate) for clients that support app: resources.
  • Production deployment: Docker (multi-arch), .deb/.rpm with hardened systemd, OIDC + bearer auth, persistent EventStore for HTTP session resumability.

What you can do with it

With this server mounted in an MCP client, you can ask:

  • "Generate a coffee mug product photo on a worn oak table, 16:9, no text." Routes to gpt-image-1.5 for typography-aware photorealism.
  • "Create three concept-art variations of a cyberpunk alley at dusk." Composes generate_image with provider="sd_webui" and a stylised checkpoint like dreamshaperXL.
  • "Crop this image to a 1:1 square centred on the subject and resize to 512px." Uses image://{id}/view?width=512&height=512&crop_x=... resource transforms.
  • "Show me my recent generations." Browses the gallery via the image://list resource and the MCP Apps gallery viewer.
  • "Save this style as 'cyberpunk-night' so I can apply it to future requests." Uses the style library, whose markdown briefs the LLM interprets per-provider.
  • "Replace the background of my last photo with a sunset sky." Uses transform_image with the gallery image_id as a reference (image-to-image via Gemini).

Installation

From PyPI
pip install image-generation-mcp

If you add optional extras via the PROJECT-EXTRAS-START / PROJECT-EXTRAS-END sentinels in pyproject.toml, document them below:

ExtraIncludesUse when
mcpfastmcp[tasks]>=3.0,<4Background-task support (task=True), required for long SD generations.
openaiopenai>=1.0Enables the OpenAI provider.
google-genaigoogle-genai>=1.0Enables the Gemini provider.
allfastmcp[tasks] + openai + google-genaiEverything except SD WebUI (which is HTTP-only, no extra needed).

Example: pip install image-generation-mcp[all].

From source
git clone https://github.com/pvliesdonk/image-generation-mcp.git
cd image-generation-mcp
uv sync --all-extras --all-groups
Docker
docker pull ghcr.io/pvliesdonk/image-generation-mcp:latest

To run the newest merged code instead of the newest release, use the rolling edge tag. It is rebuilt on every merge to main and carries no version identity. See Image tags for the full tag list.

docker pull ghcr.io/pvliesdonk/image-generation-mcp:edge

A compose.yml ships at the repo root as a starting point. Copy .env.example to .env, edit, and docker compose up -d.

To attach a remote Python debugger (development only; the protocol is unauthenticated), see Remote debugging.

Linux packages (.deb / .rpm)

Download .deb or .rpm packages from the GitHub Releases page. Both install a hardened systemd unit; env configuration is sourced from /etc/image-generation-mcp/env (copy from the shipped /etc/image-generation-mcp/env.example).

Claude Desktop (.mcpb bundle)

Download the .mcpb bundle from the GitHub Releases page and double-click to install, or run:

mcpb install image-generation-mcp-<version>.mcpb

Claude Desktop prompts for required env vars via a GUI wizard, with no manual JSON editing needed.

For manual Claude Desktop configuration and setup options, see Claude Desktop deployment.

Release channels

Artifacts ship on three channels. Each row lists exactly what that channel publishes.

ChannelVersion identityArtifacts
edge (rolling)None; the commit is the identityDocker image :edge rebuilt on every merge to main; .mcpb bundle as the mcpb-bundle-edge workflow artifact; Claude Code plugin .zip as the plugin-zip-edge artifact; rolling unstable docs version. It leaves no git tag, GitHub release, or PyPI entry behind.
Pre-releasevX.Y.Z-rc.N, computed and reviewed in its release pull requestPyPI (as the pre-release X.Y.ZrcN); GitHub release with wheels, sdist, .deb/.rpm packages, .mcpb bundle, plugin .zip, and SBOM attached; Docker image under its immutable vX.Y.Z-rc.N tag plus the ordering-aware rolling rc tag. Skips the plugin marketplace, the MCP registry, and the docs deploy.
StablevX.Y.ZEverything: PyPI, Docker (version tag plus ordering-aware latest / vX / vX.Y), .deb/.rpm, GitHub release assets (wheels, sdist, .mcpb bundle, plugin .zip, SBOM), plugin marketplace and MCP registry entries (when the release is the newest stable), versioned docs with an ordering-aware latest alias.

Pre-releases reach PyPI so that a candidate's .mcpb bundle installs: the bundle points at PyPI rather than carrying the code. Ordinary installers never see them, because a PEP 440 resolver skips pre-releases unless the requirement pins one or you pass --pre. Ask for a candidate by name with pip install image-generation-mcp==X.Y.ZrcN. PyPI spells it in the PEP 440 canonical form, while tags use SemVer. Rolling pointers are ordering-aware, so a patch release cut from an old release/X.Y branch never moves latest-style tags back to older content, and a candidate for an already-released version never moves rc. See Release process for the full model.

Quick start

image-generation-mcp serve                                # stdio transport
image-generation-mcp serve --transport http --port 8000   # streamable HTTP

For library usage (embedding the domain logic without the MCP transport), import from the image_generation_mcp package directly. See the project's domain modules under src/image_generation_mcp/ for entry points.

Server info

The server registers a built-in get_server_info tool (via fastmcp_pvl_core.register_server_info_tool) so operators can confirm the deployed version with a single MCP call. The default response carries server_name, server_version, and core_version. Servers that talk to a remote upstream wire upstream version reporting inside the DOMAIN-UPSTREAM-START / DOMAIN-UPSTREAM-END sentinel in src/image_generation_mcp/server.py; see CLAUDE.md for the wiring pattern.

Configuration

Core environment variables shared across all fastmcp-pvl-core-based services:

VariableDefaultDescription
IMAGE_GENERATION_MCP_KV_STORE_URLfile:///data/statePersistent-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_LEVELINFOLog level for FastMCP internals and app loggers (DEBUG / INFO / WARNING / ERROR / CRITICAL). The -v CLI flag overrides to DEBUG.
FASTMCP_ENABLE_RICH_LOGGINGtrueSet false for plain or structured JSON log output.

Domain-specific variables go below under Domain configuration.

Authentication

Callers authenticate via a bearer token or OIDC (mutually exclusive). See the Authentication guide for setup, mapped multi-subject tokens, OIDC, and troubleshooting.

Post-scaffold checklist

After copier copy and gh repo create --push:

  1. Fill in the DOMAIN blocks (every section marked with a DOMAIN sentinel comment) in this README and in CLAUDE.md. The GENERATED-ENV-TABLE-* regions are not DOMAIN blocks; the config generator owns them and rewrites them on every run.
  2. Configure GitHub secrets (see below).
  3. Install dev + docs tooling: uv sync --all-extras --all-groups.
  4. Install pre-commit hooks: uv run pre-commit install.
  5. Run the gate locally: uv run pytest -x -q && uv run ruff check --fix . && uv run ruff format . && uv run mypy src/ tests/.
  6. Push the first commit. CI should be green.

GitHub secrets

CI workflows reference three repository secrets. Configure them via Settings → Secrets and variables → Actions or with gh secret set:

SecretUsed byHow to generate
RELEASE_TOKENrelease-prepare.yml, release.yml, release-notes.yml, copier-update.yml, renovate.yml, bootstrap.ymlFine-grained PAT at https://github.com/settings/personal-access-tokens/new with contents: write, pull_requests: write, and administration: write (bootstrap applies the repository rulesets + auto-merge). Must belong to a repository admin: the shipped rulesets grant bypass to the admin role, and the release tag + GitHub release that knope creates after a release pull request merges rely on it (pull requests the token opens also need it so their CI runs). Scoped to this repo.
CODECOV_TOKENci.ymlhttps://codecov.io: sign in with GitHub and add the repo. The upload token is on its settings page.
CLAUDE_CODE_OAUTH_TOKENclaude.yml, claude-code-review.yml, release-notes.ymlRun claude setup-token locally and paste the result.
gh secret set RELEASE_TOKEN
gh secret set CODECOV_TOKEN
gh secret set CLAUDE_CODE_OAUTH_TOKEN

Dependency updates are handled by Renovate (renovate.yml), which reuses RELEASE_TOKEN. It maintains uv.lock and auto-merges patch/minor bumps once the CI Success check is green; bootstrap.yml enables auto-merge and applies the repository rulesets (.github/rulesets/) on first push. See Repository Protection for the per-branch posture and bypass model. GitHub Actions are updated in the copier template and arrive via copier update, not per-repo.

GITHUB_TOKEN is auto-provided; no action needed.

Local development

The PR gate (matches CI):

uv run pytest -x -q                                  # tests
uv run ruff check --fix . && uv run ruff format .    # lint + format
uv run mypy src/ tests/                              # type-check

Pre-commit runs a subset of the gate on each commit; see .pre-commit-config.yaml for details, or CLAUDE.md for the full Hard PR Acceptance Gates.

Troubleshooting

Moving a scaffolded project

uv sync creates .venv/bin/* scripts with absolute shebangs pointing at the venv Python. If you move the repo after scaffolding (mv /old/path /new/path), uv run pytest fails with ModuleNotFoundError: No module named 'fastmcp' because the stale shebang resolves to a different interpreter than the venv's site-packages.

Fix:

rm -rf .venv
uv sync --all-extras --all-groups

uv run python -m pytest also works as a one-shot workaround (bypasses the stale entry-script shim).

uv.lock refresh after copier update

When copier update introduces new dependencies (such as a new extra added to pyproject.toml.jinja), the CI install step runs uv sync --locked, which fails against a stale lockfile. Run uv lock locally and commit the refreshed uv.lock alongside accepting the copier-update PR.

CI installs with --locked (and the review workflow with --frozen) so no job ever rewrites uv.lock in its own workspace: a job that re-locks hides the drift it just repaired, and a dirty workspace breaks any later git checkout in the same job. Lockfile drift then shows up as a red install step with a clear message, not as a silent mutation.

Domain configuration

Domain environment variables use the IMAGE_GENERATION_MCP_ prefix:

VariableDefaultRequiredDescription
IMAGE_GENERATION_MCP_A1111_HOST(none)NoDeprecated alias for IMAGE_GENERATION_MCP_SD_WEBUI_HOST; logs a warning when used.
IMAGE_GENERATION_MCP_A1111_MODEL(none)NoDeprecated alias for IMAGE_GENERATION_MCP_SD_WEBUI_MODEL; logs a warning when used.
IMAGE_GENERATION_MCP_READ_ONLYtrueNoWhen true, write-tagged tools (image generation, transforms, uploads) are hidden from clients. Set false to enable them.
IMAGE_GENERATION_MCP_SCRATCH_DIR~/.image-generation-mcp/imagesNoDirectory where generated images are saved. Created automatically on first use.
IMAGE_GENERATION_MCP_OPENAI_API_KEY(none)NoOpenAI API key. Enables the OpenAI provider (gpt-image-2, gpt-image-1.5, dall-e-3) when set.
IMAGE_GENERATION_MCP_GOOGLE_API_KEY(none)NoGoogle 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_SD_WEBUI_HOST(none)NoSD WebUI base URL (such as http://localhost:7860). Enables the SD WebUI provider when set. Compatible with AUTOMATIC1111, Forge, reForge, and Forge-neo.
IMAGE_GENERATION_MCP_SD_WEBUI_MODEL(none)NoSD WebUI checkpoint name, used for model-aware preset detection (SD 1.5 / SDXL / Lightning) and checkpoint override. Unset uses the instance's current model.
IMAGE_GENERATION_MCP_DEFAULT_PROVIDERautoNoProvider 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_SIZE64NoMaximum number of transformed image results (resize, crop, convert) kept in memory. Set 0 to disable caching.
IMAGE_GENERATION_MCP_PAID_PROVIDERSopenaiNoComma-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_DIR~/.image-generation-mcp/stylesNoDirectory for style preset files (Markdown with YAML front matter). Created automatically if it does not exist.
IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUTfalseNoAllow reading input images from local filesystem paths. Off by default: only URLs and uploads are accepted.
IMAGE_GENERATION_MCP_MAX_INPUT_IMAGE_BYTES20971520NoMaximum accepted input image size in bytes.
IMAGE_GENERATION_MCP_FETCH_TIMEOUT_S30.0NoHTTP timeout in seconds when fetching remote image URLs (fetch_image and URL inputs).
IMAGE_GENERATION_MCP_TRANSFER_TTL_DEFAULT_S3600.0NoLink lifetime in seconds when the caller requests no explicit TTL.
IMAGE_GENERATION_MCP_TRANSFER_TTL_MAX_S86400.0NoCeiling in seconds a caller-requested link TTL is clamped to.
IMAGE_GENERATION_MCP_TRANSFER_GRACE_TTL_S60.0NoPost-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_S60.0NoCrashed-handler reclaim window in seconds for an in-flight reservation.
IMAGE_GENERATION_MCP_TRANSFER_MAX_UPLOAD_BYTES104857600NoMaximum size in bytes of a single upload.

The create_download_link / create_upload_link tools and the /transfer/{token} route register only on an HTTP or SSE transport with BASE_URL set, and store link tokens in IMAGE_GENERATION_MCP_KV_STORE_URL; the IMAGE_GENERATION_MCP_TRANSFER_* knobs above tune link lifetime and upload limits. Security: IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUT grants callers server-filesystem read access via reference-image paths; enable it only for trusted callers or local single-user deployments.

Domain-config fields are composed inside src/image_generation_mcp/config.py between the CONFIG-FIELDS-START / CONFIG-FIELDS-END sentinels; env reads go through fastmcp_pvl_core.env(_ENV_PREFIX, "SUFFIX", default) so naming stays consistent, and field invariants go in __post_init__ between the CONFIG-VALIDATE-START / CONFIG-VALIDATE-END sentinels. Each field's metadata help and tags generate the table above directly, so keep them accurate and complete.

Key design decisions

  • Multi-provider with capability discovery, not feature flags. Each provider's discover_capabilities() reports its actual supported aspect ratios / qualities / formats / negative-prompt support at startup; routing logic asks the capability surface, not a hard-coded enum. New providers slot in by satisfying the protocol, with no router edits needed. (See docs/decisions/0001-…, 0002-…, 0007-….)
  • Per-model style_profile metadata, surfaced via list_providers. Closed-list providers (OpenAI, Gemini, placeholder) use exact-key lookup; SD WebUI uses a regex-ordered pattern table. Profiles include lifecycle flags (current / legacy / deprecated) and feed an auto-built top-level warnings array. (See docs/decisions/0009-….)
  • Hybrid background tasks. Short calls (OpenAI ~5 s) stream progress in-line; long calls (SD WebUI 30-180 s) run as background tasks with check_generation_status polling; clients pick the mode via task=True. (See docs/decisions/0005-….)
  • Image asset model: content-addressed registry + sidecar JSON metadata + on-demand transforms. Generated images keep their full-resolution original; image://{id}/view?format=webp&width=512&crop_x=… resources do format conversion / resize / crop on demand without re-generating. Transforms are cached. (See docs/decisions/0006-….)
  • Style library. User-saved markdown briefs (with YAML frontmatter for tags / aspect ratio / quality) that the LLM interprets per-provider, not copy-pasted verbatim. Distinct from per-model style_profile: style library is the brief; style_profile describes the model. (See docs/decisions/0008-… and 0009-… for disambiguation.)
  • Composes fastmcp_pvl_core.ServerConfig, never inherits. Domain config goes between CONFIG-FIELDS-START / CONFIG-FIELDS-END sentinels; env reads route through fastmcp_pvl_core.env(...) to keep prefix naming consistent.

الأسئلة الشائعة

ما هو Image Generation MCP Server؟

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

كيف أثبّت Image Generation MCP Server؟

يعمل على جهازك. في Claude Code: claude mcp add image-generation-mcp-server -e 'IMAGE_GENERATION_MCP_KV_STORE_URL=file:///data/state' -e 'IMAGE_GENERATION_MCP_TOOLS_ALLOW=<IMAGE_GENERATION_MCP_TOOLS_ALLOW>' -e 'IMAGE_GENERATION_MCP_TOOLS_DENY=<IMAGE_GENERATION_MCP_TOOLS_DENY>' -e 'IMAGE_GENERATION_MCP_SERVER_NAME=<IMAGE_GENERATION_MCP_SERVER_NAME>' -e 'IMAGE_GENERATION_MCP_INSTRUCTIONS=<IMAGE_GENERATION_MCP_INSTRUCTIONS>' -e 'FASTMCP_LOG_LEVEL=INFO' -e 'FASTMCP_ENABLE_RICH_LOGGING=true' -e 'IMAGE_GENERATION_MCP_A1111_HOST=<IMAGE_GENERATION_MCP_A1111_HOST>' -e 'IMAGE_GENERATION_MCP_A1111_MODEL=<IMAGE_GENERATION_MCP_A1111_MODEL>' -e 'IMAGE_GENERATION_MCP_READ_ONLY=true' -e 'IMAGE_GENERATION_MCP_SCRATCH_DIR=~/.image-generation-mcp/images' -e 'IMAGE_GENERATION_MCP_OPENAI_API_KEY=<your image_generation_mcp_openai_api_key>' -e 'IMAGE_GENERATION_MCP_GOOGLE_API_KEY=<your image_generation_mcp_google_api_key>' -e 'IMAGE_GENERATION_MCP_SD_WEBUI_HOST=<IMAGE_GENERATION_MCP_SD_WEBUI_HOST>' -e 'IMAGE_GENERATION_MCP_SD_WEBUI_MODEL=<IMAGE_GENERATION_MCP_SD_WEBUI_MODEL>' -e 'IMAGE_GENERATION_MCP_DEFAULT_PROVIDER=auto' -e 'IMAGE_GENERATION_MCP_TRANSFORM_CACHE_SIZE=64' -e 'IMAGE_GENERATION_MCP_PAID_PROVIDERS=openai' -e 'IMAGE_GENERATION_MCP_STYLES_DIR=~/.image-generation-mcp/styles' -e 'IMAGE_GENERATION_MCP_ALLOW_LOCAL_FILE_INPUT=false' -e 'IMAGE_GENERATION_MCP_MAX_INPUT_IMAGE_BYTES=20971520' -e 'IMAGE_GENERATION_MCP_FETCH_TIMEOUT_S=30.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_TTL_DEFAULT_S=3600.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_TTL_MAX_S=86400.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_GRACE_TTL_S=60.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_LEASE_S=60.0' -e 'IMAGE_GENERATION_MCP_TRANSFER_MAX_UPLOAD_BYTES=104857600' -- uvx image-generation-mcp==1.12.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Image Generation MCP Server إلى مفتاح API؟

نعم. يتطلب IMAGE_GENERATION_MCP_OPENAI_API_KEY, IMAGE_GENERATION_MCP_GOOGLE_API_KEY, IMAGE_GENERATION_MCP_BEARER_TOKEN, IMAGE_GENERATION_MCP_OIDC_CLIENT_SECRET, IMAGE_GENERATION_MCP_OIDC_JWT_SIGNING_KEY، وتضبطها في إعداداته.

هل Image Generation MCP Server مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون Image Generation MCP Server؟

ينشره pvliesdonk. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.