Image Analysis MCP Server
Provides Claude with detailed image inspection capabilities, including metadata extraction, histogram analysis, tonal and color analysis, sharpness detection, and more, supporting both standard and RAW formats.
README
Image Analysis MCP Server
A comprehensive read-only image analysis MCP (Model Context Protocol) server that provides Claude with detailed image inspection capabilities.
Features
- Metadata & EXIF Extraction: Camera settings, GPS, timestamps, and more
- Histogram Analysis: RGB and luminance histograms with statistics
- Tonal Analysis: Shadows, midtones, highlights, dynamic range, and clipping detection
- Color Analysis: Dominant colors, color temperature, saturation, and color cast detection
- Spatial Properties: Sharpness scoring, noise estimation, edge density, and blur detection
- Frequency Analysis: FFT-based detail level assessment (optional)
- Preview Generation: Base64-encoded preview images (optional)
Supported Formats
Standard Formats
- JPEG (.jpg, .jpeg)
- PNG (.png)
- TIFF (.tif, .tiff)
- WebP (.webp)
RAW Formats
- Canon RAW (.cr2, .cr3)
- Nikon RAW (.nef)
- Sony RAW (.arw)
- Adobe DNG (.dng)
- Fuji RAW (.raf)
- Olympus RAW (.orf)
Installation
Option 1: Docker (Recommended)
The easiest way to get started - no Python setup required!
# Build the Docker image
cd image_analysis
docker build -t image-analysis-mcp:latest .
# Test it works
docker run --rm image-analysis-mcp:latest python -c "import image_analysis_mcp; print('✓ OK')"
See DOCKER.md for complete Docker documentation.
Option 2: Poetry
# Prerequisites: Python 3.12+, Poetry
cd image_analysis
# Install dependencies
poetry install
# Activate the virtual environment
poetry shell
Option 3: pip
# Prerequisites: Python 3.12+
cd image_analysis
# Install the package
pip install -e .
Usage
Running the MCP Server
The server can be run directly:
# Using Poetry
poetry run image-analysis-mcp
# Or if in activated virtual environment
image-analysis-mcp
Configuration for Claude Desktop
Add to your Claude Desktop configuration file (claude_desktop_config.json):
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Using Docker (Recommended)
{
"mcpServers": {
"image-analysis": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"/path/to/your/images:/images:ro",
"image-analysis-mcp:latest"
]
}
}
}
Then reference images as /images/photo.jpg in Claude.
Using Poetry
{
"mcpServers": {
"image-analysis": {
"command": "poetry",
"args": ["run", "image-analysis-mcp"],
"cwd": "/absolute/path/to/image_analysis"
}
}
}
Using pip (Global Install)
{
"mcpServers": {
"image-analysis": {
"command": "image-analysis-mcp"
}
}
}
Available Tools
1. get_metadata
Fast metadata and EXIF extraction without loading full image data.
Parameters:
filepath(str): Path to image file
Example:
What camera was used for IMG_1234.CR2?
2. get_histogram
Extract RGB and luminance histograms with channel statistics.
Parameters:
filepath(str): Path to image fileprocess_raw(bool, optional): Process RAW files (default: True)
Example:
Show me the histogram for landscape.jpg
3. analyze_image
Comprehensive image analysis including all properties.
Parameters:
filepath(str): Path to image fileinclude_frequency(bool, optional): Include FFT analysis (default: False)include_preview(bool, optional): Generate preview image (default: False)preview_max_dimension(int, optional): Preview max size (default: 1920)preview_format(str, optional): "JPEG", "PNG", or "WEBP" (default: "JPEG")preview_quality(int, optional): Quality 1-100 (default: 85)process_raw(bool, optional): Process RAW files (default: True)
Example:
Analyze photo.jpg and tell me if it's sharp enough for printing
Analyze this RAW file and show me a preview
Architecture
This server follows a fully stateless architecture:
- Each tool call is independent
- Images are loaded, analyzed, and immediately discarded
- No caching or session state
- Predictable and reproducible results
Performance
Typical performance on modern hardware:
| Operation | 2MP Image | 12MP Image | 50MP Image |
|---|---|---|---|
get_metadata |
10ms | 15ms | 25ms |
get_histogram |
50ms | 150ms | 600ms |
analyze_image |
200ms | 800ms | 3000ms |
analyze_image (with preview) |
300ms | 1100ms | 4000ms |
analyze_image (with FFT) |
500ms | 2000ms | 8000ms |
Example Conversations
Check Image Quality
User: Is wedding_photo.jpg sharp enough for a large print?
Claude: [Uses analyze_image to check sharpness, noise, and resolution]
Exposure Analysis
User: Is this sunset photo overexposed?
Claude: [Uses analyze_image to check histogram and clipping]
Color Analysis
User: What are the dominant colors in this landscape?
Claude: [Uses analyze_image to extract dominant colors and temperature]
Metadata Extraction
User: What camera settings were used for IMG_5678.NEF?
Claude: [Uses get_metadata to extract EXIF data]
Error Handling
The server provides clear error messages:
FILE_NOT_FOUND: File doesn't existPERMISSION_DENIED: Cannot read fileUNSUPPORTED_FORMAT: Format not supportedCORRUPTED_FILE: File is corruptedOUT_OF_MEMORY: Image too largeINVALID_PARAMETER: Bad parameter valueRAW_PROCESSING_FAILED: RAW conversion failed
Development
Running Tests
poetry run pytest
Code Formatting
poetry run black src/
Type Checking
poetry run mypy src/
License
This project is provided as-is for use with Claude Desktop and MCP.
Author
Jim Dasher
Version
1.0.0 - October 28, 2025
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。