MCP Hub
Back to servers

SnapAPI MCP Server

MCP server for the SnapAPI web capture API. Take screenshots, scrape pages, extract structured data, generate PDFs, record videos, and run AI analysis on any URL — all from Claude, Cursor, VS Code, or any MCP client. 9 tools, 30+ device presets, ad/cookie blocking. Install: npx snapapi-mcp

glama
Updated
Apr 2, 2026

snapapi-mcp

MCP (Model Context Protocol) server for SnapAPI — take screenshots, scrape web pages, extract content, generate PDFs, record videos, and analyze pages directly from AI tools like Claude Desktop, Cursor, Windsurf, Cline, and Zed.

What is this?

This package runs a local MCP server that connects your AI assistant to the SnapAPI web capture API. Once configured, your AI can:

  • Take screenshots of any URL (full page, mobile, dark mode, element selection, device emulation)
  • Scrape web pages and get clean text, HTML, or link lists using a real browser
  • Extract content optimized for LLM consumption (Markdown, article, metadata, structured data)
  • Generate PDFs from URLs or HTML
  • Record videos of browser sessions with optional interaction scenarios
  • Analyze pages with AI (extract + analyze in one call)
  • Check your usage quota and account stats

Prerequisites

Quick Start

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "snapapi": {
      "command": "npx",
      "args": ["-y", "snapapi-mcp"],
      "env": {
        "SNAPAPI_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Restart Claude Desktop after saving.

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "snapapi": {
      "command": "npx",
      "args": ["-y", "snapapi-mcp"],
      "env": {
        "SNAPAPI_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Windsurf

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

{
  "mcpServers": {
    "snapapi": {
      "command": "npx",
      "args": ["-y", "snapapi-mcp"],
      "env": {
        "SNAPAPI_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Cline (VS Code)

Open Cline settings → MCP Servers → Add Server:

  • Command: npx
  • Args: -y snapapi-mcp
  • Environment: SNAPAPI_API_KEY=sk_live_your_key_here

VS Code (native MCP support)

Add to .vscode/mcp.json in your workspace (or your user settings):

{
  "servers": {
    "snapapi": {
      "command": "npx",
      "args": ["-y", "snapapi-mcp"],
      "env": {
        "SNAPAPI_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Zed

Add to ~/.config/zed/settings.json:

{
  "context_servers": {
    "snapapi": {
      "command": {
        "path": "npx",
        "args": ["-y", "snapapi-mcp"],
        "env": {
          "SNAPAPI_API_KEY": "sk_live_your_key_here"
        }
      }
    }
  }
}

Automated Installer

Run the included helper script:

# For Claude Desktop
./install-mcp.sh claude

# For Cursor
./install-mcp.sh cursor

# For Windsurf
./install-mcp.sh windsurf

Available Tools

ping

Verify that SnapAPI is reachable and your API key is valid. No parameters required.

Example prompt: "Ping SnapAPI to check it's working"


screenshot

Take a screenshot of any URL with extensive customization.

Parameters:

ParameterTypeRequiredDescription
urlstring*URL to capture
htmlstring*Raw HTML to render (alternative to url)
markdownstring*Markdown to render (alternative to url)
formatstringnopng, jpeg, webp, or avif (default: png)
qualitynumberno1–100 for jpeg/webp (default: 80)
widthnumbernoViewport width (default: 1280)
heightnumbernoViewport height (default: 800)
fullPagebooleannoCapture full scrollable page
selectorstringnoCSS selector for element capture
delaynumbernoWait ms after page load before capture
waitUntilstringnoload, domcontentloaded, or networkidle
darkModebooleannoDark color scheme
blockAdsbooleannoBlock ad networks
blockCookieBannersbooleannoBlock cookie popups
cssstringnoCustom CSS to inject
javascriptstringnoCustom JS to execute
devicestringnoDevice preset (e.g. iphone-15-pro) — use list_devices to see all
hideSelectorsstring[]noElements to hide before capture

*At least one of url, html, or markdown must be provided.

Example prompts:


scrape

Scrape web page content using a real browser (JavaScript-rendered pages work).

Parameters:

ParameterTypeRequiredDescription
urlstringyesURL to scrape
typestringnotext (Markdown), html, or links (default: text)
pagesnumbernoPages to follow, 1–10 (default: 1)
waitMsnumbernoExtra wait time in ms after page load
blockResourcesbooleannoBlock images/media/fonts to speed up
localestringnoBrowser locale (e.g. en-US)
premiumProxybooleannoUse residential proxy to bypass blocks

Example prompts:


extract

Extract clean, structured content optimized for LLMs.

Parameters:

ParameterTypeRequiredDescription
urlstringyesURL to extract from
typestringnomarkdown, text, html, article, links, images, metadata, or structured (default: markdown)
selectorstringnoScope extraction to a CSS element
waitForstringnoWait for CSS selector before extracting
maxLengthnumbernoMax character length
cleanOutputbooleannoRemove noise (default: true)
blockAdsbooleannoBlock ad networks
blockCookieBannersbooleannoBlock cookie popups
fieldsobjectnoCustom field extraction map

Example prompts:


pdf

Generate a PDF from a URL or HTML.

Parameters:

ParameterTypeRequiredDescription
urlstring*URL to convert to PDF
htmlstring*HTML to convert to PDF (alternative to url)
pdfOptions.pageSizestringnoa4, a3, a5, letter, legal, tabloid (default: a4)
pdfOptions.landscapebooleannoLandscape orientation
pdfOptions.printBackgroundbooleannoInclude background graphics
pdfOptions.scalenumbernoScale factor 0.1–2
pdfOptions.marginTopstringnoTop margin, e.g. 1cm
pdfOptions.marginBottomstringnoBottom margin
pdfOptions.marginLeftstringnoLeft margin
pdfOptions.marginRightstringnoRight margin
delaynumbernoWait ms after page load
waitUntilstringnoload, domcontentloaded, or networkidle

*At least one of url or html must be provided.

Example prompts:


analyze

Extract content from a URL and analyze it with an AI model in one call.

Parameters:

ParameterTypeRequiredDescription
urlstringyesURL to analyze
promptstringyesAnalysis instruction for the AI
extractTypestringnomarkdown, text, article, or structured (default: article)
maxLengthnumbernoMax characters of content to pass to AI (default: 20000)

Example prompts:


video

Record a browser session as a video (WebM).

Parameters:

ParameterTypeRequiredDescription
urlstringyesURL to record
durationnumbernoRecording duration in seconds, 1–60 (default: 5)
widthnumbernoViewport width (default: 1280)
heightnumbernoViewport height (default: 800)
scenariostringnoJavaScript to run during recording (scroll, click, etc.)
delaynumbernoWait ms before starting recording
waitUntilstringnoload, domcontentloaded, or networkidle
darkModebooleannoDark color scheme
blockAdsbooleannoBlock ad networks
blockCookieBannersbooleannoBlock cookie popups
devicestringnoDevice preset — use list_devices to see all

Example prompts:


get_usage

Check your SnapAPI quota and monthly statistics. No parameters required.

Example prompts:

  • "How many SnapAPI requests do I have left this month?"
  • "Show me my SnapAPI usage"

list_devices

List all available device presets for screenshot and video emulation. No parameters required.

Example prompt: "What device presets are available for screenshots?"


Environment Variables

VariableRequiredDescription
SNAPAPI_API_KEYYesYour SnapAPI API key (sk_live_...)
SNAPAPI_BASE_URLNoAPI base URL (default: https://api.snapapi.pics)

Development

# Clone the repo
git clone https://github.com/Sleywill/snapapi-mcp.git
cd snapapi-mcp

# Install dependencies
npm install

# Build
npm run build

# Run locally (reads MCP protocol from stdin)
SNAPAPI_API_KEY=sk_live_your_key node dist/index.js

Troubleshooting

"SNAPAPI_API_KEY environment variable is required" Make sure the env block in your MCP config includes your API key. Check it starts with sk_live_.

Tools not appearing in Claude Desktop Restart Claude Desktop after saving the config. Check MCP logs at:

  • macOS: ~/Library/Logs/Claude/mcp*.log
  • Windows: %APPDATA%\Claude\logs\mcp*.log

npx takes too long on first run Use "args": ["-y", "snapapi-mcp"] — the -y flag auto-confirms the install prompt without interaction.

screenshot / scrape returns an error

  • Verify your API key is valid at app.snapapi.pics/dashboard
  • Check your remaining quota with the get_usage tool
  • For JavaScript-heavy pages, try adding "waitUntil": "networkidle" and a "delay" value

analyze tool returns an error The analyze endpoint requires Anthropic API credits on the SnapAPI backend. Use the extract tool as a fallback to fetch the page content and analyze it yourself.


License

MIT

Reviews

No reviews yet

Sign in to write a review