Design
jsximage.com
Creates and modifies JSXImage templates from JSX source code and returns shareable links.
ENDPOINT 1
https://jsximage.com/mcp
MCP server metadata
- Name
- jsximage
- Version
- 1.0.0
JSXImage turns a JSX template (React + Tailwind) into an image: Open Graph images, social cards, ads, certificates, badges, product and listing cards, charts, anything that can be laid out with HTML-like markup. This server has two tools: create_template and modify_template. You write the template as source code, call the tool, and get back a link. The link opens the template in the JSXImage playground (live preview, editing, saving, an API for rendering it). The link works for 7 days. ## How to work 1. Work out what the image is for and its size. Ask the user only if something essential is missing (what it says, which brand colors, which size). Otherwise choose sensible defaults and say what you chose. 2. Write the template (format below). Design it like a senior designer would, following "Design: no AI tells" below: one font family, one text size plus one big display size, hierarchy from weight, color and spacing, and nothing that looks generated. Fill every prop with realistic default text so the preview looks finished. 3. Call create_template with a short name and the full source code. 4. If the tool returns an error, read it, fix the code, and call again. Do not give the user a link that did not come from a successful call. 5. Give the user the link. Tell them: it expires in 7 days; opening it shows the template and a live preview; to keep it they sign in and press Save; props are the values the template accepts, so the same template can produce many images. ## Changing an existing template When the user gives you a JSXImage link (a URL containing `shared=` or `temp=`) and asks for changes, use modify_template, not create_template: 1. Call modify_template with only `url` (the link exactly as the user gave it). It returns the template's current source code. 2. Make the requested changes. Keep everything the user did not ask you to change: the layout, props, fonts and colors stay as they are. 3. Call modify_template again with the same `url` and the COMPLETE modified source in `code` (not a diff, not a fragment). If the user asks for a new input, add it to `export const props`. You get back a link to the modified copy. The original is never changed: shared links are read-only, and the result is a new link. Tell the user the new link is a copy, and that the original is untouched. If the link is not available (expired, sharing stopped, or deleted), say so and ask the user for a new link. ## Template format A template is one JavaScript file (TypeScript and JSX allowed) with three required exports: the props and their defaults, the component, and the options: ```jsx export const props = { title: "Ship dynamic images", author: "Ada Chen", }; type Props = typeof props; export default function Card(props: Props) { return ( <div class="flex h-full w-full flex-col justify-between bg-slate-900 p-16 text-white"> <span class="text-3xl text-slate-400">acme.dev</span> <h1 class="m-0 text-7xl font-bold leading-tight">{props.title}</h1> <span class="text-3xl">{props.author}</span> </div> ); } export const options = { width: 1200, height: 630, format: "png" }; ``` Rules, all of which matter: - `export const props` is REQUIRED: an object with every input the template takes and its default value (use `export const props = {}` if there are none). The tool rejects code without it. Put it above the component, then `type Props = typeof props;` so the type is written once. A request's props are laid over these defaults (shallow merge), so the component needs no defaults of its own. The preview and the first image use the defaults, so make them realistic. Props are usually text; keep them flat (strings, numbers, booleans, simple arrays of objects). - `export default` is a function component with ONE parameter, the merged props: `function Card(props: Props)`. Read values as `props.title`; do not list the names again in a destructured parameter. - `export const options` is required. `format` is required: "png", "jpeg" or "webp". Set `width` and `height` in pixels (1-4000). The root element should be `h-full w-full` so it fills the image. - Use the attribute `class`, NOT `className`. `className` is silently ignored and the image comes out unstyled. The tool rejects code that uses it. - No `import` or `require`. `React` is already available. Put helper functions, data and constants in the same file, above the component. - No hooks (`useState`, `useEffect`, `useRef`...), no events, no timers, no `window`/`document`, and no `fetch` in the component. The component runs once, as a pure function of its props, and produces a still image. To load data, use `export async function data` (see "Data-driven templates" below). Helper components are fine: they are plain functions (`function Stat({ label, value }) { return <div>...</div> }`). - The code runs in a sandbox with a short time limit and 8 MB of memory. Keep the layout light: no huge arrays, no heavy loops. - There is no `Intl` in the sandbox, and `toLocaleDateString`/`toLocaleString` ignore their options (you get "11/26/2026"). Format dates and numbers yourself: a month-name array with `getUTCMonth()`, and thousands separators with `String(n).replace(/\B(?=(\d{3})+(?!\d))/g, ",")`. ## Data-driven templates A template can load its own data before it renders: `export async function data(props)`. It receives the merged props, can `await fetch(url)`, and returns an object that is laid over the props before the component runs. Use it when the user wants an image that shows live data from an API (a repository's stars, a product's price, a package's version, the weather), so a request only sends an id such as `repo` or `handle`. ```jsx export const props = { repo: "react/react" }; export async function data(props) { const res = await fetch(`https://api.github.com/repos/${props.repo}`); if (!res.ok) throw new Error(`GitHub answered ${res.status} for ${props.repo}`); const repo = await res.json(); return { name: repo.name, description: repo.description ?? "", stars: repo.stargazers_count, }; } type Props = typeof props & Awaited<ReturnType<typeof data>>; export default function RepoCard(props: Props) { return ( <div class="flex h-full w-full flex-col justify-between bg-[#0d1117] p-16 text-white"> <h1 class="m-0 text-7xl font-bold">{props.name}</h1> <p class="m-0 text-3xl text-slate-400">{props.description}</p> <span class="text-4xl font-semibold">{props.stars} stars</span> </div> ); } export const options = { width: 1200, height: 630, format: "png" }; ``` Rules: - `fetch` exists only for `data`, and only for these hosts (https, public, no API key): - `api.github.com`: GitHub: repositories, releases, users. Example: `https://api.github.com/repos/react/react` - `raw.githubusercontent.com`: Files in a public GitHub repository, e.g. your own JSON data. Example: `https://raw.githubusercontent.com/<owner>/<repo>/main/data.json` - `*.myshopify.com`: Shopify storefronts: a product, or a store's products (use the shop's .myshopify.com address). Example: `https://<shop>.myshopify.com/products/<handle>.json` - `registry.npmjs.org`: npm packages: versions and metadata. Example: `https://registry.npmjs.org/react/latest` - `api.npmjs.org`: npm download counts. Example: `https://api.npmjs.org/downloads/point/last-week/react` - `pypi.org`: Python packages. Example: `https://pypi.org/pypi/requests/json` - `hacker-news.firebaseio.com`: Hacker News items and users. Example: `https://hacker-news.firebaseio.com/v0/item/8863.json` - `api.open-meteo.com`: Weather forecasts by latitude and longitude. Example: `https://api.open-meteo.com/v1/forecast?latitude=59.33&longitude=18.07¤t=temperature_2m` - `geocoding-api.open-meteo.com`: A place name to latitude and longitude, for the weather API. Example: `https://geocoding-api.open-meteo.com/v1/search?name=Stockholm&count=1` - `*.wikipedia.org`: Wikipedia page summaries, in any language. Example: `https://en.wikipedia.org/api/rest_v1/page/summary/Stockholm` - GET only: `fetch(url)` with no headers, body or credentials. It returns `ok`, `status`, `json()` and `text()`. At most 3 requests per render, 256 KB per response, 5 seconds each. Fetch several in parallel with `Promise.all`. - Any other host fails with "fetch: a template can only fetch from ...". If the user needs an API that isn't listed, say so; don't try to work around it. For their own data, a JSON file in a public GitHub repository (raw.githubusercontent.com) works. - The inputs (`repo`, `handle`, `shop`...) go in `export const props`; what `data` returns does not. The defaults MUST point at something that exists (a real public repository, a real product), because the tool runs `data` to check the template: a 404 fails the check. - Check `res.ok` and throw an Error with a clear message when it is false. Don't return placeholder values for a failed request. - Return only what the component uses, already shaped for display (cut long descriptions, round numbers, format prices). Give text fields a fallback (`?? ""`) because APIs return null. - Shopify: use the store's `<shop>.myshopify.com` address with `/products/<handle>.json` (one product, in `json.product`: `title`, `vendor`, `variants[0].price`, `images[0].src`). The store's own domain is not allowed. Prices are strings such as "49.00", without currency: make the currency a prop. - Images from the API (avatars, product photos) go in `<img src={props.image}>` like any image URL. - An image URL for a data-driven template is cached for 6 hours, so it follows the data. Tell the user that. ## Styling (Tailwind subset) Style with Tailwind classes in `class`. A practical subset of Tailwind works; it is not a full Tailwind build. - Works: inline `<svg>`, flexbox (`flex`, `flex-col`, `items-*`, `justify-*`, `gap-*`), grid, absolute positioning (`absolute`, `inset-0`, `top-*`), sizes (`w-*`, `h-*`, `h-full`, `w-[420px]`), spacing, borders, `rounded-*`, `overflow-hidden`, opacity, text size/weight/color/tracking/leading/alignment, background colors, shadows, arbitrary values like `bg-[#16130f]` and `text-[84px]`, inline `style={{ ... }}` objects, a `<style>` tag with plain CSS. - Does NOT work: `hover:`, `focus:` and other interactive variants, `dark:`, `@apply`/`@utility`. A still image has no hover or dark mode: choose colors directly. - A bare `<div>` is a block (as in a browser). Add `flex` to lay children out with flexbox. Use `flex` on any container that has more than one child you want arranged. - There is no CSS reset: a bare `<h1>`/`<p>` has a default margin, so add `m-0`. A `border-l-2` draws on every side unless you also set the others to `border-0`. - Gradients need a direction: `bg-linear-to-r from-... to-...` (the `from-`/`to-` classes alone paint nothing). - If a class does nothing, use an arbitrary value (`w-[420px]`) or an inline `style`. - Custom brand colors: define them once in `options.css` and use them as classes: ```jsx export const options = { width: 1200, height: 630, format: "png", css: { selector: ":root", style: { "--color-brand": "#ff4d4d", "--color-ink": "#16130f" } }, }; // now bg-brand, text-ink, border-brand work in class ``` ## Fonts and images - Geist (weights 300-800, Latin characters) is built in and is the default. System fonts do not exist. - Another font: use a Google Font by name in `options.fonts` and use it with `fontFamily`. `weight` defaults to 400 and must be one the font has (100-900); `style` is "normal" or "italic"; `subset` defaults to "latin": ```jsx export const options = { width: 1200, height: 630, format: "png", fonts: [ { googleFont: "Fraunces", weight: 700 }, { googleFont: "Inter", weight: 400 }, ], }; // <h1 style={{ fontFamily: "Fraunces" }}>...</h1> ``` - Once `options.fonts` lists a font, the first one becomes the default for all text. To keep Geist for body text, set `style={{ fontFamily: "Geist" }}` on the root and use the other font only where a style names it. - `options` can also be a function of the props. Give templates a `googleFont` prop (default "Geist", built in), plus `bgColor` and `fgColor` when the design has a flat background, so one template fits any brand: `export function options(props: Props) { const font = props.googleFont; return { width: 1200, height: 630, format: "png", fonts: font && font !== "Geist" ? [{ googleFont: font, weight: 400 }, { googleFont: font, weight: 700 }] : [] }; }`, with `style={{ fontFamily: props.googleFont || "Geist", backgroundColor: props.bgColor, color: props.fgColor }}` on the root. Load only weights 400 and 700 (nearly every Google Font has them); secondary text is the text color with `opacity`, so it follows fgColor. The family name is the one on fonts.google.com, for example "Inter", "Open Sans", "JetBrains Mono", "Playfair Display". A font that isn't on Google Fonts can be given as a direct URL to a .ttf, .otf, .woff or .woff2 file: `{ name: "MyFont", url: "https://..." }`. The built-in font draws Latin letters with accents (é ü ñ å ø), digits, quotes, bullets and dashes (• · — – …), currency (€ £ ¥ $), and © ® ™ ° × ÷ ± ½ ↑ ↓. - Emoji work automatically: they are drawn as images (Twemoji), so 🎉 🚀 ❤️ 👍🏽 🇸🇪 are fine in text. Do not add anything for them. - Other scripts need a font: Japanese, Chinese, Korean, Arabic and so on show as empty boxes in the built-in font. List a Google Font that has them in `options.fonts`; it is then used for any glyph the default lacks, with no `fontFamily` needed. Japanese `{ googleFont: "Noto Sans JP", weight: 500, subset: "japanese" }`, Simplified Chinese `{ googleFont: "Noto Sans SC", weight: 500, subset: "chinese-simplified" }`, Korean `{ googleFont: "Noto Sans KR", weight: 500, subset: "korean" }`, Arabic (shaped right to left) `{ googleFont: "Noto Sans Arabic", weight: 500, subset: "arabic" }`. CJK fonts are about 1 MB, so only add one when the text needs it. A registered font is used for any glyph it contains, including Latin letters, so the look of other text can change: say so to the user. - Symbols: ✓ ✔ ★ ♥ need `{ googleFont: "Noto Sans Symbols 2", subset: "symbols" }`. → ← ≠ ≈ √ have no font that works: draw arrows and checkmarks with an inline `<svg>` instead. - Images: `<img src="https://..." class="h-16 w-16" />` with an absolute, public URL and an explicit size. For a full-bleed photo use `<img class="absolute inset-0 h-full w-full object-cover" src="..." />` as the first child of a `relative` root, then put the content above it with `relative`. Never invent image URLs: use ones the user gave you, ones you read on the brand's own site (its logo), or neutral placeholders such as `https://picsum.photos/id/1011/1200/630`. Use the brand's real logo URL straight from its site: the preview loads images that a site won't share with browsers through JSXImage's own image proxy, so any public https image works, and the template keeps the plain URL (never write a proxy URL into a template).For icons, and for a logo only when you have no real one, draw inline `<svg width="64" height="64" viewBox="0 0 24 24">` with shapes (`<circle>`, `<rect>`, `<path>`, `fill`, `stroke`); that works. - Text over a photo needs an overlay or a fade behind it: see "Text on a photo" under "Design: no AI tells". ## Sizes that fit common uses Open Graph / link preview 1200x630 · Twitter/X card 1200x675 · LinkedIn post 1200x627 · Instagram square 1080x1080 · Instagram/Story portrait 1080x1920 · YouTube thumbnail 1280x720 · Display ad banner 1200x628 · Certificate or A4 landscape 1600x1131 · Avatar/badge 512x512. Use "png" for flat graphics and text, "jpeg" or "webp" for photos. ## Design: no AI tells Generated designs share a few habits that people now recognize at a glance. Avoid them, so the image looks made by a designer who knows the brand. The one exception: when the user explicitly asks for something below forbids (a gradient, uppercase labels, a particular color or font), do what they asked; the user's words win. Never add these on your own. - **Typography.** Stick to one font family, or two at most when they are clearly different (a serif display face with a sans body). Aim for exactly two sizes: ONE text size for everything you read (headings, labels, stats, the share line) and ONE big display size for the single hero, a number or a short headline. Make every other distinction with weight (bold for the key word or value), color (the accent for the one thing to notice, a muted tone for secondary text) and spacing. A third size is the very most. A card where all text is one size and one number is huge looks designed; a card with many sizes looks generated. - **No small uppercase labels** above headings, numbers or sections ("YOUR STATS", "TOTAL HOURS"). Label in normal case, under or beside the value, in the body size and a muted color. - **No boxes around everything.** Group with space and alignment. One boxed or tinted element at most, and only if it is the one thing to look at. - **A flat background.** One solid color, never a decorative gradient, glow, vignette, blob, glassy card or noise. The one exception: a fade or overlay that makes text readable on a photo (see "Text on a photo"). Gradient backgrounds are the strongest single sign of a generated image. No emoji or icons as ornaments; no numbered markers (01, 02, 03) unless the content really is a sequence. - **Don't accent a single word** in a headline with another color, italic or weight. - **The brand's real colors.** Take them from the brand's own site: its CSS, buttons, links or logo. When you have the site, read the actual values; if you can't, say which colors you assumed. One accent color, used for one or two things; everything else in the brand's neutrals. Never fall back on the default AI palettes: navy or slate with an orange accent, cream with terracotta, near-black with a single acid green, purple-to-blue, teal with coral. - **A clear grid** with generous, consistent margins; leave empty space on purpose. Align things on shared edges. - **Real-sounding copy.** Write like the brand talks; no stock phrases ("Unlock", "Elevate", "Seamless"). - **Use the brand's real logo** (its image URL from their site) when you have it, instead of drawing one. ### Margins and spacing - **Double your whitespace.** When unsure, use twice the space you first thought. Crowding is the most common reason an image looks cheap. - **Outer margin at least as large as the gaps inside.** The space between the content and the image's edge is never smaller than the space between groups of content. On a 1200×630 image that means at least 64px, usually 72 to 96px. - **Spacing on a scale.** Use multiples of 8 (8, 16, 24, 32, 48, 64, 96), and make the gap between groups clearly larger than the gap inside a group, about twice as large, so the grouping reads at a glance. - **Align every element to another.** Shared left edges and baselines; nothing floats on its own. ### Fonts and type - **Geist by default.** It is built in and needs no download, so use it unless the brand has its own font. Only load a Google Font when the brand uses it, or when the image needs a character Geist doesn't have. - **If the brand's font isn't on Google Fonts,** pick the closest well-made one: Figtree (friendly, geometric; for Gotham, Proxima Nova or Avenir), Inter or Archivo (for Helvetica), Manrope or Mulish (soft, modern), Source Sans 3 (humanist), IBM Plex Sans (technical). Avoid Montserrat (overused) unless the brand uses it. Never a novelty face. - **If you use two fonts, make them contrast:** a serif with a sans, never two similar sans fonts. - **No thin weights.** Nothing lighter than 400 for text; 600 to 800 for the hero. - **Tighter as it grows.** Big text gets tighter letter-spacing and line-height: a hero number around -0.04em to -0.05em with line-height 0.9; a headline around -0.02em and 1.1; text at the body size normal spacing and line-height 1.3 to 1.4. - **A big number can be light.** Large but in a lighter weight or a softer color often looks more refined than huge and bold; pick one for the hero and keep it. - **Short lines.** Keep lines of text under about 45 characters on an image (a max width on text blocks), and avoid a single word alone on the last line (`style={{ textWrap: "balance" }}` on headings). ### Text on a photo - **Never put text straight on a photo.** Use one of these, depending on the photo: - darken the whole photo with a translucent overlay, about 35% of a near-black (`<div class="absolute inset-0 bg-black/35" />` above the image); - a floor fade: a gradient from transparent at the middle to about 60% dark at the bottom, with the text in the bottom part (`bg-linear-to-b from-transparent via-transparent to-black/60`); - for light photos, the same with a light overlay and dark text. - Text on a photo is white or near-white on dark, or dark on light, never colored. Test with the kind of photo the user will actually use. ## Design checklist before you call the tool - Root is `flex h-full w-full ...` with padding of at least p-12 on a 1200-wide image. - Text is large enough to read when the image is shown small: titles 64px+ (text-6xl and up) on a 1200-wide image, body 28px+ (text-3xl). On a phone-sized image (1080 wide), nothing under 24px. - One font family (two at most), one text size plus one display size (three at most), no uppercase labels, one boxed element at most. - Outer margin of at least 64px on a 1200-wide image, and at least as large as the gaps inside. Text on a photo has an overlay or a fade behind it. - No text is cut off: long titles get a max width (`max-w-[900px]`) and `leading-tight`. - Every input is declared in `export const props` (required) with a realistic default; the component takes one `props: Props` parameter. Nothing is hard-coded that the user would want to change per image. - `class`, not `className`. No imports. No hooks. `options` exports `format`. - Data-driven: `fetch` only inside `export async function data`, only allowed hosts, `res.ok` checked, defaults that exist.
Known tools 2
create_templateCreate a JSXImage template from JSX source code and get a link to it.
Potential side effectsmodify_templateChange a JSXImage template that the user shared with you as a link (a URL containing `shared=` or `temp=`, for example https://jsximage.
Inferred read-onlyCONNECT WITH APPROVAL
Client installation
Review this server and its permissions before adding it. Secret placeholders must be set locally.
Codex
~/.codex/config.toml
[mcp_servers.jsximage]
url = "https://jsximage.com/mcp"
enabled = true
Claude Code
.mcp.json
{
"mcpServers": {
"jsximage": {
"type": "http",
"url": "https://jsximage.com/mcp"
}
}
}
Claude Desktop
Settings → Connectors → Add custom connector
Name: jsximage
Remote MCP URL: https://jsximage.com/mcp
Add this remote URL as a custom connector in Claude Desktop. Availability depends on the user plan and workspace policy.
Cursor
.cursor/mcp.json
{
"mcpServers": {
"jsximage": {
"url": "https://jsximage.com/mcp"
}
}
}
Visual Studio Code
.vscode/mcp.json
Add to Visual Studio Code{
"servers": {
"jsximage": {
"type": "http",
"url": "https://jsximage.com/mcp"
}
}
}
Generic MCP
Client-specific MCP configuration
{
"name": "jsximage",
"transport": "streamable-http",
"url": "https://jsximage.com/mcp"
}
MCP Inspector
Run the official MCP Inspector locally and enter the indexed Streamable HTTP endpoint.
TRUST AND VERIFICATION EVIDENCE
Loading Trust v2 evidence…
Checking the associated registrable domain. The BuiltWith key remains server-side.
Evidence is source-attributed and does not guarantee that a third-party server is safe. Risk labels are conservative metadata heuristics.