# Ask your AI (MCP)

Connect your AI tool once, then ask for screenshots in plain words. No code. It works through MCP, the standard way AI tools reach outside services.

## What you need

- An API key. Create one in the [dashboard](https://localscreenshot.com/dashboard), under **Connect**.
- An AI tool that can add a remote MCP server over HTTP and send a header with it.

Every tool needs the same two things: the address of our server, and your key in the `Authorization` header. There is no sign-in window to go through.

**MCP server**

```text
Address    https://api.localscreenshot.com/mcp
Transport  HTTP
Header     Authorization: Bearer $LOCALSCREENSHOT_API_KEY
```

## Connect your tool

The lines below read your key from the environment variable `LOCALSCREENSHOT_API_KEY` where the tool allows it. Set it first:

```bash
export LOCALSCREENSHOT_API_KEY="your key"
```

The dashboard shows the same lines with your own key already in place, ready to copy.

### Claude Code

One command in your terminal.

```bash
claude mcp add --transport http localscreenshot https://api.localscreenshot.com/mcp \
  --header "Authorization: Bearer $LOCALSCREENSHOT_API_KEY"
```

### Cursor

Paste into .cursor/mcp.json. Cursor reads the key from your environment.

```json
{
  "mcpServers": {
    "localscreenshot": {
      "url": "https://api.localscreenshot.com/mcp",
      "headers": { "Authorization": "Bearer ${env:LOCALSCREENSHOT_API_KEY}" }
    }
  }
}
```

### Codex

One command in your terminal. Codex reads the key from your environment.

```bash
# Codex sends it as "Authorization: Bearer $LOCALSCREENSHOT_API_KEY"
codex mcp add localscreenshot --url https://api.localscreenshot.com/mcp \
  --bearer-token-env-var LOCALSCREENSHOT_API_KEY
```

### Gemini CLI

One command in your terminal.

```bash
gemini mcp add --transport http \
  --header "Authorization: Bearer $LOCALSCREENSHOT_API_KEY" \
  localscreenshot https://api.localscreenshot.com/mcp
```

### VS Code

Paste into .vscode/mcp.json. VS Code asks for your key once and keeps it.

```json
{
  "inputs": [
    { "type": "promptString", "id": "localscreenshot-key", "description": "localscreenshot API key", "password": true }
  ],
  "servers": {
    "localscreenshot": {
      "type": "http",
      "url": "https://api.localscreenshot.com/mcp",
      "headers": { "Authorization": "Bearer ${input:localscreenshot-key}" }
    }
  }
}
```

### Cline

Paste into cline_mcp_settings.json, with your key in place of the variable. This tool does not read environment variables in its settings.

```json
{
  "mcpServers": {
    "localscreenshot": {
      "type": "streamableHttp",
      "url": "https://api.localscreenshot.com/mcp",
      "headers": { "Authorization": "Bearer $LOCALSCREENSHOT_API_KEY" }
    }
  }
}
```

### Zed

Paste into your Zed settings, with your key in place of the variable. This tool does not read environment variables in its settings.

```json
{
  "context_servers": {
    "localscreenshot": {
      "url": "https://api.localscreenshot.com/mcp",
      "headers": { "Authorization": "Bearer $LOCALSCREENSHOT_API_KEY" }
    }
  }
}
```

### Other clients

For a client that takes a server address and a header.

```text
Address:  https://api.localscreenshot.com/mcp
Header:   Authorization: Bearer $LOCALSCREENSHOT_API_KEY
```

### Not ready yet

We have not checked how these connect, so we show no command for them: ChatGPT, Claude, Copilot, Windsurf, Replit, v0, Perplexity, Le Chat, DeepSeek, Kimi, Qwen, n8n, Make, Zapier, LangChain, CrewAI.

## Then ask

> "Take a screenshot of wikipedia.org on an iPhone."

A few more things you can say:

- "Take a full page screenshot of example.com without the cookie banner."
- "Save example.com as a PDF."
- "Show me only the pricing table of example.com/pricing."
- "How many credits do I have left?"

## What your AI gets

Three tools:

| Tool | What it does |
| --- | --- |
| `take_screenshot` | Takes the screenshot and returns the image, the page title, its final address and status, and the credits left. |
| `list_countries` | Lists the countries a screenshot can be taken from. |
| `get_credits` | Says how many credits are left. |

`take_screenshot` accepts the same options as the API, listed on [Take a screenshot](https://docs.localscreenshot.com/take), except `async` and `response`: the server waits for the picture and decides how to hand it back.

- The image is scaled down to 1,568 pixels wide unless you ask for another `max_width`. That keeps it readable for a vision model without spending tokens for nothing.
- A PDF is not shown as a picture: your AI gets a short-lived link to download it.
- A very large image (over 4 MB) is not attached either: your AI gets its link.
- An error comes back as a plain sentence with its code, so your AI can tell you what happened. See [Errors](https://docs.localscreenshot.com/errors).

## What it costs

The same as the API: 1 credit for a screenshot, 2 from a chosen country. A failed screenshot is not charged. The limits are per account, whichever way you come in.

> **What it does not do.** Your AI cannot use it to sign in to a website, solve a CAPTCHA or get past a paywall. It reads public pages only.
