ScreenshotAPI

Official registry Search and web

Website screenshots, URL/HTML to PDF, scrolling videos, and web scraping via ScreenshotAPI.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package @screenshotapinet/mcp
Claude Code
claude mcp add screenshotapi -e 'SCREENSHOTAPI_TOKEN=<your screenshotapi_token>' -e 'SCREENSHOTAPI_REQUEST_TIMEOUT_MS=<SCREENSHOTAPI_REQUEST_TIMEOUT_MS>' -e 'SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTES=<SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTES>' -- npx -y @screenshotapinet/mcp@1.0.2
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "screenshotapi": {
            "command": "npx",
            "args": [
                "-y",
                "@screenshotapinet/mcp@1.0.2"
            ],
            "env": {
                "SCREENSHOTAPI_TOKEN": "<your screenshotapi_token>",
                "SCREENSHOTAPI_REQUEST_TIMEOUT_MS": "<SCREENSHOTAPI_REQUEST_TIMEOUT_MS>",
                "SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTES": "<SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTES>"
            }
        }
    }
}

Environment variables

  • SCREENSHOTAPI_TOKEN required secret Your ScreenshotAPI API key from https://app.screenshotapi.net
  • SCREENSHOTAPI_REQUEST_TIMEOUT_MS Request timeout in milliseconds (default 180000)
  • SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTES Max screenshot size returned inline as an image (default 3500000)

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. ScreenshotAPI MCP Server
  2. Quick Start
  3. Table of Contents
  4. Install by Client
  5. Verify It Works
  6. Tool Reference
  7. Prompt Examples
  8. Error Codes
  9. How It Works
  10. Environment Variables
  11. Building from Source
  12. Troubleshooting
  13. Links
  14. License

ScreenshotAPI MCP Server

Official MCP server for ScreenshotAPI. It gives your AI assistant 8 tools for website screenshots, URL and HTML to PDF, scrolling videos, JavaScript-aware web scraping (Markdown, text, HTML), and bulk captures. You ask in plain English and the server makes the API calls. Your assistant also gets the screenshot back as an image, so it can see the page it captured.

Works with Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, Cline, Codex, and any other MCP-compatible client.

ItemValue
Package@screenshotapinet/mcp
Transportstdio
Node.js>=18

Quick Start

  1. Sign up for ScreenshotAPI and copy your API key from the dashboard.
  2. Cursor users can install in one click:

  3. Everyone else: add this to your MCP client config (see Install by Client for the exact file path):
{
  "mcpServers": {
    "screenshotapi": {
      "command": "npx",
      "args": ["-y", "@screenshotapinet/mcp"],
      "env": {
        "SCREENSHOTAPI_TOKEN": "<YOUR_API_KEY>"
      }
    }
  }
}
  1. Restart your client.
  2. Test it: ask **"Take a screenshot of https://example.com"**

Table of Contents

Install by Client

Requirements
  • Node.js 18 or later
  • npx available in your terminal
  • A ScreenshotAPI API key (sign up)
Claude Desktop

Add to claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "screenshotapi": {
      "command": "npx",
      "args": ["-y", "@screenshotapinet/mcp"],
      "env": {
        "SCREENSHOTAPI_TOKEN": "<YOUR_API_KEY>"
      }
    }
  }
}

Restart Claude Desktop after saving.

Claude Code
claude mcp add screenshotapi --env SCREENSHOTAPI_TOKEN=<YOUR_API_KEY> -- npx -y @screenshotapinet/mcp

Start a new Claude Code session after adding the server.

Cursor

One-click install:

Or add to .cursor/mcp.json manually:

{
  "mcpServers": {
    "screenshotapi": {
      "command": "npx",
      "args": ["-y", "@screenshotapinet/mcp"],
      "env": {
        "SCREENSHOTAPI_TOKEN": "<YOUR_API_KEY>"
      }
    }
  }
}

Restart Cursor after saving.

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "screenshotapi": {
      "command": "npx",
      "args": ["-y", "@screenshotapinet/mcp"],
      "env": {
        "SCREENSHOTAPI_TOKEN": "<YOUR_API_KEY>"
      }
    }
  }
}

