Skip to main content
Glama

GPT Image MCP Server

by lansespirit
.env.example3.2 kB
# ============================================================================= # Image Gen MCP Server Environment Configuration # ============================================================================= # Copy this file to .env and update with your actual values # Environment variables use the pattern: SECTION__SUBSECTION__FIELD_NAME # ============================================================================= # Provider Configuration # ============================================================================= # OpenAI Provider (default enabled) PROVIDERS__OPENAI__API_KEY=sk-your-openai-api-key-here PROVIDERS__OPENAI__ORGANIZATION=org-your-org-id PROVIDERS__OPENAI__BASE_URL=https://api.openai.com/v1 PROVIDERS__OPENAI__TIMEOUT=300.0 PROVIDERS__OPENAI__MAX_RETRIES=3 PROVIDERS__OPENAI__ENABLED=true # Gemini Provider (requires Vertex AI setup) # For Imagen models, use path to Google Cloud service account JSON file PROVIDERS__GEMINI__API_KEY=/path/to/your/vertex-ai-key.json PROVIDERS__GEMINI__BASE_URL=https://us-central1-aiplatform.googleapis.com/v1 PROVIDERS__GEMINI__TIMEOUT=300.0 PROVIDERS__GEMINI__MAX_RETRIES=3 PROVIDERS__GEMINI__ENABLED=false PROVIDERS__GEMINI__DEFAULT_MODEL=imagen-4 # ============================================================================= # Image Generation Settings # ============================================================================= IMAGES__DEFAULT_MODEL=gpt-image-1 IMAGES__DEFAULT_QUALITY=auto IMAGES__DEFAULT_SIZE=1536x1024 IMAGES__DEFAULT_STYLE=vivid IMAGES__DEFAULT_MODERATION=auto IMAGES__DEFAULT_OUTPUT_FORMAT=png IMAGES__DEFAULT_COMPRESSION=100 # Base URL for image hosting (e.g., https://cdn.example.com for nginx/CDN) # If empty, uses MCP server host (http://server_host:port/images/{image_id}) IMAGES__BASE_HOST= # ============================================================================= # Server Configuration # ============================================================================= SERVER__NAME="Image Gen MCP Server" SERVER__VERSION=0.1.0 SERVER__PORT=3001 SERVER__HOST=127.0.0.1 SERVER__LOG_LEVEL=INFO SERVER__RATE_LIMIT_RPM=50 # ============================================================================= # Storage Configuration # ============================================================================= STORAGE__BASE_PATH=./storage STORAGE__RETENTION_DAYS=30 STORAGE__MAX_SIZE_GB=10.0 STORAGE__CLEANUP_INTERVAL_HOURS=24 STORAGE__CREATE_SUBDIRECTORIES=true STORAGE__FILE_PERMISSIONS=644 # ============================================================================= # Cache Configuration # ============================================================================= CACHE__ENABLED=true CACHE__TTL_HOURS=24 CACHE__BACKEND=memory CACHE__MAX_SIZE_MB=500 # CACHE__REDIS_URL=redis://localhost:6379 # ============================================================================= # Quick Start Examples # ============================================================================= # For OpenAI only: Set PROVIDERS__OPENAI__API_KEY=sk-your-key # For Gemini only: Set PROVIDERS__GEMINI__API_KEY=your-key and PROVIDERS__GEMINI__ENABLED=true # For both: Set both API keys and enable both providers

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/lansespirit/gpt-image-mcp'

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