Skip to main content
Glama

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.

imagic-mcp MCP server

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.png to WebP"

  • "Resize /home/user/logo.png to a favicon"

  • "Convert and resize /tmp/banner.jpg to an Instagram square"

  • "Resize /tmp/photo.jpg to 800×600, keep aspect ratio"

  • "Merge /tmp/left.png and /tmp/right.png side 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.png in a grid"

Tool Reference

Tool

Key Parameters

Description

convert_image

input_path, output_format, quality, output_path

Convert an image to a different format

resize_image

input_path, width, height, preset, lock_aspect_ratio, output_path

Resize an image to custom dimensions or a named preset

convert_and_resize

All parameters from both tools above

Convert and resize in a single operation

merge_images

input_paths, layout, gap, background, output_path

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

input_paths

string[] (min 2)

Ordered list of absolute image paths

layout

horizontal | vertical | grid

horizontal

How to arrange the images

gap

integer ≥ 0

0

Gap in pixels between images

background

hex string

#ffffff

Canvas/gap fill color

output_path

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

instagram-square

1080 × 1080

instagram-portrait

1080 × 1350

instagram-landscape

1080 × 566

twitter-post

1200 × 675

twitter-header

1500 × 500

full-hd

1920 × 1080

4k

3840 × 2160

youtube-thumbnail

1280 × 720

favicon

32 × 32

Local Development & Testing

Use these steps to test the server from source before publishing to npm.

1. Install dependencies

cd mcp
npm install

2. Smoke-test the server starts

node index.js

It 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.js

You 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 link

Then 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 publish

For subsequent updates, bump the version field in package.json then run npm publish again.

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository and create a branch from main

  2. Install dependencies: npm install

  3. Make your changes in index.js

  4. Test locally (see Local Development & Testing)

  5. 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 tools
convert_and_resizeB

Convert an image to a new format and resize it in a single operation.

ParametersJSON Schema
NameRequiredDescriptionDefault
input_pathYesAbsolute path to the source image file
output_formatYesTarget format
qualityNoJPEG/WebP quality (1-100, default 90)
widthNoTarget width in pixels
heightNoTarget height in pixels
presetNoNamed size preset (overrides width/height)
lock_aspect_ratioNoKeep aspect ratio (default true)
output_pathNoWhere to save the output

TDQS

B3.4/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
input_pathYesAbsolute path to the source image file
output_formatYesTarget format
qualityNoJPEG/WebP quality (1-100, default 90)
output_pathNoWhere to save the output (defaults to same directory as input)

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
input_pathsYesOrdered list of absolute paths to the images to merge (minimum 2)
layoutNoArrangement: horizontal (side by side), vertical (stacked), or grid (auto columns)horizontal
gapNoGap in pixels between images (default 0)
backgroundNoBackground/gap fill color as hex (default #ffffff)#ffffff
output_pathYesAbsolute path for the output file (format inferred from extension)

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
folder_pathYesAbsolute path to the folder containing images
operationYesOperation to apply to every image
output_formatNoTarget format (required for convert / convert_and_resize)
qualityNoJPEG/WebP quality (1-100, default 90)
widthNoTarget width in pixels
heightNoTarget height in pixels
presetNoNamed size preset (overrides width/height)
lock_aspect_ratioNoKeep aspect ratio when resizing (default true)
output_folderNoWhere to save the processed files (defaults to the same folder as input)

TDQS

B3.4/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
input_pathYesAbsolute path to the source image file
widthNoTarget width in pixels
heightNoTarget height in pixels
presetNoNamed size preset (overrides width/height)
lock_aspect_ratioNoKeep aspect ratio (default true)
output_pathNoWhere to save the output (defaults to same directory as input)

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

  1. 5 tool updatesv1.1.1
    • First observedconvert_and_resize
    • First observedconvert_image
    • First observedmerge_images
    • First observedprocess_folder
    • First observedresize_image

TDQS

A3.5/5.0

Scored across 5 tools

Disambiguation3/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers