Skip to main content
Glama
Imagor MCP

Imagor MCP

Official

Imagor MCP

Test Status Docs Imagor MCP rated A on Glama

An MCP server and a skill that add a template layer to imagor.

An agent writes a layout: OG cards, product grids, quotes, testimonials. It compiles to one imagor URL, rendered by the imagor you already run.

Cards, each one a single imagor URL

See the recipes »

Quick start

1. Run an imagor.

docker run --rm -p 8000:8000 shumc/imagor -imagor-unsafe

Leave it running, and use a second terminal for the rest.

Unsafe mode is for trying things out. Production runs on IMAGOR_SECRET. See imagor's security docs.

2. Install the MCP server.

brew trust cshum/tap && brew install imagor-mcp

3. Point a client at it.

your client

what to do

VS Code

add it from here — one click

Claude Desktop

open imagor-mcp.mcpb — one click

Cursor, Claude Code, Windsurf

add the block below to its config file

Codex

the same values in TOML, at ~/.codex/config.toml

{
  "mcpServers": {
    "imagor": {
      "command": "imagor-mcp",
      "env": { "IMAGOR_UNSAFE": "1", "IMAGOR_BASE_URL": "http://localhost:8000" }
    }
  }
}

Those two settings have to match what you started in step 1: IMAGOR_UNSAFE puts this server in the same mode, and IMAGOR_BASE_URL is where imagor is.

VS Code keys its servers under servers and Codex reads TOML, so the block above fits neither. Every client's config file is in Setup.

4. Ask it for something. See the recipes — each one carries a prompt to paste, or describe the image you want. The agent composes through the tools: it writes the layout, renders it, looks at the result, and hands you back the url. Neither of you needs imagor's path syntax: the tools build the path, and refuse one that cannot work.

That is the whole install. It is also in the official MCP Registry as io.github.cshum/imagor-mcp, which some clients install by name, and as ghcr.io/cshum/imagor-mcp in a container, which needs a different base URL, in Setup. Windows binaries are on the releases page.

Before anything is public, read Security: what this server is trusted with, and what it refuses.

Related MCP server: Media Toolkit MCP Server

Going deeper

  • Setup — every setting, the config file each client reads, and what to do before it is public.

  • Reference — every tool the server serves, the layout format, and the skill.

  • Cookbook — the ready-made layouts, and the url each one resolves to.

  • Contributing — building, testing, and the CLI.

Licence

MIT

Available Tools

10 tools
build_imagor_urlA

Build a signed imagor image URL from typed transformation parameters. Requires IMAGOR_SECRET to be configured. The composition is validated before the URL is returned, so an invalid combination is refused rather than emitted. Read get_imagor_skill before composing anything, and call list_imagor_filters for each filter's signature, description and accepted argument forms, which are generated from imagor's own filter reference. Build and verify in a loop: a request returns 200 whether or not a filter did anything, so pass the same parameters to verify_imagor_url rather than assuming it worked. For a composed layout rendered at a canvas size, use render_template.

Inputs: image (required), meta, trim, smart, +19 more. Returns: url, mode, note, path, +3 more

describe_imagorA

Describe the imagor path grammar this server targets, including the parameters reflected from imagor's own path type and the current signing mode.

Returns: mode, base_url, truncate, setup_note, +9 more

fit_textA

Find the largest font size at which a string still fits a box. imagor wraps text but never shrinks it, so a template that suits a short title silently overflows on a longer one. This renders the text on a transparent canvas at candidate sizes, measures the ink, and searches for the largest size that fits. Pass the returned font argument straight to text(). Requires IMAGOR_BASE_URL.

Inputs: font (required), text (required), max_size (required), box_width (required), +3 more. Returns: fits, font, note, size, +4 more

get_cookbook_recipeA

Fetch a ready-made layout by name: canvas, slots and values, ready for render_template. Call it with no name first to get the list - what each layout is for, its size, and which values it takes - then call it again with the one you want. Prefer starting from a recipe over composing from nothing: they encode spacing and type sizes that took iteration to get right.

Inputs: name. Returns: name, note, index, render, +1 more

get_imagor_skillA

Read this before composing anything. The order a path is written in, how overlays and text are placed, what the resize modes actually do, and the things a 200 response will not tell you. Called with no section it returns the outline; call again with a section name to read the part you need.

Inputs: section. Returns: note, skill, section, sections

list_imagor_filtersA

List the imagor filters this server accepts, with each filter's signature, description and accepted argument forms, generated from imagor's own filter reference. imagor ignores unrecognised filters and wrong argument counts silently — the request returns 200 with the image unchanged — so use this to pick filters that exist instead of guessing names.

Inputs: name_contains. Returns: note, count, filters, imagor_version

parse_templateA

Read an imagor path back into a template, so one you already have can be edited rather than retyped. This is the inverse of render_template and the two are meant to be used together: render, look, adjust the JSON, render again. Read get_imagor_skill before composing anything. Note that the geometry comes back absolute - a path records the numbers a template resolved to, not the forms it was written in. To check a path without converting it, use validate_imagor_path.

Inputs: path (required). Returns: note, slots, values, background, +2 more

render_templateA

Render a layout at a given canvas size. Geometry is written the way imagor writes it, so slots can be positioned and sized relative to the canvas with full and full-N, and one template then serves several sizes. A text slot given a height is fitted with fit_text against the box its geometry resolves to, because a font size is absolute and would otherwise be relatively smaller on a larger canvas. Values fill {{placeholders}}. Returns the path, the URL, and what each slot resolved to. Verify it before handing it over - imagor answers 200 with the image unchanged when a filter does not apply, so a render that reports success is not a render that is right. For one image with typed parameters and no layout, use build_imagor_url.

Inputs: slots (required), canvas_width (required), canvas_height (required), values, +1 more. Returns: url, mode, note, path, +3 more

validate_imagor_pathA

Parse an imagor path and report whether it round-trips unchanged, plus a short summary of the transformation it describes. Use this to check a path before serving it. To convert an existing path into an editable layout, use parse_template.

Inputs: path (required). Returns: path, valid, stable, rebuilt, +3 more

verify_imagor_urlA

Fetch the result for a composition from the running imagor and report what it did with each filter: applied, declined, or not reported, plus the dimensions the server reported. Answers whether a composition actually does what it says, which the build tools cannot know on their own. Takes the same typed parameters as build_imagor_url, not a URL. Requires IMAGOR_BASE_URL. A server that does not report filter outcomes returns unknown for every filter and verified: false, which means the result is unknown rather than wrong. Compare the reported dimensions and outcomes against what you intended, and fetch the result to compare it against your reference: a composition can succeed and still be wrong. The rendered result is attached as an image by default, so you can see what you built rather than only reading what the server did with it - use it to check placement, cropping and text against your reference, and iterate until it matches. The image is scaled down, so it shows the layout and not fine detail. Pass preview: false to get the report alone when you do not need to look.

Inputs: image (required), meta, trim, smart, +22 more. Returns: url, mode, note, path, +11 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, and descriptions actively cross-reference each other to guide selection (e.g., build_imagor_url vs render_template, parse_template vs validate_imagor_path). However, a few pairs still have overlapping surface areas—both build_imagor_url and render_template produce URLs, and both parse_template and validate_imagor_path parse paths—so an agent could momentarily confuse them, even though the descriptions resolve it.

    Naming Consistency4/5

    All names use snake_case and follow a verb_noun pattern consistently. The only noticeable deviation is that some nouns include the 'imagor' prefix (build_imagor_url, describe_imagor, validate_imagor_path) while others do not (parse_template, render_template, fit_text), making the pattern slightly less predictable.

    Tool Count5/5

    Ten tools is well within the ideal range and each seems to earn its place. Core operations (build, verify, render, parse, validate, fit_text) are complemented by focused reference tools (skill, filters, grammar, recipes) without obvious bloat or redundancy.

    Completeness5/5

    The surface covers the full lifecycle for imagor URL and template work: guidance, filter reference, recipe retrieval, template rendering, path parsing, URL building, verification, and text fitting. There are no obvious dead ends for composing, validating, or iterating on imagor paths and layouts.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers