OpenGraph MCP Server (og-mcp)
og‑mcp is a Model‑Context‑Protocol (MCP) server that makes every OpenGraph.io ( https://opengraph.io ) API endpoint available to AI agents (e.g. Anthropic Claude, Cursor, LangGraph) through the standard MCP interface.
Why? If you already use OpenGraph.io to unfurl links, scrape HTML, extract article text, or capture screenshots, you can now give the same capabilities to your autonomous agents without exposing raw API keys.
Global Installation
You can install this package globally via npm:
Quick Install
CLI Installer (Recommended)
The easiest way to configure OpenGraph MCP for any supported client:
Supported clients: cursor, claude-desktop, windsurf, vscode, zed, jetbrains
Claude Desktop Extension
For Claude Desktop users, you can also download the .mcpb extension for one-click installation from the Releases page.
Client Configuration
All configurations below use stdio transport (recommended). Replace YOUR_OPENGRAPH_APP_ID with your OpenGraph.io App ID.
Claude Desktop
Config location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Claude Code
One-command installation:
Cursor
Config location: ~/.cursor/mcp.json
VS Code
Config location: .vscode/mcp.json (in your project directory)
VS Code supports input prompts for secure credential handling:
Windsurf
Config location: ~/.codeium/windsurf/mcp_config.json
JetBrains AI Assistant
Add to your JetBrains AI Assistant MCP configuration:
Zed
Config location: ~/.config/zed/settings.json
Note: Zed uses context_servers instead of mcpServers:
Available Tools
OpenGraph.io Data Tools
Tool Name | OpenGraph.io API Endpoint | Description | Documentation |
Get OG Data |
| Extracts Open Graph data from a URL | |
Get OG Scrape Data |
| Scrapes data from a URL using OpenGraph's scrape endpoint | |
Get OG Screenshot |
| Gets a screenshot of a webpage using OpenGraph's screenshot endpoint | |
Get OG Query |
| Query a site with a custom question and optional response structure | |
Get OG Extract |
| Extract specific HTML elements (h1, p, etc.) from a webpage |
Image Generation Tools
Tool Name | Description |
Generate Image | Create professional images: illustrations, diagrams (Mermaid/D2/Vega), icons, social cards, or QR codes |
Iterate Image | Refine, modify, or create variations of existing generated images |
Inspect Image Session | Retrieve session metadata and asset history for image generation sessions |
Export Image Asset | Export generated image assets as inline base64, with optional disk write when running locally |
Image Generation
The og-mcp server includes powerful AI-driven image generation capabilities, perfect for creating social media cards, architecture diagrams, icons, and more.
Generate Image
Create images from natural language prompts or diagram code.
Supported Image Types (
illustration- General-purpose AI-generated imagesdiagram- Technical diagrams from Mermaid, D2, or Vega syntaxicon- App icons and logossocial-card- OG images optimized for social sharingqr-code- QR codes with optional styling
Preset Aspect Ratios:
Social:
og-image,twitter-card,twitter-post,linkedin-post,facebook-post,instagram-square,instagram-portrait,instagram-story,youtube-thumbnailStandard:
wide,square,portraitIcons:
icon-small,icon-medium,icon-large
Style Presets:
github-dark, github-light, notion, vercel, linear, stripe, neon-cyber, pastel, minimal-mono, corporate, startup, documentation, technical
Diagram Templates:
auth-flow, oauth2-flow, crud-api, microservices, ci-cd, gitflow, database-schema, state-machine, user-journey, cloud-architecture, system-context
Example Usage:
Iterate Image
Refine or modify an existing generated image.
Use cases:
Edit specific parts: "change the background to blue"
Apply style changes: "make it more minimalist"
Fix issues: "remove the text", "make the icon larger"
Crop to specific coordinates
Example:
Inspect Image Session
Review session details and find asset IDs for iteration.
Returns:
Session metadata (creation time, name, status)
List of all assets with prompts, toolchains, and status
Parent-child relationships showing iteration history
Example:
Export Image Asset
Export a generated image asset by session and asset ID. Returns the image inline as base64 along with metadata (format, dimensions, size).
When running locally (stdio transport), you can optionally provide a destinationPath to save the image to disk. On hosted/HTTP transport, the path is ignored and the image is returned inline only.
Examples:
How it works
The og-mcp server acts as a bridge between AI clients (like Claude or other LLMs) and the OpenGraph.io API:
AI client makes a tool call to one of the available MCP functions
og-mcp server receives the request and formats it for the OpenGraph.io API
OpenGraph.io processes the request and returns data
og-mcp transforms the response into a format suitable for the AI client
AI client receives the structured data ready for use
This abstraction prevents exposing API keys directly to the AI while providing full access to OpenGraph.io capabilities.
Setup and Running
Clone this repository
Install dependencies:
npm installBuild the TypeScript code:
npm run buildStart the server:
npm start
The server will run on port 3010 by default (configurable via PORT environment variable).
Configuration
The server requires an OpenGraph.io App ID to function properly. You can provide this in several ways:
Using environment variables: Set
OPENGRAPH_APP_IDorAPP_IDin a.envfile or as an environment variableUsing command-line arguments with stdio transport:
--app-id YOUR_APP_IDWhen using SSE transport: Include it in the URL as a query parameter (
?app_id=YOUR_APP_ID)
Example .env file:
Transport Options
Stdio Transport (Recommended)
For command-line usage and npm global installation, the server can be run with stdio transport:
You can pass the OpenGraph API key directly via command-line argument:
When installed globally:
This mode allows the server to be invoked directly by other applications that use MCP.
HTTP/SSE Transport
This method runs a web server that can be accessed over HTTP and uses SSE for streaming:
HTTP/SSE Transport (Alternative)
If you prefer running a persistent server instead of stdio:
Then configure your client to connect to:
Troubleshooting
If tools aren't showing up, check that the server is running and the URL is correctly configured in Cursor
Check the server logs for any connection or authorization issues
Verify that Claude has been instructed to use the specific tools by name