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
README
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
- Node.js 18 or later
- A SnapAPI API key — get one at app.snapapi.pics
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:
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | * | URL to capture |
html |
string | * | Raw HTML to render (alternative to url) |
markdown |
string | * | Markdown to render (alternative to url) |
format |
string | no | png, jpeg, webp, or avif (default: png) |
quality |
number | no | 1–100 for jpeg/webp (default: 80) |
width |
number | no | Viewport width (default: 1280) |
height |
number | no | Viewport height (default: 800) |
fullPage |
boolean | no | Capture full scrollable page |
selector |
string | no | CSS selector for element capture |
delay |
number | no | Wait ms after page load before capture |
waitUntil |
string | no | load, domcontentloaded, or networkidle |
darkMode |
boolean | no | Dark color scheme |
blockAds |
boolean | no | Block ad networks |
blockCookieBanners |
boolean | no | Block cookie popups |
css |
string | no | Custom CSS to inject |
javascript |
string | no | Custom JS to execute |
device |
string | no | Device preset (e.g. iphone-15-pro) — use list_devices to see all |
hideSelectors |
string[] | no | Elements to hide before capture |
*At least one of url, html, or markdown must be provided.
Example prompts:
- "Take a screenshot of https://example.com in dark mode"
- "Screenshot https://github.com on an iPhone 15 Pro"
- "Capture a full-page screenshot of https://news.ycombinator.com with ads blocked"
- "Render this HTML as a screenshot:
<h1>Hello</h1>"
scrape
Scrape web page content using a real browser (JavaScript-rendered pages work).
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | yes | URL to scrape |
type |
string | no | text (Markdown), html, or links (default: text) |
pages |
number | no | Pages to follow, 1–10 (default: 1) |
waitMs |
number | no | Extra wait time in ms after page load |
blockResources |
boolean | no | Block images/media/fonts to speed up |
locale |
string | no | Browser locale (e.g. en-US) |
premiumProxy |
boolean | no | Use residential proxy to bypass blocks |
Example prompts:
- "Scrape the text content from https://example.com/blog"
- "Get all links from https://news.ycombinator.com"
- "Scrape https://example.com/pricing as HTML"
extract
Extract clean, structured content optimized for LLMs.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | yes | URL to extract from |
type |
string | no | markdown, text, html, article, links, images, metadata, or structured (default: markdown) |
selector |
string | no | Scope extraction to a CSS element |
waitFor |
string | no | Wait for CSS selector before extracting |
maxLength |
number | no | Max character length |
cleanOutput |
boolean | no | Remove noise (default: true) |
blockAds |
boolean | no | Block ad networks |
blockCookieBanners |
boolean | no | Block cookie popups |
fields |
object | no | Custom field extraction map |
Example prompts:
- "Extract the article content from https://example.com/post as markdown"
- "Get the metadata (title, description, OG image) from https://example.com"
- "Extract price and rating from https://example.com/product"
Generate a PDF from a URL or HTML.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | * | URL to convert to PDF |
html |
string | * | HTML to convert to PDF (alternative to url) |
pdfOptions.pageSize |
string | no | a4, a3, a5, letter, legal, tabloid (default: a4) |
pdfOptions.landscape |
boolean | no | Landscape orientation |
pdfOptions.printBackground |
boolean | no | Include background graphics |
pdfOptions.scale |
number | no | Scale factor 0.1–2 |
pdfOptions.marginTop |
string | no | Top margin, e.g. 1cm |
pdfOptions.marginBottom |
string | no | Bottom margin |
pdfOptions.marginLeft |
string | no | Left margin |
pdfOptions.marginRight |
string | no | Right margin |
delay |
number | no | Wait ms after page load |
waitUntil |
string | no | load, domcontentloaded, or networkidle |
*At least one of url or html must be provided.
Example prompts:
- "Generate a PDF of https://example.com/report in landscape A4"
- "Convert this HTML to a PDF with 2cm margins"
analyze
Extract content from a URL and analyze it with an AI model in one call.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | yes | URL to analyze |
prompt |
string | yes | Analysis instruction for the AI |
extractType |
string | no | markdown, text, article, or structured (default: article) |
maxLength |
number | no | Max characters of content to pass to AI (default: 20000) |
Example prompts:
- "Analyze https://example.com/article — what are the main arguments?"
- "Extract all product specs from https://example.com/product"
- "What is the sentiment of this news article: https://example.com/news"
video
Record a browser session as a video (WebM).
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | yes | URL to record |
duration |
number | no | Recording duration in seconds, 1–60 (default: 5) |
width |
number | no | Viewport width (default: 1280) |
height |
number | no | Viewport height (default: 800) |
scenario |
string | no | JavaScript to run during recording (scroll, click, etc.) |
delay |
number | no | Wait ms before starting recording |
waitUntil |
string | no | load, domcontentloaded, or networkidle |
darkMode |
boolean | no | Dark color scheme |
blockAds |
boolean | no | Block ad networks |
blockCookieBanners |
boolean | no | Block cookie popups |
device |
string | no | Device preset — use list_devices to see all |
Example prompts:
- "Record a 10-second video of https://example.com scrolling down"
- "Record https://example.com on an iPhone 15 Pro"
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
| Variable | Required | Description |
|---|---|---|
SNAPAPI_API_KEY |
Yes | Your SnapAPI API key (sk_live_...) |
SNAPAPI_BASE_URL |
No | API 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_usagetool - 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。