Setup guide

Use GetScreenshot in VS Code with GitHub Copilot

Add the GetScreenshot MCP server to Copilot's MCP configuration. Copilot in VS Code can then capture any public page, render HTML it just wrote, and compare before and after.

Works with any GetScreenshot API key on any plan, from $5/month.

What you get

Five tools that let the agent look at web pages

Look at any public page

The agent passes a URL to capture_screenshot. A hosted browser renders the page and the tool returns images sized for vision models, plus a link to the full-resolution file.

Render HTML it just wrote

render_html takes an HTML string and returns a screenshot of it. The agent can check a component or email template without a local browser.

Compare before and after

compare_screenshots diffs two pages or two earlier captures and reports the share of changed pixels, where the change is, and a diff image.

Limits worth knowing: captures run on our servers, so they cannot reach localhost or private networks. Each call is a single capture, not a logged-in browsing session. For multi-step browser automation see GetScreenshot vs Playwright MCP. Screenshot links are public URLs that stay available for 30 days.

Before You Start

Three things to have ready

A GetScreenshot API key

Any plan works. Plans start at $5/month for 2,500 screenshots. Get a key.

VS Code

VS Code with AI features enabled and GitHub Copilot signed in.

Node.js 20.9 or newer

Only for the local option, which runs npx -y getscreenshot-mcp on your machine. The hosted option needs nothing installed.

How to Set Up

Hosted server at https://mcp.getscreenshotapi.com/mcp, or a local server started with npx

Copilot in VS Code supports both connection styles. Use one of them, not both. These steps follow the current VS Code documentation, which configures servers for the Copilot harness in ~/.copilot/mcp-config.json. Both give the agent the same five tools and use the same API key and quota.

1

Get your API key

Pick a plan on the pricing page. The key arrives by email after checkout. The MCP server works with any API key on any plan, including Lincoln at $5/month for 2,500 screenshots. Code FREE5 makes the first month of the $5 plan free. If you lose the key, recover it from your account page.

View pricing plans
2

Put the key in an environment variable

Set GETSCREENSHOT_API_KEY once, so the config below can reference the key instead of containing it. On macOS and Linux, add this line to your shell profile (~/.zshrc or ~/.bashrc). On Windows, add it as a user environment variable.

export GETSCREENSHOT_API_KEY=YOUR_API_KEY

Copilot's configuration supports ${NAME} references. Stdio servers can use them in command, args and env values, and HTTP servers in header values. The variable has to be set on the machine where the server runs or connects from. Restart VS Code after setting it.

3

Option A: connect to the hosted server

Nothing to install. Select Copilot in the Session Target dropdown, then:

  1. 1. Run Chat: Open Customizations from the Command Palette and select MCP Servers.
  2. 2. Select Add Server (+) in the User group and choose HTTP (HTTP or Server-Sent Events).
  3. 3. Enter the endpoint https://mcp.getscreenshotapi.com/mcp and the server ID getscreenshot.
  4. 4. Select Global, then Copilot Global.
  5. 5. Select the server in the MCP Servers list to open its configuration form. Add the Authorization header with the value Bearer ${GETSCREENSHOT_API_KEY} and select Save. Enter the reference, not the key.

Or edit the file directly. Copilot Global is ~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json when COPILOT_HOME is set):

~/.copilot/mcp-config.json

{
  "mcpServers": {
    "getscreenshot": {
      "type": "http",
      "url": "https://mcp.getscreenshotapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${GETSCREENSHOT_API_KEY}"
      },
      "tools": ["*"]
    }
  }
}
4

Option B: run the server locally

In the same Add Server flow, choose Command (stdio) and enter npx -y getscreenshot-mcp. Needs Node.js 20.9 or newer on the machine where the server runs. The resulting entry should look like this:

~/.copilot/mcp-config.json

{
  "mcpServers": {
    "getscreenshot": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "getscreenshot-mcp"],
      "env": {
        "GETSCREENSHOT_API_KEY": "${GETSCREENSHOT_API_KEY}"
      },
      "tools": ["*"]
    }
  }
}

"tools": ["*"] makes all five tools available. List specific tool names instead to limit the selection.

5

Confirm it is connected

Run Chat: Open Customizations and select MCP Servers. getscreenshot should be listed. Its ellipsis (...) menu has Start Server, Stop Server and Show Output. Review any trust request before accepting it.

6

Try a prompt

Name the server in your first request, then expand the tool call in the conversation and check that it returned a screenshot_url. An answer without a tool call does not prove the connection works.

Use the getscreenshot tools to take a screenshot of https://example.com and describe what is above the fold. Do not change files.

