# Automation

Workflow builders can take screenshots in two ways: through our MCP server, when the platform has an MCP client, or with one plain HTTP request to the API.

## Through MCP

Use this when an AI step of your workflow should decide when to take a screenshot.

### n8n

Add an MCP Client Tool node to your AI Agent. Write your key in place of `$LOCALSCREENSHOT_API_KEY`.

```text
1. Add an "MCP Client Tool" node to your AI Agent
2. Endpoint: https://api.localscreenshot.com/mcp
3. Authentication: Bearer
   $LOCALSCREENSHOT_API_KEY
4. Tools to Include: All
```

From its documentation, not tried by us yet. Source: [docs.n8n.io](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/).

### Zapier

Add an MCP Client connection, then use its Run Tool action. Write your key in place of `$LOCALSCREENSHOT_API_KEY`.

```text
1. On the Apps page, click "+ Add connection" and search for MCP Client
2. Server URL: https://api.localscreenshot.com/mcp
3. Transport: Streamable HTTP
4. Bearer Token
   $LOCALSCREENSHOT_API_KEY
5. In your Zap, use the "Run Tool" action
```

From its documentation, not tried by us yet. Source: [help.zapier.com](https://help.zapier.com/hc/en-us/articles/38777069364109).

### Make

Add an MCP Client module to your scenario and create a connection. Write your key in place of `$LOCALSCREENSHOT_API_KEY`.

```text
1. Add an MCP Client module ("Call a tool") and click "Create a connection"
2. In the MCP Server field, click "+ New MCP Server"
3. URL: https://api.localscreenshot.com/mcp
4. API Key / Access token
   $LOCALSCREENSHOT_API_KEY
5. Save
```

From its documentation, not tried by us yet. Source: [apps.make.com](https://apps.make.com/c5ZhYquO55e90hoCJ0rzt).

## With one HTTP request

Every automation platform has a step that sends an HTTP request. That is all the API needs, and it works even where there is no MCP client.

`GET` `/v1/screenshot`

Set the step up like this:

**HTTP request step**

```text
Method   GET
URL      https://api.localscreenshot.com/v1/screenshot?url=https://example.com&response=json
Header   Authorization: Bearer $LOCALSCREENSHOT_API_KEY
```

With `response=json` the answer is a JSON object. The link to the picture is in `image.url`: pass it to your next step. That link is short-lived, 15 minutes, so download the file in the same run if you need to keep it. Without `response=json`, the answer is the image itself.

Add options to the address, for example `&full_page=true&format=webp`. They are all listed on [Take a screenshot](https://docs.localscreenshot.com/take).

For a page that is slow to load, or when your platform has a short timeout, ask in the background with `async=true` and read the result later: see [Run in the background](https://docs.localscreenshot.com/async).

> **Keep your key in the platform's secret store.** Every platform above has one (credentials, connections, secrets). Do not paste the key into a step that other people can read.
