Docs

Getting started

Put this in your page's <head>. Swap in your own URL.

html
<meta property="og:image" content="https://snapog.com/s/https%3A%2F%2Fyoursite.com">

Now when someone drops your link in Slack or tweets it, there's an image.

What's actually happening

We open your page in a real browser, with full JavaScript support. Then we compose what's on screen into a 1200×630 social card that's optimized for readability at small sizes.

Ads, trackers, and cookie banners are filtered out so the card shows your actual content.

What doesn't work

CDN integration guides

If you use a CDN, you can add SnapOG to every page on your site automatically — no code changes on your origin.

Use SnapOG from AI coding tools

SnapOG has a public MCP server for agents that support streamable HTTP. No API key is needed. It gives your coding assistant a SnapOG knowledge resource plus read-only tools to make OG image URLs and audit a page's social metadata.

text
MCP server: https://snapog.com/mcp
Manifest: https://snapog.com/server.json

Tools

Both tools are annotated as read-only, non-destructive, and idempotent. They can fetch public URLs, so they are marked as open-world tools.

Claude Code

Add SnapOG as an HTTP MCP server:

shell
claude mcp add --transport http snapog https://snapog.com/mcp

Then start Claude Code and use /mcp to inspect connected servers.

Codex

Add SnapOG as a streamable HTTP MCP server:

shell
codex mcp add snapog --url https://snapog.com/mcp

Check that it was saved:

shell
codex mcp list
codex mcp get snapog

Example prompts

Ask your agent:

Troubleshooting

Refreshing a cached image

We cache images for about a week. Most of the time that's fine — your page doesn't change that often. But if you need a fresh one right now, there's a way.

You'll generate an Ed25519 keypair, publish the public half on your site, and sign refresh requests with the private half. It's a few commands.

1. Make a keypair

shell
openssl genpkey -algorithm Ed25519 -out snapog_private.pem
openssl pkey -in snapog_private.pem -pubout -out snapog_public.pem

# Get the raw public key as base64
openssl pkey -in snapog_public.pem -pubin -outform DER | tail -c 32 | base64

2. Put the public key on your site

You can serve it as a JSON file at /.well-known/snapog.json:

json
{ "publicKey": "your-base64-public-key-here" }

Or just stick it in a meta tag:

html
<meta name="snapog-key" content="your-base64-public-key-here">

3. Sign your URL and send it

shell
# Sign the exact URL you want refreshed
echo -n "https://yoursite.com/" | openssl pkeyutl -sign -inkey snapog_private.pem | base64 -w0
shell
curl 'https://snapog.com/s/https%3A%2F%2Fyoursite.com?refresh=YOUR_BASE64_SIGNATURE'

If the signature is valid, we discard the cached image and render a fresh one. Invalid signatures are ignored and the cached version is returned.

CLI

If you don't want to deal with openssl directly:

shell
# Generate a keypair
npx snapog generate

# Purge a cached image
npx snapog purge https://yoursite.com/