Intelligent Image Generator MCP Server for Professional Images
Transform casual prompts into professional-quality images with an MCP server that enhances AI-generated visuals for fast, reliable results.
npx -y @shinpr/mcp-imageOverview
This MCP (Model Context Protocol) server converts casual, user-friendly prompts into polished, production-ready contexts for image generation models. It sits between client applications and image-generation backends (e.g., diffusion models, hosted APIs) and performs prompt engineering, style normalization, and lightweight post-processing orchestration so models produce consistent, professional outputs with minimal client-side effort.
Designed for teams that need predictable, high-quality images at scale, the server centralizes styling presets, content policies, and transformation logic. Clients send an informal prompt and optional metadata; the server returns a refined prompt, generation parameters, and orchestration instructions that downstream model adapters can execute for fast, reliable results.
Features
- Centralized prompt professionalization and normalization
- Style presets (brand, photography, illustration) and parameter templates
- MCP-compatible endpoints for prompt/context generation
- Rate-limited, cacheable responses for improved throughput
- Optional image post-processing hooks (upscale, color adjust, background removal)
- Health and diagnostics endpoints for monitoring
- Docker-ready, environment-driven configuration
Installation / Configuration
Prerequisites: Node.js 16+ and npm, or Docker.
Clone and run locally:
# run in development
Environment variables (example .env):
PORT=8080
MODEL_BACKEND_URL=https://api.example-model.com/v1/generate
MODEL_API_KEY=sk-xxxx
CACHE_TTL_SECONDS=300
STYLE_PRESETS_PATH=./presets.json
MAX_CONCURRENCY=8
Start with Docker:
# build
# run
Configuration file example (presets.json):
Available Resources
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /mcp/context | Convert casual prompt + metadata into generation context and parameters |
| POST | /mcp/generate | Full pipeline: professionalize prompt, call model backend, return image reference |
| GET | /health | Service health and basic metrics |
| GET | /presets | List available style presets |
Tools exposed by the server (logical operations available via MCP context):
- professionalizePrompt: expand, disambiguate, and inject style/negative tokens
- applyStylePreset: merge named preset into generation parameters
- parameterTuner: adjust CFG/sampling/steps based on desired fidelity/time tradeoffs
- postProcessHooks: pipeline steps for upscaling, denoising, color correction
Example request to /mcp/context:
POST /mcp/context
Content-Type: application/json
{
"prompt": "a sleek coffee cup on a wooden table",
"preset": "brand_photography",
"aspect_ratio": "16:9",
"quality": "high"
}
Example response:
Use Cases
E-commerce product hero images
- Input: “blue running shoes on white”
- Server output: refined prompt with studio lighting, white seamless backdrop, consistent product scale, and negative prompts to avoid text/logos; then orchestration to upscale and crop for hero banner sizes.
Marketing banners and social ads
- Input: “team celebration, happy, confetti”
- Server output: cinematic color grading, shallow depth-of-field for subject emphasis, aspect ratios for common ad slots; returns generation params tuned for fast iteration.
Product mockups for design reviews
- Input: “app UI on phone mockup”
- Server output: photorealistic phone render preset, camera angle and shadow consistency, optional PSD/transparent background post-processing.
Social media avatars and illustrations
- Input: “stylized portrait, anime”
- Server output: apply illustration_flat preset, restrict text and watermark artifacts, provide vector-friendly options and post-process for crisp line art.
Notes for Developers
- The server is backend-agnostic: swap MODEL_BACKEND_URL to point to a hosted API or an internal model adapter.
- Caching: commonly used prompt+preset combinations are cached to speed repeated requests.
- Extendability: add presets by editing presets.json or via the /presets management endpoint.
- Security: enforce content policy checks before sending prompts to model backend; configure API keys through environment variables.
This MCP server is intended as a middleware layer that standardizes prompt quality across teams and production pipelines, reducing variance and improving visual consistency for downstream image generators.