Help us shape the future of Go! Take the 2026 Go Developer Survey

imagormcp

package module
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 1 Imported by: 0

README

imagor-mcp

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

An agent writes a layout; the layout compiles to one imagor URL — pasted in a browser, stored, served from a CDN, put in a page.

Fourteen cards, each one a single imagor URL

Every card above is one imagor URL, composed by an agent from a brief. All fourteen, with the URL each resolves to, and a prompt to ask for it »

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. Everything else it takes is in Configuration.

VS Code keys its servers under servers and Codex reads TOML, so the block above fits neither. Every client's file path, and the shape each one wants, is in docs/clients.md.

4. Ask it for something. Name a recipe from the cookbook — 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 on the official MCP Registry, where a client can install it by name, and as ghcr.io/cshum/imagor-mcp in a container — which needs a different base URL, in Configuration. Windows binaries are on the releases page.

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

What an agent does with it

A brief like this one:

Build a 1200×630 launch card: a deep green ground, a serif headline, a product photo on the right, and the price below it. Show me what it looks like.

It writes the template, renders it, looks at the image, and revises. Given a brief with no layout, no positions and no sizes, an agent designed three distinct banners across three runs — hierarchy, colour, type pairing, invented copy — and zoomed into regions to read the small text it had drawn.

What this adds

The template layer runs inside your imagor. Rendering stays in the instance you run, at the throughput it already has.

A layout compiles to a URL; a hosted template API returns an image. Those bill and transfer the bytes on every render. imagor serves a URL instead, which any browser, proxy or CDN can cache — so the bytes are transferred once.

Tools

Each tool maps onto a concept in the imagor path grammar. The list, and what each is for, is in docs/tools.md.

The cookbook

cookbook/ holds fourteen ready-made layouts — OG cards, a product grid, a profile card, quotes, testimonials, an event, a comparison table, a price ladder. Take the closest, change the values, render it.

Every card, and the path it resolves to » The template is not on that page: a recipe travels in the server and arrives by name.

Every recipe renders at three canvas sizes on every commit, and the contact sheet above is generated by that same job, so both stay current.

Going deeper

The rest of the documentation:

Licence

MIT.

Documentation

Overview

Package imagormcp exists to carry the skill into the binary.

The skill is the part of using this server that does not fit in a tool description: the order a path is written in, how overlays and text are placed, and a working method. A client that only reads tools/list never sees it, so it is embedded here and served as a resource, and the server's instructions point at it.

Index

Constants

This section is empty.

Variables

View Source
var Cookbook embed.FS

Cookbook is the recipe set. A recipe is the agent's intermediate channel - it is what gets handed to render_template, not what a reader of the cookbook page wants - so the page carries the name and what the card is for, and the template arrives by name.

View Source
var CookbookIndex string
View Source
var Skill string

The skill travels with the server: a client that reads only the tool list never sees a file, and these carry what a tool description cannot.

View Source
var Sources string

Sources is the fixture table. It is separate from the skill because every agent that touches this server reads the skill, while only an agent choosing what to put in an image field wants sixteen rows of names and dimensions.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
genfilters command
Command genfilters generates the imagor filter catalogue used by imagor-mcp to reject filter names and argument counts that imagor would silently ignore.
Command genfilters generates the imagor filter catalogue used by imagor-mcp to reject filter names and argument counts that imagor would silently ignore.
imagor-mcp command
Command imagor-mcp is an MCP server that exposes imagor's image pipeline to AI agents as typed, validated tools.
Command imagor-mcp is an MCP server that exposes imagor's image pipeline to AI agents as typed, validated tools.
imagor-template command
Command imagor-template turns a layout into an imagor URL, and back.
Command imagor-template turns a layout into an imagor URL, and back.
internal
filters
Package filters exposes the imagor filter catalogue so that imagor-mcp can reject filter names and argument counts imagor would silently ignore.
Package filters exposes the imagor filter catalogue so that imagor-mcp can reject filter names and argument counts imagor would silently ignore.
pathgen
Package pathgen builds and validates imagor paths from typed inputs.
Package pathgen builds and validates imagor paths from typed inputs.
tools
Package tools defines the MCP tool surface for imagor-mcp.
Package tools defines the MCP tool surface for imagor-mcp.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL