
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
mcp-image-gen
Advanced tools
MCP server for image generation and editing using multiple providers (Gemini, Replicate, Hugging Face)
An MCP (Model Context Protocol) server for image generation and editing using multiple providers (Gemini, Replicate, Hugging Face), plus local image manipulation tools.
npm install -g mcp-image-gen
npm install mcp-image-gen
You can configure the provider through environment variables. The server will automatically select the provider based on configuration or API key availability.
gemini-3-pro-image-previewGEMINI_API_KEYsdxl-lightning (Fast and low cost)instruct-pix2pixREPLICATE_API_TOKENIMAGE_GENERATION_PROVIDER=replicatestable-diffusion-xl-base-1.0HUGGING_FACE_TOKENIMAGE_GENERATION_PROVIDER=huggingface.env Example# Gemini
GEMINI_API_KEY=your-gemini-api-key
# Replicate
REPLICATE_API_TOKEN=your-replicate-api-token
# Hugging Face
HUGGING_FACE_TOKEN=your-hugging-face-token
# Force provider selection (optional)
IMAGE_GENERATION_PROVIDER=replicate
Add the following to your configuration file (e.g., claude_desktop_config.json):
{
"mcpServers": {
"image-generation": {
"command": "npx",
"args": ["-y", "mcp-image-gen"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key",
"REPLICATE_API_TOKEN": "optional-replicate-token",
"HUGGING_FACE_TOKEN": "optional-hf-token"
}
}
}
}
To run the server manually:
npx -y mcp-image-gen
node path/to/mcp-server.js
If installed globally with npm install -g mcp-image-gen:
image-generation-mcp-server
Environment Variables:
Make sure to pass the required environment variables (GEMINI_API_KEY, REPLICATE_API_TOKEN, HUGGING_FACE_TOKEN) in your client configuration.
The parameters available for each tool depend on the configured provider.
generate_image_from_textGenerates a new image from a text description.
Base Parameters:
prompt: Detailed description of the image.output_path (optional): Path where the generated image will be saved.Gemini Provider Extra Parameters: When using Google Gemini, these additional parameters are available:
aspectRatio: Aspect ratio of the image. Supported values: 1:1 (default), 3:4, 4:3, 9:16, 16:9.resolution: Resolution/Size of the image. Supported values: 1K (default), 2K, 4K.numberOfImages: Number of images to generate (candidate count).Note: Gemini generates images in PNG format.
edit_imageEdits an existing image based on instructions. Note: This tool only modifies the image content (visuals); it does NOT change the image format or dimensions.
Base Parameters:
image_path: Path to the original image.prompt: Editing instructions.output_path (optional): Path where the result will be saved.Gemini Provider Extra Parameters:
aspectRatio, resolution, numberOfImages.remove_backgroundRemoves the background from an image.
Parameters:
image_path: Path to the image file.output_path (optional): Path where the transparent image will be saved.convert_image_formatConverts an image to a different format (e.g., PNG, JPEG, WEBP).
Parameters:
source_path: Path to the source image.format: Target format (png, jpeg, jpg, webp, gif, tiff, avif).output_path (optional): Path where the converted image will be saved.resize_imageResizes an image to specific dimensions.
Parameters:
source_path: Path to the source image.width: Target width in pixels.height (optional): Target height in pixels.fit (optional): How the image should be resized to fit the dimensions (cover, contain, fill, inside, outside). Default is cover.output_path (optional): Path where the resized image will be saved.get_image_infoGet metadata about an image (dimensions, format, etc.).
Parameters:
image_path: Path to the image file.FAQs
MCP server for image generation and editing using multiple providers (Gemini, Replicate, Hugging Face)
We found that mcp-image-gen demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.