Sharing the server with a workspace

To share the server with teammates, put the same mcpServers entry in a .mcp.json file at the workspace root and commit it. Keep the ${GETSCREENSHOT_API_KEY} reference in it and never the key itself. Each person sets the variable on their own machine. Workspace servers follow Workspace Trust, so they do not start in restricted mode.

If you already use .vscode/mcp.json

Older setups keep servers in .vscode/mcp.json or the user profile mcp.json, with a top-level servers object and inputs that prompt for secrets. VS Code's documentation now treats that as the editor-managed format of the deprecated Local harness and tells new Copilot setups to use the files above. If you maintain one, this entry prompts for the key once and stores it for later runs:

.vscode/mcp.json (editor-managed format)

{
  "inputs": [
    {
      "type": "promptString",
      "id": "getscreenshot-key",
      "description": "GetScreenshot API key",
      "password": true
    }
  ],
  "servers": {
    "getscreenshot": {
      "type": "http",
      "url": "https://mcp.getscreenshotapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:getscreenshot-key}"
      }
    }
  }
}

A server that needs ${input:...} is not forwarded to Copilot harness sessions, so move to the mcpServers format with an environment variable when you can.

Prompts to Try

Replace the example URLs and file names with your own

Check a deployed change

Use getscreenshot to take a full-page screenshot of https://example.com/pricing and list anything that looks broken or misaligned.

Check HTML you just wrote

Render the HTML in src/index.html with render_html and tell me whether the hero section looks right.

Compare staging and production

Compare https://staging.example.com with https://www.example.com and describe what changed.

Check a mobile layout

Capture https://example.com with the iphone12 device and tell me if the navigation fits on screen.

Each page captured uses one screenshot from your monthly quota. A comparison uses one per page it has to capture.

Tools the Server Adds

All five are read-only. Full inputs and outputs are in the MCP server reference

Tool What it does
capture_screenshot Capture a public web page as images the model can see. Options cover full-page capture, a single element by CSS selector, device presets and wait conditions.
render_html Render an HTML string (up to 2 MB) and screenshot it. Useful for a component or page the agent just wrote.
compare_screenshots Visual diff of two pages or two earlier screenshots. Returns the changed-pixel percentage, the bounding box of the change and a diff image.
capture_pdf Save a page as an A4 PDF and return a link that works for 30 days.
get_usage Screenshots used, monthly limit and reset date for your key. Costs 1 quota unit.

Troubleshooting

Common issues and how to resolve them

Tools say no API key is configured, or the hosted server rejects the request

  • • Check that GETSCREENSHOT_API_KEY is set in the environment VS Code was started from. If you set it in a shell profile, restart VS Code, or start it from that shell with code ..
  • • Use the braced form ${GETSCREENSHOT_API_KEY}. VS Code's MCP client treats a bare $NAME as literal text.
  • • In a remote or Dev Container session the variable has to be set on the remote host, and the configuration has to live there too.

The server does not appear or cannot start

  • • Open the server's ellipsis menu and choose Show Output, or run MCP: List Servers, select the server and choose Show Output.
  • • Local setup: check that node --version prints v20.9 or newer in the environment where the server runs.
  • • If Copilot Global is not offered when you add the server, your VS Code build may not meet the Copilot harness requirements. Update VS Code.

A tool call times out on a slow page

  • • Ask the agent to retry with wait_until: "domcontentloaded". It is the fastest setting and the most reliable on heavy sites.
  • • A capture usually takes around 9 seconds. The API gives up after 90 seconds.
  • • Failed captures still count against your monthly quota, so change the settings before retrying more than once.

The agent cannot capture localhost or an internal site

  • • The capture runs on our servers, which cannot reach localhost or private networks.
  • • For markup the agent just wrote, use render_html with the HTML itself. Inline the CSS and images or set <base href>, because relative asset URLs will not resolve.
  • • For a running app, give the agent a public preview URL or a tunnel address.

The image is too large for the conversation

  • • Ask for return: "url_only" to get the screenshot_url without inline images.
  • • Capture one part of the page with element and a CSS selector instead of the full page.
  • • Lower max_slices (default 4) to limit how many images a full-page capture returns.

Still stuck? Email support@rasterwise.com.

Other AI Clients

The same server works in other MCP clients. See all options on the AI Agents page

Prefer instructions the agent loads on demand? See the GetScreenshot agent skill.

GetScreenshot is an independent product. It is not affiliated with or endorsed by the makers of VS Code. Product names belong to their owners.

Get an API Key and Connect VS Code

Plans start at $5/month for 2,500 screenshots. The MCP server works with any API key on any plan.