ImageMagick
About
An MCP server for image conversion using ImageMagick and darktable.
Details
- Author
- aeyeops
- Categories
- Other, Developer Tools
Jump to
Setup
Install ImageMagick in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/aeyeops/mcp-imagemagick
Follow the installation instructions in the repository README, then restart your MCP client.
An MCP (Model Context Protocol) server for image conversion using ImageMagick and darktable.
This server provides tools for converting DNG (Digital Negative) RAW image files to WebP format using either ImageMagick or darktable as the conversion backend. The server implements the MCP protocol over stdio transport, making it compatible with MCP clients like Claude Desktop.
This project serves as both a functional tool and a learning resource for those interested in creating MCP servers. While currently focused on DNG to WebP conversion, we plan to expand its capabilities over time to support more image formats and operations. We're publishing this as a starting point to share our MCP implementation approach and provide others with a working example to learn from.
- Convert DNG files to WebP format with lossless compression
- Automatic converter selection based on availability
- Fallback support between ImageMagick and darktable
- Full MCP protocol implementation (version 2024-11-05)
- Robust error handling and recovery
- Detailed logging to stderr for debugging
You need at least one of the following image converters installed:
- Command:convert7ormagick
- Install on Ubuntu/Debian:sudo apt install imagemagick
- Verify installation:convert7 -versionormagick -version
- Command-line interface for darktable RAW processor
- Install on Ubuntu/Debian:sudo apt install darktable
- Verify installation:darktable-cli --version
- Ensure you have Rust installed (https://rustup.rs/)
- Clone or download this repository
- Build the project:
cd mcp-imagemagick cargo build --release
The binary will be available attarget/release/mcp-imagemagick.
Add the server to your MCP client configuration. For Claude Desktop, add to your settings:
{ "mcpServers": { "imagemagick": { "command": "/path/to/mcp-imagemagick", "args": [], "env": {} } } }
Converts a DNG file to WebP format with lossless compression.
- input_path(string, required): Path to the DNG file
- output_path(string, required): Path for the WebP output file
- converter(string, optional): Which converter to use
- "auto"(default): Automatically select the best available converter
- "imagemagick": Use ImageMagick (requiresconvert7ormagick)
- "darktable": Use darktable-cli
{ "tool": "convert_dng_to_webp", "arguments": { "input_path": "/path/to/photo.DNG", "output_path": "/path/to/output.webp", "converter": "auto" } }
Check which image converters are available on the system.
Returns:List of available converters and their status
When using"auto"converter selection:
- ImageMagick(priority: 60) - Attempted first when available
- darktable(priority: 40) - Used as fallback or when specifically requested
Note: ImageMagick may not support DNG files directly on all systems. The auto-converter will automatically fall back to darktable if ImageMagick fails.
- webp:lossless=true- Lossless compression
- webp:exact=true- Preserve exact pixel values
- webp:method=6- Maximum compression effort
- webp:partition-limit=0- No partition limit
- Uses darktable's RAW processing pipeline
- Automatically applies any XMP sidecar files if present
- Provides accurate color management for RAW files
The server includes comprehensive error handling:
- Continues running even if individual conversions fail
- Returns proper JSON-RPC error responses
- Logs detailed error information to stderr
- Automatically falls back to alternative converters when available
Control logging verbosity with theRUST_LOGenvironment variable:
# Show only errors RUST_LOG=error mcp-imagemagick # Show informational messages RUST_LOG=info mcp-imagemagick # Show detailed debug information RUST_LOG=debug mcp-imagemagick
mcp-imagemagick/ ├── src/ │ ├── main.rs # Entry point with panic handler │ ├── server.rs # MCP server implementation │ ├── transport.rs # Synchronous stdio transport │ ├── handlers/ # Request handlers │ │ └── image.rs # Image conversion tools │ └── converters/ # Converter implementations │ ├── mod.rs # Auto-converter with fallback │ ├── imagemagick.rs # ImageMagick converter │ └── darktable.rs # darktable converter ├── docs/ # Additional documentation └── test_mcp.py # Integration test
MIT License - see LICENSE file for details.
This project inherits security considerations from ImageMagick. Please be aware:
- ImageMagick processes many file formats, some of which can contain malicious payloads
- Always process images from trusted sourceswhen possible
- Check your ImageMagick security policy(policy.xml) is properly configured
- Consider running with limited permissionsin production environments
For detailed security information, seeSECURITY.mdandImageMagick's Security Policy.
This project uses the following third-party software:
- Copyright © 1999 ImageMagick Studio LLC
- Licensed under the ImageMagick License
- License:https://imagemagick.org/script/license.php
- Used for image conversion operations
- Copyright © darktable developers
- Licensed under GPL 3.0 or later
- License:https://github.com/darktable-org/darktable/blob/master/LICENSE
- Used for RAW image processing
Note: This project calls these tools via their command-line interfaces and does not distribute or incorporate their source code.
Chia Health MCP Server — Patient workflow integration for a licensed US telehealth platform. Browse GLP-1 medications (semaglutide, tirzepatide), peptide therapies (sermorelin, NAD+, glutathione), and longevity treatments. Check eligibility, complete intake, sign consents, and manage treatment plans. 30 tools, HIPAA-compliant. All prescriptions evaluated by licensed US healthcare providers and delivered from FDA-regulated pharmacies across 50 states + DC.
Broker + MCP server for last-bidder-wins games on Solana — agents register, auto-fund a Privy wallet, and bid via streamable HTTP
AI-powered no-code app builder with 17 MCP tools — create projects, generate pages from natural language, AI text/image generation (GPT, Claude, Gemini, 14+ models), page CRUD, workflow execution, publish & version control. SSE transport, API key auth.
An mcp server for your food ordering needs.
Agent-to-Agent handoff certification for multi-agent systems — validates context preservation, verifies agent capabilities before handoff, logs transfer chains, and ensures no data loss in agent orchestration.
Unified MCP & skill management gateway with progressive disclosure. Manages multiple MCP servers as Agent Apps, loading tool schemas on demand for 99% context token savings. Shared across Claude Code, Codex, OpenCode and more.
A collection of Model Context Protocol (MCP) servers for various tasks and integrations, supporting both Python and Node.js environments.
Open-souSecurely feeds real security refreshed rules into Cursor, Claude Code, and Windsurf — zero config, no API key.
Health intelligence MCP — access biomarkers, biological age, and personalized longevity action plans from your Aniva profile.
Real-time stock heatmaps and investment tools delivered as interactive React components.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





