MCP Image Generator
An MCP server for generating and manipulating images using fal.ai's Stable Diffusion model, supporting multiple artistic styles, image sizes, upscaling, and inpainting.
README
MCP Image Generator
A Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Features
- Generate high-quality images from text prompts
- Support for multiple anime and artistic styles:
- Ghibli Style
- Pixar Style
- Pokemon Style
- Genshin Impact Style
- Cyberpunk Style
- One Piece Style
- Attack on Titan Style
- Shinkai Makoto Style
- Sailor Moon Style
- Evangelion Style
- Disney Princess Style
- Kyoto Animation Style
- Dreamworks Animation Style
- Marvel Studios Style
- DC Comics Style
- Kawaii Pastel Style
- Simpsons Style
- Dragon Ball Style
- Demon Slayer Style
- Warner Bros Animation Style
- Dark Fantasy Style
- And many more Japanese anime styles
- Multiple image size options:
- Square (512x512)
- Square HD (1024x1024)
- Portrait 4:3 (768x1024)
- Portrait 16:9 (576x1024)
- Landscape 4:3 (1024x768)
- Landscape 16:9 (1024x576)
- Generate multiple images in one request (up to 4)
- Image upscaling (4x resolution enhancement)
- Image search and replace functionality
- Built-in NSFW content detection
Installation
- Clone the repository:
git clone [repository-url]
cd aiimagemultistyle
- Install dependencies:
npm install
- Configure environment variables:
Create a
.envfile with the following content:
FALAI_API_KEY=your_fal_ai_key_here
Usage
MCP Server Configuration
To use the MCP Image Generator server, add it to your mcpServers configuration:
{
"mcpServers": {
"image-generator": {
"command": "npx",
"args": ["-y", "aiimagemultistyle"]
}
}
}
You can also specify additional configuration options:
{
"mcpServers": {
"image-generator": {
"command": "npx",
"args": [
"-y",
"aiimagemultistyle",
"--mode=rest",
"--port=9593",
"--endpoint=/rest"
],
"env": {
"FALAI_API_KEY": "your_fal_ai_key_here"
}
}
}
}
Starting the Server
The server can run in two modes:
- STDIO mode (default):
npm start
- REST mode:
npm start -- --mode=rest --port=9593 --endpoint=/rest
API Reference
Generate Image
Request Format:
{
"name": "generate_image",
"arguments": {
"prompt": "A beautiful sunset over mountains",
"style": "ghibli-style",
"num_images": 1,
"size": "square_hd"
}
}
Parameters:
prompt(required): Text description of the image to generatestyle(optional): Image style (default: "ghibli-style")- Available styles: See the Features section above for the complete list
num_images(optional): Number of images to generate (1-4, default: 1)size(optional): Image size (default: "square_hd")- Available sizes: "square", "square_hd", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9"
Upscale Image
Request Format:
{
"name": "upscale_image",
"arguments": {
"image_url": "https://example.com/image.jpg"
}
}
Parameters:
image_url(required): URL of the image to upscale
Search and Replace
Request Format:
{
"name": "search-and-replace",
"arguments": {
"image_url": "https://example.com/image.jpg",
"mask_url": "https://example.com/mask.jpg",
"prompt": "Description of the replacement"
}
}
Parameters:
image_url(required): URL of the image to editmask_url(required): URL of the mask image (black areas preserved, white areas inpainted)prompt(required): Description of the replacement content
Development
npm run build: Build the projectnpm run watch: Watch mode for developmentnpm run inspector: Run MCP inspector
Error Handling
The server provides detailed error messages for common issues:
- Missing API key
- Invalid prompt
- Invalid style or size parameters
- API request failures
- NSFW content detection
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.