imagic-mcp
imagic-mcp is a local image processing MCP server that lets you manipulate images directly from AI assistants like Claude Desktop and Cursor — no uploads required, no internet needed.
Convert images: Transform between PNG, JPEG, GIF, WebP, and ICO formats, with optional quality control (1–100) for JPEG/WebP.
Resize images: Resize to custom pixel dimensions or named presets (e.g.,
favicon,instagram-square,full-hd,4k,youtube-thumbnail), with optional aspect ratio preservation.Convert and resize in one step: Combine format conversion and resizing into a single operation.
Merge multiple images: Combine 2+ images into one using horizontal, vertical, or grid layouts, with configurable gap size and background color.
Batch process a folder: Apply convert, resize, or convert-and-resize operations to all image files in a directory at once, with optional custom output folder — non-image files are automatically skipped.
All processing runs locally on your machine, so images never leave your device.
Provides specialized presets for converting and resizing images into standard Instagram formats, including square, portrait, and landscape dimensions.
Supports converting images to the JPEG format with adjustable quality settings for optimized file sizes.
Includes a built-in preset for resizing images to the standard YouTube thumbnail dimensions of 1280×720.
Imagic MCP Server
Convert, resize, and merge images directly from Claude Desktop, Cursor, and other MCP-compatible AI assistants — locally, with no uploads. Part of ImagicSave.
Requirements
Node.js 18 or later (includes npm)
Related MCP server: 🪄 ImageSorcery MCP
Installation
No clone needed. The package is distributed via npm. Configure your AI tool to run it with npx and it will be fetched automatically on first use.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"imagic": {
"command": "npx",
"args": ["-y", "imagic-mcp"]
}
}
}Restart Claude Desktop. The Imagic tools will appear automatically.
Cursor
Create or edit .cursor/mcp.json in your project (or ~/.cursor/mcp.json for global):
{
"mcpServers": {
"imagic": {
"command": "npx",
"args": ["-y", "imagic-mcp"]
}
}
}Usage Examples
Once configured, just ask your AI assistant:
"Convert
/tmp/photo.pngto WebP""Resize
/home/user/logo.pngto a favicon""Convert and resize
/tmp/banner.jpgto an Instagram square""Resize
/tmp/photo.jpgto 800×600, keep aspect ratio""Merge
/tmp/left.pngand/tmp/right.pngside by side and save to/tmp/merged.png""Stack these three images vertically with a 20px gap:
/tmp/a.jpg,/tmp/b.jpg,/tmp/c.jpg""Arrange
/tmp/img1.png,/tmp/img2.png,/tmp/img3.png,/tmp/img4.pngin a grid"
Tool Reference
Tool | Key Parameters | Description |
|
| Convert an image to a different format |
|
| Resize an image to custom dimensions or a named preset |
| All parameters from both tools above | Convert and resize in a single operation |
|
| Merge multiple images into one |
All parameters except input_path / input_paths and output_format / output_path are optional. Output for convert/resize defaults to the same directory as the input with a new extension.
merge_images details
Parameter | Type | Default | Description |
| string[] (min 2) | — | Ordered list of absolute image paths |
|
|
| How to arrange the images |
| integer ≥ 0 |
| Gap in pixels between images |
| hex string |
| Canvas/gap fill color |
| string | — | Absolute output path (format inferred from extension) |
Layouts:
horizontal — images placed side by side, centered vertically
vertical — images stacked top to bottom, centered horizontally
grid — auto columns (
ceil(√n)), each image centered in equal-size cells
Supported Formats
png, jpeg, gif, webp, ico
ICO encoding is built in — no extra dependencies required.
Presets
Preset Name | Dimensions |
| 1080 × 1080 |
| 1080 × 1350 |
| 1080 × 566 |
| 1200 × 675 |
| 1500 × 500 |
| 1920 × 1080 |
| 3840 × 2160 |
| 1280 × 720 |
| 32 × 32 |
Local Development & Testing
Use these steps to test the server from source before publishing to npm.
1. Install dependencies
cd mcp
npm install2. Smoke-test the server starts
node index.jsIt should block on stdin with no output — that's correct. Press Ctrl+C to exit.
3. Send a raw JSON-RPC call
Pipe a request directly to verify a tool works end-to-end:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"convert_image","arguments":{"input_path":"/tmp/test.png","output_format":"webp"}}}' \
| node index.jsYou should see a JSON response with "success": true and the output path.
4. Point Claude Desktop or Cursor at the local source
Instead of npx, use node with an absolute path in your config:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"imagic": {
"command": "node",
"args": ["/absolute/path/to/imagic/mcp/index.js"]
}
}
}Cursor (.cursor/mcp.json):
{
"mcpServers": {
"imagic": {
"command": "node",
"args": ["/Users/pike6/work/project/website/imagic/mcp/index.js"]
}
}
}Restart Claude Desktop (or reload the Cursor window) after editing the config. Ask your AI assistant to convert or resize an image — it will call the local file directly.
5. Test with npm link (optional)
npm link makes the imagic-mcp binary available globally from your local source, which is the closest simulation to the published npx flow:
cd mcp
npm linkThen update your config to use imagic-mcp (same as the published form):
{ "command": "imagic-mcp", "args": [] }Run npm unlink -g imagic-mcp when you're done testing.
Privacy
Everything runs locally on your machine via stdio. Your images never leave your device and no internet connection is required for image processing.
For Repo Owners: Publishing to npm
Run once inside this directory after creating a free account at npmjs.com:
npm publishFor subsequent updates, bump the version field in package.json then run npm publish again.
Contributing
Contributions are welcome! Here's how to get started:
Fork the repository and create a branch from
mainInstall dependencies:
npm installMake your changes in
index.jsTest locally (see Local Development & Testing)
Open a pull request with a clear description of what you changed and why
Good areas to contribute:
New resize presets
Additional output formats
Performance improvements for large batches
Bug fixes
Please keep pull requests focused — one feature or fix per PR. For larger changes, open an issue first to discuss the approach.
License
MIT © ImagicSave
Available Tools
5 toolsconvert_and_resizeB
Convert an image to a new format and resize it in a single operation.
| Name | Required | Description | Default |
|---|---|---|---|
| input_path | Yes | Absolute path to the source image file | |
| output_format | Yes | Target format | |
| quality | No | JPEG/WebP quality (1-100, default 90) | |
| width | No | Target width in pixels | |
| height | No | Target height in pixels | |
| preset | No | Named size preset (overrides width/height) | |
| lock_aspect_ratio | No | Keep aspect ratio (default true) | |
| output_path | No | Where to save the output |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool performs conversion and resizing but doesn't mention whether it overwrites existing files, what happens with aspect ratio conflicts, whether it preserves metadata, or any error conditions. This is inadequate for a mutation tool with 8 parameters.
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 a single, efficient sentence that immediately conveys the core functionality without any wasted words. It's perfectly front-loaded with the essential 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?
For a complex mutation tool with 8 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, error handling, file system behavior, or how the conversion/resize operations interact. The description should provide more context about this non-trivial operation.
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?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema, maintaining the baseline score of 3 for high schema coverage.
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 with specific verbs ('convert' and 'resize') and resource ('image'), and distinguishes it from siblings by emphasizing it's a 'single operation' that combines both functions, unlike separate convert_image and resize_image tools.
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 implies usage context ('in a single operation') suggesting efficiency benefits over using separate tools, but doesn't explicitly state when to choose this tool versus alternatives like convert_image or resize_image, nor does it mention any prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
convert_imageC
Convert an image to a different format (PNG, JPEG, GIF, WebP, or ICO).
| Name | Required | Description | Default |
|---|---|---|---|
| input_path | Yes | Absolute path to the source image file | |
| output_format | Yes | Target format | |
| quality | No | JPEG/WebP quality (1-100, default 90) | |
| output_path | No | Where to save the output (defaults to same directory as input) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions format conversion but doesn't address important behavioral aspects like whether the original file is preserved, what happens with unsupported formats, error handling, or performance characteristics. The description is minimal and lacks operational context.
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 extremely concise - a single sentence that directly states the tool's function. There's zero waste or unnecessary elaboration. It's front-loaded with the core purpose and efficiently lists the supported formats.
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?
For a tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, how errors are handled, or provide context about the conversion process. The agent would need to guess about important operational details.
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?
Schema description coverage is 100%, providing good documentation for all parameters. The description adds minimal value beyond the schema - it lists the format options but doesn't explain tradeoffs between formats or when to use quality parameter. Baseline 3 is appropriate when schema does the heavy lifting.
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: converting images between specified formats (PNG, JPEG, GIF, WebP, ICO). It uses a specific verb ('convert') and resource ('image'), but doesn't explicitly differentiate from sibling tools like 'convert_and_resize' or 'resize_image' which suggests overlapping functionality.
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?
No guidance is provided on when to use this tool versus alternatives like 'convert_and_resize' or 'resize_image'. The description only states what the tool does, not when it's appropriate or when other tools might be better suited.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
merge_imagesC
Merge multiple images into a single image by arranging them horizontally, vertically, or in a grid.
| Name | Required | Description | Default |
|---|---|---|---|
| input_paths | Yes | Ordered list of absolute paths to the images to merge (minimum 2) | |
| layout | No | Arrangement: horizontal (side by side), vertical (stacked), or grid (auto columns) | horizontal |
| gap | No | Gap in pixels between images (default 0) | |
| background | No | Background/gap fill color as hex (default #ffffff) | #ffffff |
| output_path | Yes | Absolute path for the output file (format inferred from extension) |
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 merging action and layout options but omits critical details: whether the operation is destructive to input files, authentication requirements, rate limits, error handling, or output specifics (e.g., image quality, format support). For a mutation tool with zero annotation coverage, this is a significant gap.
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 a single, efficient sentence that front-loads the core functionality ('Merge multiple images into a single image') and specifies the arrangement methods. There is zero waste, and every word earns its place by clarifying the tool's purpose without redundancy.
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 (5 parameters, mutation operation) and lack of annotations or output schema, the description is incomplete. It fails to address behavioral aspects like file handling, error cases, or output format details, leaving gaps that could hinder an AI agent's correct invocation. For a tool with no structured safety or output information, more context is needed.
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?
Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond what the schema provides—it mentions layout options but not details like 'grid' behavior or path requirements. With high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate but also does not detract.
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: 'Merge multiple images into a single image by arranging them horizontally, vertically, or in a grid.' It specifies the verb ('merge'), resource ('multiple images'), and method ('arranging them'), but does not explicitly differentiate from sibling tools like 'convert_and_resize' or 'resize_image', which focus on transformation rather than composition.
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 no guidance on when to use this tool versus alternatives. It lacks context about prerequisites (e.g., image formats supported), exclusions, or comparisons to sibling tools like 'process_folder' for batch operations. Usage is implied only by the tool's name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
process_folderB
Apply a convert, resize, or convert-and-resize operation to all image files in a folder. Non-image files are automatically skipped.
| Name | Required | Description | Default |
|---|---|---|---|
| folder_path | Yes | Absolute path to the folder containing images | |
| operation | Yes | Operation to apply to every image | |
| output_format | No | Target format (required for convert / convert_and_resize) | |
| quality | No | JPEG/WebP quality (1-100, default 90) | |
| width | No | Target width in pixels | |
| height | No | Target height in pixels | |
| preset | No | Named size preset (overrides width/height) | |
| lock_aspect_ratio | No | Keep aspect ratio when resizing (default true) | |
| output_folder | No | Where to save the processed files (defaults to the same folder as input) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but lacks critical behavioral details: it doesn't disclose whether the operation is destructive (e.g., overwrites files), what permissions or authentication are needed, rate limits, error handling, or output behavior. The description only covers the basic operation and file filtering, leaving significant gaps for a tool with 9 parameters and batch processing.
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 a single, efficient sentence that front-loads the core purpose and includes a useful clarification about non-image files. Every word earns its place with no redundancy or fluff, making it easy to parse quickly.
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 (9 parameters, batch processing, no output schema, and no annotations), the description is incomplete. It lacks details on behavioral traits (e.g., destructiveness, error handling), output expectations, and how it differs from sibling tools. For a multi-operation batch tool, more context is needed to guide effective use.
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?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema by implying the tool processes all images in a folder and skips non-images, but doesn't provide additional context on parameter interactions (e.g., how preset overrides width/height) or usage nuances. Baseline 3 is appropriate as the schema does the heavy lifting.
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 specific action ('Apply a convert, resize, or convert-and-resize operation') and target resource ('to all image files in a folder'), with explicit differentiation from siblings by noting it processes entire folders rather than individual images like convert_image or resize_image. The mention that 'Non-image files are automatically skipped' further clarifies scope.
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 implies usage context by specifying it operates on folders and skips non-image files, but does not explicitly state when to use this tool versus alternatives like convert_image or resize_image for single files, or how it relates to convert_and_resize (which might be a sibling tool for single images). No explicit exclusions or prerequisites are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resize_imageA
Resize an image to custom dimensions or a named preset. Preserves the original format.
| Name | Required | Description | Default |
|---|---|---|---|
| input_path | Yes | Absolute path to the source image file | |
| width | No | Target width in pixels | |
| height | No | Target height in pixels | |
| preset | No | Named size preset (overrides width/height) | |
| lock_aspect_ratio | No | Keep aspect ratio (default true) | |
| output_path | No | Where to save the output (defaults to same directory as input) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the tool 'preserves the original format', which is a useful behavioral trait, but fails to describe other critical aspects such as whether it modifies the original file, handles errors, supports specific image formats, or has performance implications. For a mutation tool with zero annotation coverage, this leaves significant gaps.
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 a single, efficient sentence that front-loads the core functionality ('resize an image') and includes a key behavioral note ('preserves the original format'). There is zero waste, and every word earns its place by adding value beyond the schema.
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 moderate complexity (6 parameters, mutation operation) and lack of annotations or output schema, the description is incomplete. It covers the basic purpose and format preservation but omits details on error handling, supported inputs, output behavior, and performance. It's adequate as a minimum viable description but has clear gaps for effective agent use.
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?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema by hinting at the 'preset' parameter's purpose ('named preset'), but doesn't provide additional syntax, format details, or usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.
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 with specific verbs ('resize') and resources ('image'), and distinguishes it from siblings by specifying it preserves the original format, unlike 'convert_and_resize' or 'convert_image' which likely change formats. It explicitly mentions both custom dimensions and named presets.
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 implies usage by mentioning 'custom dimensions or a named preset', but provides no explicit guidance on when to use this tool versus alternatives like 'convert_and_resize' or 'process_folder'. It doesn't specify prerequisites or exclusions, leaving the agent to infer context from sibling names alone.
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.
5 tool updates
v1.1.1- First observed
convert_and_resize - First observed
convert_image - First observed
merge_images - First observed
process_folder - First observed
resize_image
TDQS
Scored across 5 tools
The tools have some clear distinctions but also notable overlap. Convert_and_resize and resize_image both handle resizing, while convert_and_resize and convert_image both handle format conversion, creating potential confusion about when to use each. However, the descriptions help clarify that convert_and_resize combines both operations, and process_folder is distinct as a batch processor.
All tool names follow a consistent snake_case pattern with clear verb_noun or verb_noun_noun structures (e.g., convert_and_resize, merge_images, process_folder). This predictability makes the set easy to scan and understand at a glance.
With 5 tools, this server is well-scoped for image processing tasks. Each tool serves a distinct purpose (conversion, resizing, merging, batch processing, and a combined operation), and the count feels appropriate without being overwhelming or insufficient for the domain.
The toolset covers core image operations well, including format conversion, resizing, merging, and batch processing. A minor gap is the lack of tools for more advanced manipulations like cropping, filtering, or metadata editing, but the provided tools support common workflows effectively.
Maintenance
Related MCP Connectors
Convert images to PNG, JPEG, WebP, or AVIF through one public remote MCP tool.
Image processing over MCP: compress and split images, generate images and QR codes.
MCP server for Api2Pdf — generate PDFs & images from HTML, URLs or office files; merge, barcodes.
HTML-to-PDF MCP server — render pixel-faithful PDFs from HTML.
Related MCP Servers
- AlicenseCqualityCmaintenanceMCP server for local compression of various image formats18 npm34MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server providing tools for image processing operations155 PyPI330PythonMIT
- FlicenseNot gradedqualityDmaintenanceA powerful Model Context Protocol (MCP) server for image processing, designed to empower AI models with advanced image manipulation capabilities.-
- AlicenseAqualityCmaintenanceLocal image processing MCP server providing background removal, stock media search, resize, format conversion, and collage creation.5MIT