AI Picture MCP Server
Integrates with Alibaba Cloud DashScope's FLUX model to generate and optimize high-quality AI images for web design workflows based on natural language prompts.
Click on "Install 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., "@AI Picture MCP Servergenerate a hero image of a sleek home office for a productivity blog"
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.
AI Picture MCP Server
A Model Context Protocol (MCP) server that provides AI-powered image generation capabilities specifically designed for web design workflows. This server integrates with Alibaba Cloud DashScope's FLUX model to generate high-quality images based on English prompts, perfect for creating placeholder images, hero images, product mockups, and other web assets.
🚀 Quick Start
npx -y aipic-mcpRelated MCP server: jimeng4-mcp
✨ Features
🎨 AI Image Generation: Generate high-quality images using DashScope FLUX model with natural language prompts
🖥️ Web-Optimized Output: Automatically optimizes images for web use with proper compression and sizing
📏 Flexible Sizing: Support for custom width and height specifications (default: 1024x1024)
📋 Base64 Encoding: Returns images in base64 format for direct use in web applications
⚡ Smart File Saving: Auto-saves to Desktop when possible, falls back to temp directory
🔄 Async Processing: Uses DashScope's async task API for reliable image generation
🛡️ Robust Error Handling: Comprehensive error handling for API issues, network problems, and invalid inputs
🔐 Environment Variable Support: Configure API keys via
DASHSCOPE_API_KEYorMODELSCOPE_API_KEY
📦 Installation & Usage
Option 1: NPX (Recommended)
Use directly with NPX without installation:
npx -y aipic-mcpClaude Desktop Configuration:
{
"mcpServers": {
"aipic": {
"command": "npx",
"args": ["-y", "aipic-mcp"]
}
}
}Option 2: NPX with API Key Environment Variable (Recommended)
For the best experience, configure your DashScope API key as an environment variable:
{
"mcpServers": {
"aipic": {
"command": "npx",
"args": ["-y", "aipic-mcp"],
"env": {
"DASHSCOPE_API_KEY": "sk-your-dashscope-api-key-here"
}
}
}
}With full PATH (if using NVM or custom Node installation):
{
"mcpServers": {
"aipic": {
"command": "/Users/your-username/.nvm/versions/node/v20.19.4/bin/npx",
"args": ["-y", "aipic-mcp"],
"env": {
"DASHSCOPE_API_KEY": "sk-your-dashscope-api-key-here",
"PATH": "/Users/your-username/.nvm/versions/node/v20.19.4/bin:/usr/local/bin:/usr/bin:/bin"
}
}
}
}Option 3: Global Installation
npm install -g aipic-mcpClaude Desktop Configuration:
{
"mcpServers": {
"aipic": {
"command": "aipic-mcp"
}
}
}With API Key Environment Variable:
{
"mcpServers": {
"aipic": {
"command": "aipic-mcp",
"env": {
"DASHSCOPE_API_KEY": "sk-your-dashscope-api-key-here"
}
}
}
}Option 4: Local Development
If you want to contribute to the project or customize it:
Clone this repository:
git clone https://github.com/leonaries/aipic-mcp.git
cd aipic-mcpInstall dependencies:
npm installBuild the TypeScript code:
npm run buildTest locally:
npm run devClaude Desktop Configuration for Local Development:
{
"mcpServers": {
"aipic": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/Users/your-username/path/to/aipic-mcp",
"env": {
"DASHSCOPE_API_KEY": "sk-your-dashscope-api-key-here"
}
}
}
}Note: Replace
/Users/your-username/path/to/aipic-mcpwith the actual path where you cloned the repository.
⚙️ Configuration
Claude Desktop Setup
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Choose one of the configuration options above based on your installation method.
DashScope API Key
You'll need a DashScope API key from Alibaba Cloud to use this server. Get one from Alibaba Cloud DashScope.
How to get your API key:
Visit Alibaba Cloud DashScope
Sign up/login to your account
Go to API Keys section
Create a new API key with image generation permissions
Copy the API key (format:
sk-xxxxxxxxxx)
Two ways to provide your API key:
Environment Variable (Recommended): Configure in Claude Desktop config as shown above
Runtime Parameter: Pass the API key when calling the tool (less convenient but more flexible)
🎯 Usage
The server provides one main tool:
generate_web_image
Generates an AI image optimized for web design use.
Parameters:
prompt(required): English description of the image to generateapiKey(optional): Your DashScope API key (if not set viaDASHSCOPE_API_KEYenvironment variable)width(optional): Image width in pixels (default: 1024)height(optional): Image height in pixels (default: 1024)outputPath(optional): Custom path to save the image (default: auto-saves to Desktop or temp directory)
Example prompts:
"A modern minimalist office workspace with laptop and coffee cup"
"Abstract geometric background in blue and purple gradients"
"Professional team meeting in a bright conference room"
"E-commerce product photo of wireless headphones on white background"
"Hero image of a mountain landscape at sunrise"
Example usage in Claude (with environment variable configured):
Generate a hero image for my website with the prompt "A sleek modern smartphone floating above a city skyline at dusk"Example usage in Claude (with manual API key):
Generate a hero image for my website with the prompt "A sleek modern smartphone floating above a city skyline at dusk" using my DashScope API key "sk-your-api-key-here"🔧 API Integration Details
This server uses the Alibaba Cloud DashScope API with the following configuration:
Model:
flux-schnell(FLUX.1 schnell model for fast generation)Endpoint:
https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesisAuthentication: Bearer token (your DashScope API key)
Mode: Async processing with task polling
Timeout: 5 minutes for generation, 30 seconds for download
🛡️ Error Handling
The server handles various error conditions:
Invalid or missing API keys
Rate limiting from DashScope API
Network timeouts and connectivity issues
Task generation failures
Image download failures
File system errors when saving images
🔨 Development
Running in Development Mode
npm run devBuilding for Production
npm run buildTesting
npm testPublishing to NPM
The project is already published to NPM. For maintainers:
npm run build
npm version patch # or minor/major
npm publish🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
🔒 Security Considerations
API keys can be configured via environment variables for better security
Images are saved to the local filesystem under the current working directory
Network requests have appropriate timeouts to prevent hanging
Input validation prevents empty prompts and missing required parameters
Environment variables are more secure than hardcoded keys
📚 Dependencies
@modelcontextprotocol/sdk: MCP SDK for server implementationaxios: HTTP client for API requestssharp: Image processing and optimizationuuid: Unique ID generation for filenames
🐛 Troubleshooting
Common Issues
"Command not found" error
Make sure you have Node.js 18+ installed
Try running
npx -y aipic-mcpinstead of global installationIf using NVM, specify the full path to npx in your configuration
API key errors
Verify your DashScope API key is valid (should start with
sk-)Check that you have sufficient quota on your Alibaba Cloud account
Ensure the API key is correctly configured as
DASHSCOPE_API_KEYenvironment variableMake sure your API key has image generation permissions
Image generation timeout
DashScope API can take up to 2-3 minutes for complex prompts
Try again with a simpler prompt
Check your internet connection
Environment variable not working
Restart Claude Desktop after updating the configuration
Verify the JSON syntax in your configuration file
Check that the API key doesn't have extra spaces or quotes
NPX installation issues
Use the
-yflag to automatically confirm installationsIf using NVM, make sure your PATH is correctly set in the configuration
Task generation failures
The server uses async processing, so it may take a few moments
Check the console logs for detailed error messages
Ensure your prompt is in English for best results
📄 License
MIT License - see LICENSE file for details.
🔗 Links
NPM Package: https://www.npmjs.com/package/aipic-mcp
GitHub Repository: https://github.com/leonaries/aipic-mcp
Alibaba Cloud DashScope: https://dashscope.aliyun.com/
Model Context Protocol: https://modelcontextprotocol.io/
📝 Changelog
v1.0.4 (Latest)
📝 Documentation Update: Comprehensive README improvements with enhanced feature descriptions
🔧 API Key Format: Updated all examples to use correct
sk-prefix for DashScope API keys🌐 Environment Variables: Clarified primary use of
DASHSCOPE_API_KEYover legacyMODELSCOPE_API_KEY✨ User Experience: Improved installation guides and troubleshooting documentation
v1.0.3
⚡ Smart File Saving: Auto-saves images to Desktop when possible, falls back to temp directory
🔧 Enhanced Environment Variables: Primary support for
DASHSCOPE_API_KEY, backward compatible withMODELSCOPE_API_KEY🛡️ Improved Error Handling: Better error messages and more robust API integration
📁 Intelligent Path Detection: Automatic directory creation and fallback mechanisms
🚀 Better User Experience: Images now saved directly to user's Desktop by default
v1.0.1
🔧 BREAKING CHANGE: Updated to use Alibaba Cloud DashScope API instead of ModelScope API
✨ Added async task processing for more reliable image generation
🐛 Fixed API authentication issues
📚 Updated documentation to reflect DashScope integration
v1.0.0
🎉 Initial release with ModelScope integration
🌟 Star this repository if you find it useful!
Available Tools
1 toolgenerate_web_imageB
Generate AI images for web design using FLUX model via DashScope API. Perfect for creating placeholder images, hero images, product images, and other web assets.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | English prompt describing the image to generate (e.g., "A modern office workspace with laptop and coffee") | |
| width | No | Image width in pixels (default: 1024) | |
| height | No | Image height in pixels (default: 1024) | |
| outputPath | No | Optional path where to save the image (default: generated filename) | |
| apiKey | No | DashScope API key for authentication (can also be set via DASHSCOPE_API_KEY environment variable) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the API (DashScope) and model (FLUX) but fails to disclose critical traits like rate limits, costs, authentication requirements beyond the apiKey parameter, error handling, or output format. This leaves significant gaps for an AI agent to understand operational constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured in two sentences: the first states the core purpose, and the second provides usage examples. Every sentence adds value without redundancy, making it efficient and front-loaded with key information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (AI image generation with 5 parameters) and lack of annotations and output schema, the description is incomplete. It doesn't explain the return value (e.g., image file, URL, or error details), performance expectations, or limitations, leaving the agent with insufficient context to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, documenting all 5 parameters thoroughly. The description adds no additional parameter semantics beyond what the schema provides, such as explaining relationships between parameters or usage nuances. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't need to.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate AI images for web design using FLUX model via DashScope API.' It specifies the action (generate), resource (AI images), and context (web design). However, with no sibling tools, it cannot demonstrate differentiation from alternatives, preventing a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides implied usage context by listing examples ('placeholder images, hero images, product images, and other web assets'), which suggests when to use it. However, it lacks explicit guidance on when not to use it or alternatives, and there are no sibling tools to compare against, so the guidance is incomplete.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.4- First observed
generate_web_image
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined for generating AI images for web design.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'generate_web_image' follows a clear verb_noun pattern.
One tool is too few for a server with a broad purpose like 'AI Picture MCP Server', which suggests capabilities beyond just web image generation. This minimal toolset limits functionality and feels incomplete for the implied scope.
The server's name implies a general AI picture domain, but the single tool only covers web image generation. There are significant gaps, such as lack of tools for other image types (e.g., general-purpose, editing, or analysis), making the surface severely incomplete.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Qwen Image 3 AI image generation
MCP server for Flux AI image generation
MCP server for ByteDance Seedream AI image generation
MCP server for Wan AI video generation
Related MCP Servers
- 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
- AlicenseNot gradedqualityDmaintenanceAn MCP server providing multi-modal generation tools based on Volcengine's Jimeng AI, supporting high-quality 4K image creation, intelligent image editing, and video generation. It enables users to perform complex visual tasks directly within clients like Cursor and Claude Desktop.19MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server providing AI image generation via Jimeng models, specifically designed for web design and placeholder creation. It features multi-model support, customizable parameters, and optional persistent storage using Tencent Cloud COS.2MIT
- AlicenseAqualityDmaintenanceMCP server for multi-provider AI image generation (AWS Bedrock, OpenAI, Google Gemini) enabling image generation, transformation, and editing through a unified interface.41MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/leonaries/aipic-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server