Restart Windsurf after saving.

VS Code / GitHub Copilot

Add to your VS Code settings.json:

{
  "mcp": {
    "servers": {
      "screenshotapi": {
        "command": "npx",
        "args": ["-y", "@screenshotapinet/mcp"],
        "env": {
          "SCREENSHOTAPI_TOKEN": "<YOUR_API_KEY>"
        }
      }
    }
  }
}

Restart VS Code after saving.

Cline

Open MCP Servers panel → Configure → Advanced MCP Settings. Add to cline_mcp_settings.json:

{
  "mcpServers": {
    "screenshotapi": {
      "command": "npx",
      "args": ["-y", "@screenshotapinet/mcp"],
      "env": {
        "SCREENSHOTAPI_TOKEN": "<YOUR_API_KEY>"
      }
    }
  }
}

Restart Cline after saving.

Codex CLI
codex mcp add screenshotapi --env SCREENSHOTAPI_TOKEN=<YOUR_API_KEY> -- npx -y @screenshotapinet/mcp
codex mcp list

Start a new Codex session after adding the server.

Any Other MCP Client

Use this config:

{
  "command": "npx",
  "args": ["-y", "@screenshotapinet/mcp"],
  "env": {
    "SCREENSHOTAPI_TOKEN": "<YOUR_API_KEY>"
  }
}

Verify It Works

Try these after setup:

PromptExpected tool
Take a screenshot of https://example.comtake_screenshot
Screenshot stripe.com on an iPhone-sized screen in dark modetake_screenshot with width, dark_mode
Capture the full page of https://news.ycombinator.com without adstake_screenshot with full_page, block
Save https://example.com/invoice as an A4 PDF to ./invoice.pdfgenerate_pdf with format, save_path
Read https://react.dev/learn and summarize itscrape_page
Make a 10-second scrolling GIF of https://apple.comrecord_scrolling_video
Screenshot these 5 competitor homepagesbulk_screenshots
Is bulk job 1f2e... done yet?get_bulk_status

Tool Reference

All 8 tools wrap the ScreenshotAPI REST API. The render tools (take_screenshot, generate_pdf, scrape_page, record_scrolling_video) call GET https://shot.screenshotapi.net/v3/screenshot with output=json and share the page preparation options below. Each takes either url or custom_html.

Shared render options
GroupParameters
Viewportwidth (default 1680, max 7680), height (default 876, max 4320)
Timingdelay, wait_for_event (load / domcontentloaded / networkidle), lazy_load, scroll_delay, timeout
Page manipulationcss, css_url, js, js_url, remove_selector, blur_selector, selector_to_click, click_recursion, scroll_to_element, adjust_top
Blockingblock (list: ads, tracking, cookie_banners, chat_widgets, javascript, stylesheets, images, media, fonts, text_tracks, xhr, fetch, event_source, websockets, manifest), block_specific_requests
Emulationdark_mode, grayscale (0-100), enable_incognito, user_agent, accept_languages, headers, cookies, template_id, proxy, latitude, longitude, timezone
Cachingfresh, enable_caching, ttl (screenshot and PDF only)
Storageresult_file_name, byob, storage_service, bucket_name (screenshot and PDF only)
take_screenshot

Captures a page as an image and returns the hosted image URL. The image is also returned inline so the assistant can see it. Full-page captures are the exception, since they are usually too tall to view; pass include_image=true to get them inline anyway.

ParameterRequiredDescription
urlOne ofURL to capture
custom_htmlOne ofRaw HTML to render instead of a URL
file_typeNopng (default), jpg, webp
full_pageNoCapture the whole scrollable page. Default false
retinaNo2x pixel density. Default false
image_qualityNoJPEG quality 0-100. Default 80
omit_backgroundNoTransparent background for plain-background pages (PNG only)
thumbnail_widthNoResize output to this width, keeping aspect ratio
selectorNoCapture a single element by CSS selector
clipNoCapture a rectangle: { x, y, width, height }
sizesNoCapture at several viewport sizes in one request: [{ width, height }, ...]
include_imageNoReturn the image inline. Default true, or false when full_page is set
save_pathNoAlso save the file locally

