Docs / MCP Server

MCP Server

Connect ScreenshotRun to AI agents via the MCP Server. Install for Claude Desktop, Claude Code, Cursor, and Windsurf. Take screenshots with natural language.

MCP Server

The ScreenshotRun MCP Server lets AI agents — like Claude, Cursor, or Windsurf — take screenshots, extract page metadata, and check API usage autonomously. Instead of writing code, you just tell the AI "take a screenshot of example.com" and it does the rest.

MCP (Model Context Protocol) is an open standard for connecting AI models to external tools. By adding the ScreenshotRun MCP server, your AI assistant gets three tools: capturing screenshots with full API parameter support, extracting page metadata, and monitoring usage quota.

Available Tools

The MCP server exposes three tools to the AI agent:

ToolDescription
take_screenshot Captures a screenshot of any webpage, raw HTML, or Markdown. Supports all 50+ API parameters — viewport, device emulation, full-page capture, dark mode, retina, format selection, ad/cookie/chat blocking, CSS/JS injection, element targeting, geolocation, stealth mode, PDF output, scroll video, and more. Returns the image as base64 data for the AI to analyze or save.
extract_content Extracts page metadata from any URL without returning the full image. Returns title, description, Open Graph tags, Twitter Card tags, favicon URL, and HTTP status code. Useful for SEO audits, content analysis, and building link previews.
check_usage Returns your current quota: screenshots used, remaining, usage percentage, billing period dates. Useful for preventing AI agents from burning through your quota in batch workflows.

Installation

The MCP server is distributed as an npm package: screenshotrun-mcp. No global installation needed — it runs via npx.

Note

You need your API key before setting up. Get it from your dashboard.

Claude Desktop

Add this to your Claude Desktop config file (claude_desktop_config.json):

