Purpose
og-mcp is a Model-Context-Protocol (MCP) server that makes OpenGraph.io (https://opengraph.io)的每一个 API endpoints available to AI agents such as Anthropic Claude, Cursor, and LangGraph through the standard MCP interface. If you already use OpenGraph.io to expand links, scrape HTML, extract article text, or capture webpage screenshots, you can now hand the same capabilities to autonomous agents without exposing the raw API key to the agent.
Main capabilities
Data tools
- All scraping/metadata tools use the v3 API by default, with auto_render, auto_proxy, and retry enabled by default to improve success rates on complex pages.
- The query and extract tools use v1.1.
- All tools send accept_lang: auto by default, mirroring the request's Accept-Language header; an explicit BCP 47 tag (such as en-US, fr) can be passed to override it.
Site audit and link preview tools
- Require OAuth 2.1 and a valid Site Audit plan.
- Only available over hosted HTTPS transport and cannot be used via the x-app-id header or the stdio/Claude Desktop extension, because they require an organization identity rather than just an API key.
Monitoring and history tools
- Provide scheduled audits, trend tracking, and change reports; require OAuth.
- setMonitoringSchedule also requires Site Audit scheduling authorization.
- Turn audits into developer-actionable work; requires OAuth.
Image generation tools
- Can create images from natural language prompts or diagram code.
- Supports image kinds: illustration (general AI-generated images), diagram (technical diagrams from Mermaid, D2, or Vega syntax), icon (app icons and logos), social-card (OG images optimized for social sharing), qr-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-thumbnail
- Standard: wide, square, portrait
- Icons: 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.
- Can refine or modify an existing generated image: modify specific parts (such as "change the background to blue"), apply style changes (such as "make it more minimalist"), fix issues (such as "remove the text" or "make the icon larger"), or crop at specified coordinates.
- Inspect image sessions: view session details and find asset IDs for iteration, including session metadata (creation time, name, status), the prompt/tool chain/status list for all assets, and parent-child relationships showing iteration history.
- Export image assets: export generated images by session and asset ID, returning the base64 image inline along with metadata (format, dimensions, size). When running locally (stdio transport), a destinationPath can optionally be provided to save to disk; with hosted/HTTP transport the path is ignored and the image is returned inline only.
Guided workflows (prompts)
In addition to tools, the server also provides named prompts—prebuilt multi-step workflows that MCP clients can present directly to users (for example as slash commands), or that agents can invoke by name for more reliable results than free-form tool calls.
How it works
The og-mcp server acts as an AI client (such as Claude or another LLM) and the OpenGraph.io API: the AI client initiates tool calls to the available MCP functions; og-mcp receives the request and formats it into an OpenGraph.io API request; OpenGraph.io processes the request and returns data; og-mcp converts the response into a format suitable for the AI client; the AI client receives structured data. This abstraction avoids exposing API keys directly to the AI.
Usage
Global Installation
Can be installed globally via npm. It is recommended to use the CLI installer to configure any supported client: supports cursor, claude-desktop, windsurf, vscode, zed, jetbrains. Claude Desktop users can also download the .mcpb extension from the Releases page for one-click installation.
Authentication
The hosted MCP server supports two authentication methods:
- OAuth 2.1 (recommended for hosted deployments): authorize access through the OpenGraph.io dashboard, with no need to copy API keys into configuration files; the MCP client automatically handles the entire browser login flow. Supported clients must implement the Authorization Code + PKCE flow (Cursor, Claude Desktop 0.10+, VS Code with the MCP extension). When a client connects without credentials, the server returns 401 with a WWW-Authenticate header, the client retrieves the authorization server metadata and starts the PKCE flow, redirecting the browser to https://dashboard.opengraph.io/oauth/consent,登录并选择要授权的 API key. No client configuration required.
- x-app-id header (legacy/local development): pass the App ID as an HTTP header, suitable for local development, CI, or clients that do not support OAuth. Replace YOUR_OPENGRAPH_APP_ID with your OpenGraph.io App ID.
Client Configuration
- Claude Desktop: the configuration file location is ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows; a one-click installation command is also provided.
- Cursor: configuration file ~/.cursor/mcp.json.
- VS Code: configuration file .vscode/mcp.json (in the project directory); VS Code supports input prompts to handle credentials securely.
- Windsurf: configuration file ~/.codeium/windsurf/mcp_config.json.
- JetBrains AI Assistant: add to the MCP configuration.
- Zed: configuration file ~/.config/zed/settings.json; note that Zed uses context_servers instead of mcpServers. All configurations use the hosted HTTPS transport. OAuth is recommended for shared/production environments, with the x-app-id header configuration as a fallback.
Running Locally
- Clone the repository.
- Install dependencies: npm install.
- Build the TypeScript code: npm run build.
- Start the server: npm start. The server runs on port 3010 by default (configurable via the PORT environment variable).
Transport Options
- Stdio transport (recommended): used for command-line and npm global installations, and the OpenGraph API key can be passed directly via command-line arguments; this mode allows other applications using MCP to call the server directly.
- Streamable HTTP transport: runs a web server accessible via HTTP.The old SSE transport (/sse + /message) has been removed; it had no authentication and shared a single connection across all clients.
OAuth 2.1 Environment Variables
Set the relevant environment variables when running the Streamable HTTP server (npm start); when OAUTH_JWKS_URL is not set, bearer-token verification is disabled, and only the x-app-id fallback takes effect.
x-app-id Fallback/Local Development
Omit the OAuth environment variables and use a static App ID instead; this can also serve as a fallback for any HTTP request that includes an x-app-id header.
Use Cases
- Need to let AI agents automatically expand links, scrape web pages, extract body text, and take screenshots.
- Need to generate images such as OG cards, technical diagrams, icons, QR codes, etc. for social media.
- Need to integrate OpenGraph.io capabilities in MCP clients such as Cursor, Claude Desktop, Windsurf, VS Code, Zed, JetBrains, etc.
- Need to audit sites, monitor them, and track historical trends (requires OAuth and the corresponding plan).
Limitations
- Site audit and link preview tools require OAuth 2.1 and a valid Site Audit plan, are provided only via hosted HTTPS transport, and cannot be used via the x-app-id header or the stdio/Claude Desktop extension.
- Monitoring and history tools require OAuth; setMonitoringSchedule also requires Site Audit scheduling authorization.
- OAuth requires the client to implement the Authorization Code + PKCE flow.
- When OAUTH_JWKS_URL is not set, bearer-token verification is disabled, and only the x-app-id fallback takes effect.
- For image export, the hosted/HTTP transport ignores destinationPath and returns only inline.
- The project namespace and repository are securecoders/opengraph-io-mcp.
Troubleshooting
- If the tools do not appear, check whether the server is running and whether the URL is correctly configured in Cursor.
- Check the server logs for connection or authorizationissues.
- Confirm that Claude has been instructed to use a specific tool by name.
The above content is all based on the project materials; information that was not provided (such as specific fees, prices, platform coverage, etc.) is not yet available.