OpenGraph MCP Server for VS Code
Enhance GitHub Copilot Chat with web data capabilities. Use input prompts to keep your API key secure while enabling powerful web scraping and screenshot tools.
Overview
VS Code supports MCP servers through its Copilot Chat feature. The configuration uses a special inputs system that prompts for sensitive values like API keys, so you never have to hardcode them in config files.
Installation
Get Your App ID
Sign up at dashboard.opengraph.io to get your free App ID.
Create the MCP Config File
In your project root, create
.vscode/mcp.json:.vscode/mcp.json{ "inputs": [ { "type": "promptString", "id": "opengraph-app-id", "description": "OpenGraph App ID", "password": true } ], "servers": { "opengraph": { "type": "stdio", "command": "npx", "args": ["-y", "opengraph-io-mcp"], "env": { "OPENGRAPH_APP_ID": "${input:opengraph-app-id}" } } } }Reload VS Code
Reload the VS Code window (Cmd/Ctrl + Shift + P → "Developer: Reload Window").
Enter Your App ID
When you first use Copilot Chat, VS Code will prompt you to enter your OpenGraph App ID. It's stored securely and won't appear in your config file.
Security note: The password: true setting ensures your App ID is masked when entering it, and it's stored in VS Code's secure credential storage.
Alternative: User-Level Config
If you want the MCP server available across all your projects, you can configure it globally in your VS Code settings:
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "opengraph-app-id",
"description": "OpenGraph App ID",
"password": true
}
],
"servers": {
"opengraph": {
"type": "stdio",
"command": "npx",
"args": ["-y", "opengraph-io-mcp"],
"env": {
"OPENGRAPH_APP_ID": "${input:opengraph-app-id}"
}
}
}
}
}Using the Tools
Once configured, open Copilot Chat (Cmd/Ctrl + Shift + I) and try these prompts:
Fetch Link Preview
@opengraph unfurl https://github.com and show me the OpenGraph metadataTake Screenshot
@opengraph take a screenshot of https://tailwindcss.comScrape Content
@opengraph scrape the HTML from https://docs.python.org and find all the main navigation linksNote: MCP servers in VS Code run arbitrary code on your machine. Only use MCP servers from sources you trust.
Troubleshooting
Tools not appearing in Copilot Chat?
- Ensure you have GitHub Copilot Chat extension installed and enabled
- Verify the
.vscode/mcp.jsonfile is in your workspace root - Reload the VS Code window after creating the config
- Check that Node.js is installed and in your PATH
Viewing MCP Logs
Open the Output panel (View → Output) and select "MCP" from the dropdown to see server logs and errors.
Input Prompt Not Appearing?
If VS Code doesn't prompt for your App ID, try:
- Running "Clear MCP Credentials" from the Command Palette
- Removing and re-adding the config file
- Restarting VS Code completely