Plus all shared render options.

generate_pdf

Converts a URL or raw HTML to PDF and returns the hosted PDF URL. With no format (and no width/height), the whole page becomes one continuous PDF page.

ParameterRequiredDescription
urlOne ofURL to convert
custom_htmlOne ofRaw HTML to convert
formatNoA0–A6, Letter, Legal, Tabloid, Ledger
landscapeNoLandscape orientation. Default false
page_rangeNoKeep only these pages, e.g. 1-3
print_backgroundNoInclude background colors and images
mediaNoprint or screen CSS
save_pathNoAlso save the PDF locally

Plus all shared render options.

scrape_page

Renders the page in a real browser, so JavaScript runs first, then extracts its content. The server downloads the extracted files and returns their contents inline. A screenshot is captured in the same request.

ParameterRequiredDescription
urlOne ofURL to scrape
custom_htmlOne ofRaw HTML to process
extractNoAny of markdown, text, html, image_urls. Default markdown
include_contentNoReturn extracted contents inline. Default true
max_content_charsNoTruncate each extracted file. Default 50000

Plus viewport, timing, page manipulation, blocking, and emulation options.

record_scrolling_video

Records the browser scrolling down a page and returns the hosted video URL.

ParameterRequiredDescription
urlOne ofURL to record
custom_htmlOne ofRaw HTML to record
file_typeNomp4 (default), webm, gif
scroll_speedNoslow, normal (default), fast
durationNoSeconds, 0-60
scroll_backNoScroll back to the top at the end
start_immediatelyNoStart recording before the page finishes loading
videoNoRecord the viewport for duration seconds without scrolling
sizesNoRecord at several viewport sizes: [{ width, height }, ...], up to 10
save_pathNoAlso save the video locally (single size only)

Plus viewport, timing, page manipulation, blocking, and emulation options.

bulk_screenshots

POST https://api.screenshotapi.net/v1/bulk/json submits up to 50 URLs as one job. Paid plans only.

ParameterRequiredDescription
screenshotsYes[{ url, ...options }]. Options use raw API names (file_type, width, full_page, block_ads, ...)
defaultsNoOptions applied to every entry unless the entry overrides them
bulk_screenshots_csv

POST https://api.screenshotapi.net/v1/bulk/csv uploads a CSV with a url column. Any other column is a render option for that row. Paid plans only.

ParameterRequiredDescription
csv_pathOne ofPath to a local CSV file
csv_contentOne ofCSV text
get_bulk_status

GET https://api.screenshotapi.net/v1/bulk/csv/status returns percent_complete, successful_urls, and failed_urls for a job.

ParameterRequiredDescription
uuidYesJob uuid
download_bulk_results

GET https://api.screenshotapi.net/v1/bulk/csv/download returns one row per URL with url, status, screenshot, and error_message.

ParameterRequiredDescription
uuidYesJob uuid

Prompt Examples

Screenshots
PDFs
Scraping
Video
  • Record a slow scrolling MP4 of https://stripe.com that scrolls back to the top.
  • Make a scrolling GIF of our landing page at desktop and mobile sizes.
Bulk
  • Screenshot these 20 URLs at 1440x900 with cookie banners hidden.
  • What's the status of my bulk job, and download the results when it's done.

Error Codes

Tool calls never crash the server. Upstream errors come back as structured tool results with error, code, message, and a guidance field, so the client can explain the problem and suggest a fix.

CodeMeaning
310Too many redirects on the target URL
400Invalid parameters (URL, file type, proxy, geolocation, CSS/JS URL, clip, template) or target SSL problems
401Missing or invalid SCREENSHOTAPI_TOKEN, or inactive subscription
402Service paused for unpaid dues or usage over twice the plan quota
403Screenshot quota used up, trial expired, or target refused the connection
404Account is not on a plan or trial
407Proxy tunnel connection failed
408Page took too long to render
429Too many requests per minute
444Target site closed the connection or returned nothing
495Target site SSL/TLS version or cipher mismatch
499This server stopped waiting for the API (see SCREENSHOTAPI_REQUEST_TIMEOUT_MS)
500ScreenshotAPI internal error, safe to retry
502Server could not reach ScreenshotAPI
503ScreenshotAPI or the target page is temporarily unavailable

Example error result for a missing URL:

{
  "error": "url_required",
  "code": 400,
  "message": "Provide either 'url' or 'custom_html'.",
  "guidance": "Pass a fully qualified URL including the protocol, e.g. 'https://example.com', or pass custom_html instead."
}

See the full list in the ScreenshotAPI error docs.

How It Works

This is a stdio MCP server that wraps the ScreenshotAPI REST API.

At runtime:

  1. Your MCP client starts the server process via npx.
  2. The client reads the tool list.
  3. When a prompt matches a tool, the client calls it.
  4. The server validates inputs, calls ScreenshotAPI with output=json, and returns structured JSON with the hosted file URL.
  5. For screenshots, the server also downloads the image and returns it inline. For scraping, it downloads the extracted Markdown, text, or HTML and returns the contents.

The API key is read from the environment on each call and sent as the token parameter. The server strips the token from every response before it reaches the model. Requests with very long values, such as large custom_html, are sent as a POST with a JSON body to avoid URL length limits.

Environment Variables

VariableRequiredDefaultDescription
SCREENSHOTAPI_TOKENYesYour ScreenshotAPI API key
SCREENSHOTAPI_REQUEST_TIMEOUT_MSNo180000Upstream request timeout in ms
SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTESNo3500000Largest screenshot returned inline to the model

Building from Source

git clone https://github.com/Screenshot-API/screenshot-mcp.git
cd screenshot-mcp
npm install
npm run build

Run it directly:

SCREENSHOTAPI_TOKEN=<YOUR_KEY> node dist/cli.js

Inspect with the MCP Inspector:

SCREENSHOTAPI_TOKEN=<YOUR_KEY> npx @modelcontextprotocol/inspector node dist/cli.js

Troubleshooting

Client uses an old tool list after updating: Restart the client and confirm it loaded the latest npm version.

401 token_required: SCREENSHOTAPI_TOKEN is not set in your MCP client config's env block.

401 invalid_token: The key is wrong, or it was rolled in the dashboard. Copy the current key from the dashboard.

Screenshot comes back as a URL but not an image: The image is larger than SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTES, or it was a full_page capture. Use thumbnail_width, jpg with a lower image_quality, or set include_image=true.

Blank or half-loaded pages: Add delay (e.g. 3000), use wait_for_event=networkidle, or set lazy_load=true for pages with lazy images.

Cookie banners or popups in the shot: Pass block: ["cookie_banners", "ads", "chat_widgets"], or remove specific elements with remove_selector.

CAPTCHA or bot blocks: Route the request through a residential proxy. See the proxy docs.

Timeouts: Slow pages may need a higher timeout (API side, default 100000 ms) and a higher SCREENSHOTAPI_REQUEST_TIMEOUT_MS (this server, default 180000 ms). Some MCP clients also have their own tool-call timeout.

License

MIT

Frequently asked questions

What is ScreenshotAPI?

Website screenshots, URL/HTML to PDF, scrolling videos, and web scraping via ScreenshotAPI.

How do I install ScreenshotAPI?

It runs on your machine. In Claude Code: claude mcp add screenshotapi -e 'SCREENSHOTAPI_TOKEN=<your screenshotapi_token>' -e 'SCREENSHOTAPI_REQUEST_TIMEOUT_MS=<SCREENSHOTAPI_REQUEST_TIMEOUT_MS>' -e 'SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTES=<SCREENSHOTAPI_MAX_INLINE_IMAGE_BYTES>' -- npx -y @screenshotapinet/mcp@1.0.2. For other clients, paste the JSON configuration from this page into their MCP settings.

Does ScreenshotAPI need an API key?

Yes. It expects SCREENSHOTAPI_TOKEN, which you set in its configuration.

Is ScreenshotAPI open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains ScreenshotAPI?

It is published by Screenshot-API. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.