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 an active Pro plan. After subscribing, your MCP API key appears at /dashboard/mcp. Keys start with ogim_. Treat them like passwords.

2. Configure your client

Claude Code

claude mcp add 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_imageCreate a new OG image from a title, description, brand color or brand kit.1, 2, or 6 (mode-dependent)
regenerate_og_imageIterate on a previous generation with a refinement prompt.1 / 2 / 6
estimate_costPreview the credit cost of a generation before running it.0
list_generationsList your recent generations with CDN URLs.0
get_generationFetch one generation by id, with all three format variants.0
get_snippetReturn the framework-specific meta tag snippet for a generation.0
list_brand_kitsList your saved brand kits; useful before passing brandKitId.0

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_xyzwith 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 Pro key (ogim_…), not an OAuth token.
  • Generation fails with credit error. Pro resets 360 credits monthly on the invoice.paid webhook. Check your remaining balance 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?

The Pro plan ($29/month, 360 credits monthly). Starter and Growth plans support the MCP UI in the dashboard but the persistent API key is a Pro feature.

Which tools does the OGImagen MCP server expose?

Six tools: generate_og_image, regenerate_og_image, estimate_cost, list_generations, get_generation, get_snippet, and list_brand_kits. Each maps to a tRPC endpoint and respects your plan credits and brand-kit defaults.

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?

Same as the dashboard: 1 credit for fast mode (1 variant, Gemini Flash), 2 for flash (2 variants), 6 for max (2 variants, Gemini Pro). Use estimate_cost before generate_og_image when budget matters.


Ready to start? Pick a plan or read the general FAQ.