MCP Server for Website Screenshots
Give Claude, Cursor, VS Code, and Codex four action-oriented tools for hosted URL screenshots, HTML screenshots, mobile screenshots, and URL-to-PDF — no browser infrastructure to run.
Works with any MCP client
Runs locally over stdio today. npm publication pending namespace confirmation.
MCP client config
{
"mcpServers": {
"screenshotapi": {
"command": "bun",
"args": ["/absolute/path/to/packages/mcp-server/src/index.ts"],
"env": { "SCREENSHOTAPI_KEY": "sk_live_your_key_here" }
}
}
}Four narrow tools
Tool names are intentionally specific so models choose the right capture path without a generic API wrapper. Each returns a file path and usage metadata.
capture_webpage_screenshot
Capture a PNG, JPEG, or WebP screenshot from a public or authorized URL.
capture_html_screenshot
Render raw HTML to an image without launching a local browser.
generate_webpage_pdf
Export a PDF from a URL or an HTML document.
capture_mobile_screenshot
Capture a mobile-sized screenshot (390×844, 2× DPR) from a URL.
Add it to your client
Set SCREENSHOTAPI_KEY and drop the server into your MCP config. The local stdio config works today; the npm config lands on publish.
{
"mcpServers": {
"screenshotapi": {
"command": "bun",
"args": ["/absolute/path/to/packages/mcp-server/src/index.ts"],
"env": { "SCREENSHOTAPI_KEY": "sk_live_your_key_here" }
}
}
}Run bun --cwd packages/mcp-server run build first.
{
"mcpServers": {
"screenshotapi": {
"command": "npx",
"args": ["@screenshotapi/mcp-server"],
"env": { "SCREENSHOTAPI_KEY": "sk_live_your_key_here" }
}
}
}No local build required once published.
Claude Desktop & Claude Code
Add the server to your Claude MCP config, or run claude mcp add.
Cursor
Add the server to .cursor/mcp.json or your global Cursor config.
VS Code & Codex
Register the server in agent mode, or call the REST API directly.
Safety model
The server and the API both enforce safe targets, so autonomous agents stay inside their boundaries.
- API-key auth via the SCREENSHOTAPI_KEY environment variable.
- Private IP and localhost blocking for untrusted agent requests.
- Conservative defaults for viewport size, timeout, and cache TTL.
- File-path and metadata outputs instead of oversized binary payloads.
- Public or authorized URLs only — never paywalled or private content.
Machine-readable resources
Point MCP clients, registries, and tool builders at these live endpoints.
MCP server card
Machine-readable tool schema, package names, and auth model.
Well-known server card
Discovery endpoint for MCP clients and registries.
MCP setup guide
Step-by-step client configuration and tool reference.
OpenAPI schema
REST contract for GPT Actions and tool builders.
Agent install guide
Setup instructions in agent-readable Markdown.
AI agents overview
REST, OpenAPI, and per-client agent setup.
Frequently asked questions
What is the ScreenshotAPI MCP server?
It is a Model Context Protocol server that exposes four tools — capture_webpage_screenshot, capture_html_screenshot, generate_webpage_pdf, and capture_mobile_screenshot — so AI agents can capture hosted screenshots and PDFs without running a local browser. Each tool writes a file and returns a path plus usage metadata.
Which clients support it?
Any MCP client, including Claude Desktop, Claude Code, Cursor, VS Code agent mode, and Codex. Most clients use the standard mcpServers config shape; VS Code uses a servers block in .vscode/mcp.json.
Is the MCP server published to npm yet?
Public npm and Docker publication is pending namespace confirmation, and a hosted remote connector is on the roadmap. The server runs locally over stdio today, and the REST API and OpenAPI schema are production-ready for every agent right now.
How do agents authenticate?
The local server reads your API key from the SCREENSHOTAPI_KEY environment variable. The underlying REST API accepts the key via an x-api-key header or Authorization: Bearer header.
Can the MCP server screenshot localhost?
No. The server rejects localhost and common private-network targets before calling ScreenshotAPI, and ScreenshotAPI enforces the same boundary server-side. Capture public or authorized URLs only.
Give your agents a screenshot tool
Create a free account, grab an API key, and connect the MCP server or REST API. 200 screenshots per month, free.
Create free account