json
{
  "mcpServers": {
    "screenshotrun": {
      "command": "npx",
      "args": ["-y", "screenshotrun-mcp"],
      "env": {
        "SCREENSHOTRUN_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Restart Claude Desktop after saving the config.

Claude Code (CLI)

bash
claude mcp add screenshotrun npx -y screenshotrun-mcp \
  -e SCREENSHOTRUN_API_KEY=YOUR_API_KEY

Cursor

Create or edit .cursor/mcp.json in your project root:

json
{
  "mcpServers": {
    "screenshotrun": {
      "command": "npx",
      "args": ["-y", "screenshotrun-mcp"],
      "env": {
        "SCREENSHOTRUN_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Windsurf

Add to your Windsurf MCP configuration:

json
{
  "mcpServers": {
    "screenshotrun": {
      "command": "npx",
      "args": ["-y", "screenshotrun-mcp"],
      "env": {
        "SCREENSHOTRUN_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

take_screenshot Parameters

The take_screenshot tool accepts all ScreenshotRun API parameters. The AI agent picks the right ones based on your natural language request.

Source (one required)

ParameterTypeDescription
urlstringURL to screenshot (http:// or https://)
htmlstringRaw HTML to render (max 500KB)
markdownstringMarkdown to render (max 500KB)

Output

ParameterTypeDefaultDescription
formatpng | jpeg | webp | pdfpngOutput format
qualitynumber80Image quality for JPEG/WebP (1-100)

Viewport & Device

ParameterTypeDefaultDescription
widthnumber1280Viewport width (320-3840)
heightnumber800Viewport height (200-2160)
full_pagebooleanfalseCapture entire scrollable page
devicedesktop | mobile | tablet—Device preset
retinabooleanfalse2x resolution
device_scale_factornumber—Custom pixel ratio (0.5-4)

Appearance

ParameterTypeDefaultDescription
dark_modebooleanfalseEnable dark mode
omit_backgroundbooleanfalseTransparent background (PNG/WebP)
media_typescreen | print—Emulate CSS media type
reduced_motionbooleanfalseEmulate prefers-reduced-motion
disable_animationsbooleanfalseDisable CSS animations

Blocking

ParameterTypeDefaultDescription
block_adsbooleanfalseBlock advertisements
block_cookiesbooleantrueBlock cookie consent dialogs
block_chatsbooleanfalseBlock live chat widgets
block_requestsstring[]—URL patterns to block
block_resourcesstring[]—Resource types to block (image, stylesheet, font, script, media, etc.)

Interaction

ParameterTypeDescription
selectorstringCSS selector to capture a specific element
click_selectorstringElement to click before capture
hover_selectorstringElement to hover before capture
scroll_tostringElement to scroll into view
hide_selectorsstring[]Elements to hide before capture
wait_for_selectorstringWait for element to appear

Injection

ParameterTypeDescription
cssstringCustom CSS to inject (max 10KB)
jsstringCustom JavaScript to execute (max 10KB)
user_agentstringCustom User-Agent string
headersobjectCustom HTTP headers
cookiesarrayCookies to set ({name, value, domain?})

Timing

ParameterTypeDefaultDescription
delaynumber0Seconds to wait after page load (0-10)
timeoutnumber30Max page load time in seconds (5-60)
navigation_timeoutnumber—Max navigation time in seconds (5-60)
wait_untilstring—load, domcontentloaded, networkidle, or commit

Clipping & Resizing

ParameterTypeDescription
resize_widthnumberResize output width (16-3840)
resize_heightnumberResize output height (16-2160)
clipobjectClip rectangle {x, y, width, height}

Advanced

ParameterTypeDefaultDescription
stealthbooleanfalseStealth mode to avoid bot detection
bypass_cspbooleanfalseBypass Content Security Policy
cache_ttlnumber—Cache duration in seconds (0-86400)
extract_metadatabooleanfalseExtract page metadata (title, OG tags, Twitter Card)
certifiedbooleanfalseCertified screenshot with SHA-256 hash

Geolocation

ParameterTypeDescription
geolocationobject{latitude, longitude, accuracy?}
timezonestringIANA timezone, e.g. America/New_York
proxystringHTTP/SOCKS proxy URL

PDF Options (format=pdf)

ParameterTypeDescription
pdf_landscapebooleanLandscape orientation
pdf_page_formatstringA3, A4, A5, Letter, Legal, Tabloid
pdf_margin_topstringTop margin, e.g. 1cm, 0.5in
pdf_margin_rightstringRight margin
pdf_margin_bottomstringBottom margin
pdf_margin_leftstringLeft margin

Scroll Video

ParameterTypeDescription
scroll_videobooleanRecord a scrolling video of the page
scroll_durationnumberVideo duration in seconds (2-30)
scroll_speedslow | medium | fastScroll speed

extract_content Parameters

The extract_content tool extracts page metadata without downloading the full screenshot image. It returns structured data that the AI agent can use for SEO analysis, content audits, or building link previews.

ParameterTypeDescription
urlstringURL to extract metadata from

Returns:

  • Title — page title from <title> tag
  • Description — meta description
  • Open Graph — og:title, og:description, og:image, og:type, og:url, og:site_name
  • Twitter Card — twitter:card, twitter:title, twitter:description, twitter:image, twitter:site
  • Favicon URL
  • HTTP status code

Usage Examples

Once the MCP server is connected, you can ask the AI to capture screenshots using natural language. Here are some examples of what you can say:

Basic screenshot

text
Take a screenshot of https://example.com

Mobile screenshot in dark mode

text
Capture https://example.com as it looks on a mobile phone in dark mode

Full-page screenshot

text
Take a full-page screenshot of https://example.com/pricing in WebP format

Render HTML to image

text
Render this HTML as an image: <h1>Hello World</h1><p>This is a test</p>

Screenshot with stealth mode

text
Take a screenshot of cloudflare.com using stealth mode to bypass bot detection

Geo-targeted screenshot

text
Capture google.com as seen from Tokyo, Japan

Extract page metadata

text
Extract the OG tags and meta description from competitor.com

Click and capture

text
Click the "Show More" button on example.com/products, then take a screenshot

Visual comparison

text
Take screenshots of stripe.com, paddle.com, and lemonsqueezy.com. Compare their pricing page designs.

Check remaining quota

text
How many screenshots do I have left this month?

How It Works Under the Hood

  1. The AI decides to use the take_screenshot or extract_content tool based on your request.
  2. The MCP server sends a capture request to the ScreenshotRun API.
  3. It polls for completion (every 2 seconds, up to 60 seconds timeout).
  4. Once ready, the image is downloaded and returned to the AI as base64 data (or metadata is returned as structured JSON for extract_content).
  5. The AI can then analyze the image, compare it with others, or save it to disk.

Security

  • Your API key is stored in the MCP config file and passed as an environment variable. It is never sent to the AI model itself.
  • The MCP server only communicates with api.screenshotrun.com — no data is sent elsewhere.
  • Each screenshot captured by the AI agent counts toward your plan quota, just like any other API request.

Source Code

The MCP server is open source: github.com/webmox/screenshotrun-mcp — npm package