MCP Server

New

Generate social images with a single tool call. The SnapOG MCP server gives any AI assistant direct access to all 10 templates — no API docs to read, no fetch logic to write.

What is MCP?

The Model Context Protocol is an open standard that lets AI assistants use external tools directly. Instead of reading API docs and writing HTTP requests, your AI calls generate_image and gets a PNG back instantly.

1
Connect

Add the MCP server to your AI tool

2
Ask

“Generate an OG image for my blog post”

3
Done

PNG saved to disk + inline preview

Setup

Choose your AI client and follow the setup instructions. The server communicates over stdio and requires Node.js 20+.

Claude Code
claude mcp add snapog -- npx tsx /path/to/packages/mcp/src/index.ts

With an API key for authenticated endpoints:

claude mcp add snapog \
  -e SNAPOG_API_KEY=sk_live_xxxxx \
  -- npx tsx /path/to/packages/mcp/src/index.ts
Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "snapog": {
      "command": "npx",
      "args": ["tsx", "/path/to/packages/mcp/src/index.ts"],
      "env": {
        "SNAPOG_API_URL": "https://api.snapog.dev",
        "SNAPOG_API_KEY": "sk_live_xxxxx"
      }
    }
  }
}
Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "snapog": {
      "command": "npx",
      "args": ["tsx", "/path/to/packages/mcp/src/index.ts"],
      "env": {
        "SNAPOG_API_URL": "https://api.snapog.dev",
        "SNAPOG_API_KEY": "sk_live_xxxxx"
      }
    }
  }
}
VS Code (Copilot)

Add to .vscode/mcp.json:

{
  "servers": {
    "snapog": {
      "command": "npx",
      "args": ["tsx", "/path/to/packages/mcp/src/index.ts"],
      "env": {
        "SNAPOG_API_URL": "https://api.snapog.dev",
        "SNAPOG_API_KEY": "sk_live_xxxxx"
      }
    }
  }
}
Windsurf

Add to your Windsurf MCP configuration:

{
  "mcpServers": {
    "snapog": {
      "command": "npx",
      "args": ["tsx", "/path/to/packages/mcp/src/index.ts"],
      "env": {
        "SNAPOG_API_URL": "https://api.snapog.dev",
        "SNAPOG_API_KEY": "sk_live_xxxxx"
      }
    }
  }
}

Available Tools

The SnapOG MCP server exposes 5 tools. Your AI assistant can discover these automatically — just ask it to generate an image and it will figure out the right tool and parameters.

list_templates

List all available SnapOG image templates with their parameters and defaults. Call this first to discover which templates and parameters are available.

get_template

Get detailed info about a specific template including all parameter definitions and default values.

template_idstringrequiredTemplate identifier, e.g. "blog-post"
generate_imageAuth

Generate a social image using a SnapOG template. Returns the image as a file saved to disk plus an inline preview.

templatestringrequiredTemplate ID, e.g. "blog-post", "github-repo"
paramsobjectrequiredTemplate parameters as key-value pairs
widthnumberImage width in pixels (default: 1200)
heightnumberImage height in pixels (default: 630)
format"png" | "svg"Output format (default: png)
get_image_urlAuth

Get a direct URL for a SnapOG image that can be used in HTML meta tags, markdown, or anywhere an image URL is needed.

templatestringrequiredTemplate ID
paramsobjectrequiredTemplate parameters as key-value pairs
preview_template

Generate a quick preview of a template with its default parameters. No API key needed.

template_idstringrequiredTemplate ID to preview

Resources

MCP resources provide context to the AI without requiring a tool call. These are automatically available when the server is connected.

snapog://docs

Complete API documentation as markdown — every endpoint, every template, code examples in Node.js, Python, and Next.js.

snapog://templates

All 10 templates with full parameter schemas, types, defaults, and descriptions.

Example Prompts

Once connected, just describe what you need in natural language. Your AI assistant will choose the right template and parameters automatically.

>
Generate an OG image for my blog post "Building with MCP" by Taylor, tagged with AI and Tools
generate_imagetemplate: blog-post
>
Create a GitHub repo card for my project "fastdb" — it's a Rust project with 3.2k stars
generate_imagetemplate: github-repo
>
Make an announcement image for our v2.0 launch with a purple gradient
generate_imagetemplate: announcement
>
What templates are available? Show me a preview of the product card
list_templates + preview_templatetemplate: product
>
Get me the og:image URL for an event card for TypeScript Conf on March 15
get_image_urltemplate: event

Configuration

VariableDefaultDescription
SNAPOG_API_URLhttps://api.snapog.devSnapOG API base URL
SNAPOG_API_KEYAPI key for authenticated endpoints (generate_image, get_image_url)

Without an API key, you can still use list_templates, get_template, and preview_template.

📡
Prefer the REST API?

The MCP server wraps the same REST API. See the full API documentation for endpoints, code examples, and more. You can also point any AI assistant to https://api.snapog.dev/v1/docs for the complete API as markdown.