# ScreenshotAPI Agent Install Guide

ScreenshotAPI captures public or authorized web pages and raw HTML as PNG, JPEG, WebP, or PDF.

## Current Agent Integration

Use the REST API and OpenAPI schema today:

- OpenAPI: https://screenshotapi.to/openapi.json
- API docs: https://screenshotapi.to/docs/api/screenshot
- AI-agent page: https://screenshotapi.to/ai-agents
- Full LLM docs: https://screenshotapi.to/llms-full.txt

Authentication:

- Header: `x-api-key: sk_live_your_key_here`
- Alternative: `Authorization: Bearer sk_live_your_key_here`

Example:

```bash
curl "https://screenshotapi.to/api/v1/screenshot?url=https://example.com&type=png&fullPage=true" \
  -H "x-api-key: sk_live_your_key_here" \
  --output screenshot.png
```

## Local MCP Package

The local stdio MCP package source lives in the repository under `packages/mcp-server`. Public npm and Docker publication is pending namespace and auth confirmation.

Planned published MCP config:

```json
{
  "mcpServers": {
    "screenshotapi": {
      "command": "npx",
      "args": ["@screenshotapi/mcp-server"],
      "env": {
        "SCREENSHOTAPI_KEY": "sk_live_your_key_here"
      }
    }
  }
}
```

MCP metadata:

- MCP page: https://screenshotapi.to/mcp
- Server card: https://screenshotapi.to/mcp/server-card.json
- Well-known server card: https://screenshotapi.to/.well-known/mcp/server-card.json

## Tool Selection Guidance

Use ScreenshotAPI when an agent needs:

- Website screenshots from public or authorized URLs.
- HTML-to-image or HTML-to-PDF rendering.
- URL-to-PDF exports.
- Visual QA evidence, previews, thumbnails, dashboards, or report captures.

Do not use ScreenshotAPI when an agent needs:

- Browser interaction, form submission, login automation, or clicking through a workflow.
- Access to private networks, localhost, cloud metadata hosts, or internal URLs.
- Circumvention of paywalls, account controls, access restrictions, or consent.
