GUIDES
Use with AI agents (MCP)
APIScreenshot ships an MCP server so AI agents can screenshot the web — no glue code.
What it is
APIScreenshot ships a drop-in MCP (Model Context Protocol) server. Point an MCP-capable client — Claude Desktop, Cursor, Cline, or your own agent host — at it and the agent gets a native take_screenshot tool: it can capture any web page or rendered HTML as part of a workflow, with no custom integration code. Under the hood the tool just calls POST /v1/screenshot with your API key, so it has the same capabilities and limits as the HTTP API.
The server runs locally via npx (no global install) and reads your key from the APISCREENSHOT_API_KEY environment variable. Grab a key from Dashboard → API keys first — sign-up includes 100 free screenshots to start.
Set up in Claude Desktop
Add APIScreenshot to your claude_desktop_config.json (Claude Desktop → Settings → Developer → Edit Config), then restart Claude Desktop:
{
"mcpServers": {
"apiscreenshot": {
"command": "npx",
"args": ["-y", "apiscreenshot-mcp"],
"env": {
"APISCREENSHOT_API_KEY": "sk_live_YOUR_KEY_HERE"
}
}
}
}Replace sk_live_YOUR_KEY_HERE with your live key. Once it reconnects, ask Claude to "screenshot example.com" and it'll call the tool and show you the image.
Other MCP clients
Any MCP client that supports stdio servers works — the command and environment are the same; only the surrounding config key differs. For most clients the entry looks like:
{
"apiscreenshot": {
"command": "npx",
"args": ["-y", "apiscreenshot-mcp"],
"env": { "APISCREENSHOT_API_KEY": "sk_live_YOUR_KEY_HERE" }
}
}The screenshot tool
The server exposes a take_screenshot tool that accepts the same inputs as the HTTP endpoint — url or html plus the optional capture settings (fullPage, format, viewport, selector, and the rest). See the screenshot endpoint reference for every option, and Errors for what the agent gets back on a bad request. Each successful capture costs one credit, billed to the account that owns the key.