ogimagen

Generate OG images from Claude with MCP

Connect OGImagen to Claude Code, Claude Desktop, Cursor, Windsurf, or any MCP-compatible client. Generate Open Graph images, list past generations, and pull copy-ready meta tag snippets without leaving your editor.

1. Get your API key

You need any active paid plan (Starter, Growth, or Pro). After subscribing, your API key appears at /dashboard/mcp. Keys start with ogim_. Treat them like passwords. The same key powers the REST API.

2. Connect your client

OGImagen speaks MCP with OAuth 2.1: the client registers itself, your browser opens once for login and consent, and tokens are issued per client. No key pasting. The staticogim_ keys keep working for scripts and CI.

Claude Code

claude mcp add --transport http ogimagen https://ogimagen.com/api/mcp

Or with the static key for non-interactive use:

claude mcp add --transport http ogimagen https://ogimagen.com/api/mcp \
  --header "Authorization: Bearer ogim_YOUR_KEY"

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "ogimagen": {
      "url": "https://ogimagen.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ogim_YOUR_KEY"
      }
    }
  }
}

Cursor

Same JSON shape; add via Cursor Settings → MCP servers.

Windsurf

Same JSON shape; add via Windsurf Settings → MCP.

3. Tools exposed

ToolWhat it doesCredit cost
generate_og_imageGenerate 1 to 4 OG image variants from a brief, optional headline, brand color or brand kit. Waits up to 60 seconds.1 (flash) or 3 (max) per variant
regenerate_og_imageCreate refined variants of an earlier generation from a tweak instruction.1 or 3 per variant
estimate_costPreview the credit cost and your balance. Read-only.0
list_generationsList recent generations with CDN URLs. Paginated, read-only.0
get_generationFetch one generation: status, inputs and variant URLs. Read-only.0
get_snippetMeta tag snippets (Next.js, HTML, Astro) for a finished generation. Read-only.0
list_brand_kitsList saved brand kits. Read-only.0
list_templatesList the deterministic template designs. Read-only.0
render_templateRender a template and host the PNG on the CDN. No AI. Free plans keep up to 5 hosted template images.0
check_og_tagsFetch a public page and audit its Open Graph and Twitter tags. Read-only, 20 checks per minute.0

Generation responses include the CDN URL of every variant as structured data, plus one inline preview image. Pass includeImages: true to get all variants inline.

4. Example prompts

  • “Generate an OG image for my new blog post titled ‘Shipping fast with feature flags’ using my default brand kit.”
  • “Regenerate generation gen_xyz with darker background and bigger headline.”
  • “Give me the Next.js App Router snippet for my latest OGImagen generation.”

5. Troubleshooting

  • 401 from MCP server. Check the bearer token is your API key (ogim_…), not an OAuth token.
  • Generation fails with credit error. Check your balance with estimate_cost or at /dashboard/billing.
  • Reference image refused. Reference URLs must be on the OGImagen CDN domain. Upload via the dashboard or pass a brand-kit logo.

FAQ

What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI assistants to external tools and data. An MCP-compatible client like Claude Code, Claude Desktop, Cursor, or Windsurf can call remote tools defined by an MCP server. OGImagen exposes its image generator as an MCP server.

Which plan includes the MCP API key?

Every paid plan, Starter ($5), Growth ($15), and Pro ($29/month). The same key also works with the REST API. Only the free plan has no key.

Which tools does the OGImagen MCP server expose?

Ten tools: generate_og_image, regenerate_og_image, estimate_cost, list_generations, get_generation, get_snippet, list_brand_kits, list_templates, render_template, and check_og_tags. Every tool has a title, an output schema and behavior annotations (read-only, destructive, idempotent), and returns structured results plus a short text summary.

Do MCP generations use my brand kit?

Yes. If you have a default brand kit set, generations triggered by MCP fill in missing brandColor, style, displayText, displaySubtitle and reference image silently from that kit. Pass brandKitId explicitly to pick a non-default kit.

How much does an MCP generation cost?

Credits per variant depend on the quality tier: 1 for flash (standard tier) and 3 for max (premium tier), multiplied by the number of variants. For example flash x2 costs 2 and max x2 costs 6. estimate_cost previews the cost and your balance without spending anything. Template tools and check_og_tags cost no credits.


Ready to start? Pick a plan and connect your agent.