Image MCP Server
Provides capabilities for AI image generation through OpenAI's image inference APIs, allowing users to create images with customizable prompts, sizes, and styles.
Enables AI image generation by integrating with Replicate's image inference APIs, supporting various AI models for generating images in square, landscape, and portrait formats.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Image MCP Server create a landscape image of a peaceful mountain lake at sunrise"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Image MCP Server
An MCP (Model Context Protocol) server that provides AI image generation capabilities using the ai-image npm module, which wraps around OpenAI and Replicate image inference APIs.
Features
generate_ai_image: Generate AI images with customizable prompts, sizes, models, and styles
square_image: Generate square images (1024x1024) - shortcut command
landscape_image: Generate landscape images (1536x1024) - shortcut command
portrait_image: Generate portrait images (1024x1536) - shortcut command
Built on the ai-image module for seamless integration with OpenAI and Replicate APIs
Simple setup and configuration
Related MCP server: GPT Image MCP Server
Installation
npm install -g image-mcpSetup
Claude Desktop Configuration
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"image-mcp": {
"command": "npx",
"args": ["image-mcp@latest"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key",
"REPLICATE_API_TOKEN": "your-replicate-api-token",
"MCP_TIMEOUT": "1200000"
},
"resetTimeoutOnProgress": true
}
}
}Environment Variables
The server requires API keys for the underlying image generation services:
OPENAI_API_KEY: Your OpenAI API key for GPT-based models (we won't be supporting Dall-e models as they'll likely be dropped soon)REPLICATE_API_TOKEN: Your Replicate API token for other AI models
Usage
Once configured, you can use the image generation functions through Claude:
generate_ai_image
Generate AI images with various parameters:
prompt (required): Text description of the image to generate
size (optional): Image dimensions in WIDTHxHEIGHT format (default: "1024x1024")
model (optional): Specific AI model to use
output (optional): Custom output file path
Shortcut Commands
For convenience, use these preset size commands:
square_image: Generate 1024x1024 square images
landscape_image: Generate 1536x1024 landscape images
portrait_image: Generate 1024x1536 portrait images
All shortcut commands accept the same parameters as generate_ai_image except size (which is preset).
Example prompts:
"A red cat in Picasso style"
"A sunset over mountains, photorealistic"
"Abstract geometric patterns in blue and gold"
Development
# Clone the repository
git clone https://github.com/iplanwebsites/image-mcp.git
cd image-mcp
# Install dependencies
npm install
# Run in development mode
npm run dev
# Start the server
npm startRequirements
Node.js >= 18.0.0
Valid API keys for OpenAI and/or Replicate
TODOs
Urgent
Fix npm module issue: It only works locally...
Improvements
Better guides: Add more detailed setup guides with troubleshooting steps, an Add to cursor button, etc
Use ai-image library directly: Replace subprocess CLI calls with direct library imports
Return file paths: Return created image file paths in response
Local inference support: Add support for local models like Flux
Image optimization: Add lightweight image resizing and optimization options
Image captioning tool: Add captioning model for basic use cases (useful for models without vision)
License
MIT
Available Tools
5 toolsgenerate_ai_imageC
Generate AI images using the ai-image npm module
Inputs: prompt (required), output_dir (required), size, model, +3 more.
landscape_imageA
Generate a landscape AI image (1536x1024) - works great for cover images - shortcut for generate_ai_image
Inputs: prompt (required), output_dir (required), model, output, +2 more.
pizza-testC
Mock test tool that returns a password
Inputs: no named parameters.
portrait_imageA
Generate a portrait AI image (1024x1536) - shortcut for generate_ai_image
Inputs: prompt (required), output_dir (required), model, output, +2 more.
square_imageA
Generate a square AI image (1024x1024) - shortcut for generate_ai_image
Inputs: prompt (required), output_dir (required), model, output, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Multiple tools have unclear boundaries and overlapping purposes. The 'landscape_image', 'portrait_image', and 'square_image' tools are explicitly described as shortcuts for 'generate_ai_image', creating significant ambiguity about when to use the general tool versus the specific ones. Additionally, 'pizza-test' appears unrelated to image generation, further confusing the tool set's purpose.
The naming conventions are mixed but still readable. Most tools follow a consistent snake_case pattern (e.g., 'generate_ai_image', 'landscape_image'), but 'pizza-test' uses kebab-case, breaking the pattern. The verb styles are somewhat inconsistent, with 'generate' used for some and implied for others.
The tool count of 5 is reasonable for an image generation server, though it feels slightly thin due to the redundancy among tools. It's not excessive, but the inclusion of a mock test tool ('pizza-test') that doesn't align with the domain reduces the effective scope, making the count borderline appropriate.
There are significant gaps in the tool surface for an image generation domain. The server lacks essential operations such as editing, resizing, filtering, or deleting images, and it offers no way to manage or retrieve generated images. The tools are narrowly focused on generation only, with redundant shortcuts, and the unrelated 'pizza-test' tool adds confusion rather than functionality.
Related MCP Connectors
MCP server for Flux AI image generation
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
MCP server for Qwen Image 3 AI image generation
An MCP server that integrates with Discord to provide AI-powered features.
Related MCP Servers
- FlicenseAqualityDmaintenanceAn MCP server that allows users to generate, edit, and create variations of images through OpenAI's DALL-E API, supporting both DALL-E 2 and DALL-E 3 models.49-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables text-to-image generation and editing using OpenAI's gpt-image-1 model, supporting multiple output formats, quality settings, and background options.69-
- AlicenseBqualityDmaintenanceAn MCP server that enables image generation using Replicate's Flux 1.1 Pro model. It provides a tool for creating visuals from text prompts with customizable settings for aspect ratio, output format, and quality.1MIT
- AlicenseAqualityDmaintenanceMCP server for AI image generation supporting text-to-image and image-to-image editing via any OpenAI-compatible service, with configurable models, aspect ratios, and sizes.2MIT