memewright

memewright

Enables AI agents to create memes by selecting from a library of templates and rendering captions with proper typesetting.

Category
Visit Server

README

<div align="center">

Memewright

The open-source meme engine for AI agents.

Give it a template and a caption for each box. It renders a clean, correctly typeset image-macro — right font, proper outline, text that wraps and shrinks to fit. Drive it from a CLI, an MCP server, or three lines of code.

Memes are one of the highest-performing formats in marketing, and agents can write the jokes. They just can't render them. Memewright is the missing hands.

</div>


Why this exists

Ask an AI agent to "make a meme" and it hits a wall: it can write a killer caption, but it can't place text in the right spot, in the right font, outlined so it's legible, wrapped so it fits. So agents fall back to describing a meme in words, or generating a warped image where the text is gibberish.

Memewright is the rendering layer. The agent decides what the joke is; Memewright handles how it looks — pixel-correct, every time. The hard part is not drawing text on an image. It's the typesetting: fitting an unknown-length caption into a fixed box, wrapping it, and shrinking the font until it sits perfectly. That's what Memewright does, on a library of templates that each know what they mean.

Quick start

# no install needed
npx memewright list
npx memewright make waiting-skeleton \
  --top "me waiting for the cleaner to flag the damage" \
  --bottom "before the next guest checks in" \
  -o meme.png

That's a finished, shareable PNG. No watermark, no dragging text boxes.

Use it from an AI agent (MCP)

Memewright ships an MCP server so any agent (Claude, Cursor, your own) can make memes as tool calls:

// add to your MCP client config
{
  "mcpServers": {
    "memewright": { "command": "npx", "args": ["memewright-mcp"] }
  }
}

The agent gets three tools:

Tool What it does
list_templates Every template, its box ids, and what the meme means
get_template One template's boxes + when-to-use guidance
render_meme Render captions into a template; returns the PNG

The workflow an agent follows: list_templates to find a template that fits the joke → get_template to see the box ids → render_meme with a caption per box. The "meaning" metadata is what lets an agent pick the right template instead of forcing every joke into top/bottom text.

Use it from code

import { makeMeme } from 'memewright';
import fs from 'node:fs';

const { buffer } = await makeMeme('drake-hotline-bling', {
  reject: 'driving to every unit to inspect it',
  approve: 'reading the AI report from your phone',
});
fs.writeFileSync('drake.png', buffer);

The template library (the moat)

Every template carries structured metadata, not just an image:

{
  "name": "Woman Yelling at Cat",
  "meaning": "A furious accusation (left) met with total, smug indifference (right).",
  "when_to_use": "woman = the angry complaint; cat = the unbothered reply.",
  "boxes": [
    { "id": "woman", "x": 0.02, "y": 0.03, "w": 0.46, "h": 0.22 },
    { "id": "cat",   "x": 0.52, "y": 0.03, "w": 0.46, "h": 0.22 }
  ]
}

Box coordinates are fractions of the image, so a template renders identically at any resolution. The meaning and when_to_use fields are the real product: they turn a folder of images into something an agent can reason about.

16 templates today. The roadmap is a larger, richer library plus trending meme data — the formats that are hot this week, which is what makes meme marketing actually land.

How the text fitting works

For each caption, Memewright finds the largest font size at which the text both wraps inside the box width and fits the box height, shrinking the font (and hard-wrapping over-long words) until it does. White fill, black outline, all-caps by default — the image-macro standard — with per-box overrides for panels that need dark text on light backgrounds (Drake, Expanding Brain, UNO).

Fonts: Memewright bundles Anton (SIL Open Font License), the open substitute for Impact, so the package is legally self-contained. Have Impact and prefer it? Register it and pass { font: "Impact" }.

Self-host / hosted

Memewright is AGPL-3.0 and fully self-hostable — the CLI, the MCP server, and the library are the whole thing; run them anywhere Node runs. A hosted cloud (web editor, brand kits, auto-posting, the trending-meme database) is the planned commercial layer, but the engine is and stays open source.

License

AGPL-3.0-or-later. Bundled font: Anton, SIL OFL (see assets/fonts/OFL.txt).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured