OpenAI Image MCP Server
Enables conversational image generation, editing, and refinement through OpenAI models with session memory for iterative creative workflows.
README

OpenAI Image MCP Server
A Model Context Protocol (MCP) server that provides conversational OpenAI image generation capabilities. Generate, edit, and refine images through multi-turn conversations with advanced models like GPT-4o and GPT-4.1.
🎯 What Problems Does This Solve?
Traditional Image Generation Pain Points
❌ Single-shot limitations - "Make it more blue" requires re-describing everything
❌ No conversation memory - Each request starts from scratch
❌ Context loss - Can't reference previous images naturally
❌ Manual workflows - Complex multi-step processes require multiple tools
Our Solution
✅ Conversational refinement - "Make it more blue" works naturally
✅ Session memory - Builds on previous context automatically
✅ Reference awareness - "Use the same style as the previous image"
✅ Integrated workflows - Single interface for complex creative projects
🚀 Key Capabilities
🔄 Session-Based Conversations
# Start a focused session
session = create_image_session("Logo design for tech startup")
# Initial generation
result1 = generate_image_in_session(session_id, "modern tech logo")
# Natural refinement - no need to repeat everything
result2 = generate_image_in_session(session_id, "make it more minimalist")
# Build on context
result3 = generate_image_in_session(session_id, "try it in dark blue")
🔄 Hybrid Workflows
Start simple, expand when needed:
# Quick one-shot for immediate need
result = generate_image("modern office workspace")
# Later, promote to session for refinement
session = promote_image_to_session(
result["image_path"],
"Office workspace refinement project"
)
# Continue with conversational context
generate_image_in_session(session_id, "add more plants and warmer lighting")
🎨 Specialized Tools
- Product photography - E-commerce optimized with multiple angles
- UI/UX assets - Design elements with consistent styling
- Reference-based editing - Use existing images as style guides
- Batch processing - Multiple variations with consistent themes
🎯 Perfect For
LLM Applications
- Claude Desktop integration - Conversational image workflows
- AI assistants - Contextual image generation capabilities
- Chatbots - Visual content creation with memory
Creative Workflows
- Iterative design - Refine concepts through conversation
- Brand development - Consistent visual identity across assets
- Product visualization - Multiple angles and contexts
- Content creation - Blog headers, social media, presentations
Development Teams
- Rapid prototyping - Quick UI mockups and concepts
- Documentation - Visual aids and diagrams
- Marketing assets - Consistent brand imagery
- User testing - Visual variations for A/B testing
🚀 Quick Start
1. Installation
Requirements: Python 3.10 or higher
# Install the package
pip install openai-image-mcp
If you need to upgrade Python:
# Using pyenv (recommended)
pyenv install 3.11.8
pyenv global 3.11.8
pip install openai-image-mcp
# Or using Homebrew (macOS)
brew install python@3.11
python3.11 -m pip install openai-image-mcp
For development installation from source, see DEVELOPMENT.md
2. Claude Desktop Integration
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"openai-image-mcp": {
"command": "sh",
"args": [
"-c",
"openai-image-mcp 2> mcp_server_stderr.log"
],
"env": {
"OPENAI_API_KEY": "your_openai_api_key_here"
}
}
}
}
For development setup and alternative configurations, see DEVELOPMENT.md
3. Start Creating
# Create a session for your project
session = create_image_session("Website hero images")
# Generate with natural language
generate_image_in_session(session_id, "modern tech office with diverse team")
# Refine naturally
generate_image_in_session(session_id, "make the lighting warmer")
# Add context
generate_image_in_session(session_id, "create a mobile version of this scene")
🛠️ Available Tools
Core Session Management
create_image_session- Start conversational sessiongenerate_image_in_session- Generate with context awarenessget_session_status- View conversation history and progressclose_session- End session and cleanup
Image Generation & Editing
generate_image- General purpose (session optional)edit_image- Modify existing imagesgenerate_product_image- E-commerce optimizedgenerate_ui_asset- UI/UX design elementsanalyze_and_improve_image- AI-powered image enhancement
Workflow Tools
promote_image_to_session- Upgrade one-shot to conversationallist_active_sessions- Manage multiple projectsget_usage_guide- Comprehensive tool documentation
🎯 Usage Patterns
📱 Conversational Design Sessions (Recommended)
Best for: Multi-image projects, iterative refinement, brand consistency
session = create_image_session("App icon design")
generate_image_in_session(session_id, "colorful chat app icon")
generate_image_in_session(session_id, "make it more professional")
generate_image_in_session(session_id, "try different color schemes")
⚡ Quick One-Shot Generation
Best for: Immediate needs, single images, uncertain scope
generate_image("professional headshot for LinkedIn")
generate_product_image("wireless headphones", background_type="white")
🔄 Hybrid Start-Simple-Expand-Later
Best for: Testing concepts, uncertain requirements, flexible workflows
# Start quick
result = generate_image("logo concept for bakery")
# Expand when needed
session = promote_image_to_session(result["image_path"], "Bakery brand development")
generate_image_in_session(session_id, "create business card version")
🎨 Example Workflows
Brand Identity Development
session = create_image_session("TechCorp brand identity")
# Logo concepts
generate_image_in_session(session_id, "modern tech company logo")
generate_image_in_session(session_id, "make it more geometric and minimal")
# Expand to brand elements
generate_image_in_session(session_id, "business card design using this logo")
generate_image_in_session(session_id, "website header with the logo")
Product Marketing Suite
session = create_image_session("Wireless headphones marketing")
# Product shots
generate_product_image("premium wireless headphones", angle="45deg")
result = promote_image_to_session(previous_result["image_path"], "headphones campaign")
# Marketing variations
generate_image_in_session(session_id, "lifestyle shot with person using them")
generate_image_in_session(session_id, "create packaging design mockup")
📚 Documentation
- LLM.md - Comprehensive guide for LLMs using this server
- DEVELOPMENT.md - Technical implementation, testing, and contribution guide
📋 Requirements
- Python 3.10+ (3.11+ recommended)
- OpenAI API key with GPT-4o/GPT-4.1 access
- Poetry for dependency management (development only)
🔐 Environment Variables
OPENAI_API_KEY(required) - Your OpenAI API keyMCP_MAX_SESSIONS(optional) - Maximum concurrent sessions (default: 100)MCP_SESSION_TIMEOUT(optional) - Session timeout in seconds (default: 3600)
🤝 Contributing
We welcome contributions! Please see DEVELOPMENT.md for:
- Technical architecture details
- Development setup instructions
- Testing guidelines
- Code style requirements
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Related Resources
- Model Context Protocol - Protocol specification
- OpenAI Responses API - Underlying API
- Claude Desktop - Primary integration target
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。