Enhanced Image Analysis MCP Server
Enables intelligent analysis and organization of image collections with smart filename generation, metadata extraction, and automated folder organization. Supports batch processing, color analysis, EXIF data extraction, and multiple naming styles for efficient photo management.
README
Enhanced Image Analysis MCP Server
A powerful Model Context Protocol (MCP) server that uses advanced heuristics to analyze images and generate intelligent, descriptive filenames. Perfect for organizing large photo collections, screenshots, and digital assets.
🚀 Features
- 🎯 Smart Image Analysis: Advanced heuristic analysis of image characteristics
- 📝 Intelligent Naming: Four naming styles (descriptive, technical, artistic, location)
- 📂 Batch Processing: Analyze entire directories with recursive search
- 🎨 Color Analysis: Dominant color detection and classification
- 📊 EXIF Data: Extract camera settings, timestamps, and metadata
- 📁 Auto Organization: Sort images into folders by content, date, size, or format
- 🔍 Comprehensive Metadata: Extract detailed technical information
- ⚡ Smart Caching: Avoid re-analyzing unchanged images
📦 Installation
Quick Setup
cd /Users/anthonyturner/MCPs/image-analysis-server
chmod +x setup.sh
./setup.sh
Manual Installation
# Install dependencies
pip3 install mcp Pillow
# Make executable
chmod +x enhanced_image_analysis_server.py
⚙️ Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"image-analysis": {
"command": "python3",
"args": ["/Users/anthonyturner/MCPs/image-analysis-server/enhanced_image_analysis_server.py"],
"env": {}
}
}
}
Configuration file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\\Claude\\claude_desktop_config.json
🛠️ Available Tools
1. ai_analyze_directory_images
Analyze all images in a directory and generate intelligent names.
Parameters:
directory_path(required): Path to directory containing imagesrecursive(optional): Search subdirectories (default: false)rename_files(optional): Actually rename files (default: false)prefix(optional): Add prefix to generated namesnaming_style(optional): Style of naming (default: "descriptive")
Example Usage:
Analyze all images in ~/Pictures/vacation2024 and suggest better names using technical style
2. ai_analyze_single_image
Analyze a single image file and generate a descriptive name.
Parameters:
image_path(required): Path to the image filenaming_style(optional): Naming style (default: "descriptive")detailed_analysis(optional): Provide comprehensive analysis (default: false)
Example Usage:
Analyze /Users/me/Desktop/photo.jpg with detailed analysis using artistic naming style
3. extract_comprehensive_metadata
Extract detailed metadata including EXIF data and color analysis.
Parameters:
image_path(required): Path to the image fileinclude_color_analysis(optional): Include color palette analysis (default: true)
Example Usage:
Extract comprehensive metadata from my screenshot including color analysis
4. organize_images_by_content
Organize images into folders based on detected content and characteristics.
Parameters:
directory_path(required): Path to directory containing imagescreate_folders(optional): Actually create folders and move files (default: false)organization_method(optional): Method to organize (default: "content")
Organization Methods:
content: By detected content (screenshots, photos, portraits, etc.)date: By creation date (YYYY-MM format)size: By image resolution (small, medium, large, huge)format: By file format (jpg, png, gif, etc.)
🎨 Naming Styles
Descriptive (Default)
Focuses on visual content and characteristics:
red_landscape_photo.jpgblue_portrait_screenshot.png
Technical
Emphasizes technical specifications:
large_res_landscape_camera.jpgmedium_res_portrait_screenshot.png
Artistic
Highlights aesthetic qualities:
red_bright_photo.jpggray_dark_bw.png
Location
Designed for organizing by context:
dated_landscape.jpgphoto_portrait.png
📊 Smart Analysis Features
Color Analysis
- Dominant Colors: Top 5 colors with percentages
- Color Family: Classification (red, blue, green, etc.)
- Grayscale Detection: Identifies black & white images
- Brightness Analysis: Average brightness calculation
Content Detection
The server analyzes filename patterns to detect:
- Screenshots: Screen captures and UI elements
- Photos: Camera-taken images and photography
- Edited Images: Modified or processed images
- Scans: Digitized documents
- Logos/Icons: Brand and graphic elements
EXIF Data Extraction
- Camera Information: Make, model, settings
- Timestamps: When photo was taken
- Software: Editing applications used
- GPS Data: Location information (when available)
🚀 Example Workflows
Organize Downloads Folder
I have a messy Downloads folder with hundreds of images. Can you organize them by content type and suggest better names?
Rename Vacation Photos
Analyze images in ~/Pictures/Hawaii2024 recursively, use descriptive naming with prefix "hawaii", and actually rename the files
Technical Analysis
Extract comprehensive metadata from ~/Desktop/camera_test.jpg including color analysis and EXIF data
Batch Screenshot Organization
Organize all images in ~/Desktop by content, actually create the folders and move files
🔧 Advanced Features
Intelligent Conflict Resolution
- Automatically handles duplicate filenames
- Adds incremental counters when needed
- Preserves original files during preview mode
Performance Optimizations
- Smart Caching: Avoids re-analyzing unchanged images
- Efficient Color Analysis: Uses image thumbnails for color detection
- Batch Processing: Optimized for large directories
Error Handling
- Graceful Degradation: Continues processing other files if one fails
- Detailed Error Reports: Clear error messages for troubleshooting
- File Validation: Ensures only supported formats are processed
📋 Supported Formats
- JPEG (.jpg, .jpeg)
- PNG (.png)
- GIF (.gif)
- BMP (.bmp)
- TIFF (.tiff)
- WebP (.webp)
🛡️ Safety Features
- Preview Mode: Default behavior suggests changes without applying them
- Backup Consideration: Always backup important files before batch operations
- Permission Checks: Validates file system permissions before operations
- Non-destructive Analysis: Metadata extraction never modifies original files
🚨 Troubleshooting
Common Issues
-
"No image files found"
- Verify directory path is correct
- Check if images are in supported formats
- Try recursive search for images in subdirectories
-
"Permission denied"
- Ensure read/write permissions on target directory
- Check if files are not locked by other applications
-
"Failed to analyze image"
- File may be corrupted or not a valid image
- Check if sufficient disk space is available
Debug Mode
# Run with debug logging
python3 enhanced_image_analysis_server.py --debug
🔮 Future Enhancements
The server is designed to be easily extensible:
- AI Vision Integration: Add OpenAI GPT-4 Vision or Google Cloud Vision
- Face Detection: Identify and organize photos with people
- Object Recognition: Detect specific objects, animals, or scenes
- Duplicate Detection: Find and organize duplicate images
- Cloud Storage: Support for Google Photos, iCloud, etc.
📄 License
MIT License - Feel free to modify and distribute.
🤝 Contributing
Contributions welcome! Areas for improvement:
- Additional naming styles
- More sophisticated content detection
- Integration with cloud vision APIs
- Performance optimizations
- Additional metadata extraction
Ready to organize your images intelligently? Install the Enhanced Image Analysis MCP Server and transform your photo management workflow!
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。