# OpenScreenShot MCP server

> Captures website screenshots as PNG images using a local Chrome instance or a hosted cloud service.

- Repository: https://github.com/PGHQdev/OpenScreenShot
- Page: https://hostedmcp.org/servers/pghqdev/openscreenshot
- Transport: stdio, remote
- Stars: 94
- License: MIT
- Latest version: 2.5.2

## Install

### Claude Code

```sh
claude mcp add --env 'OPENSCREENSHOT_API_KEY=<YOUR_OPENSCREENSHOT_API_KEY>' openscreenshot -- npx -y openscreenshot
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "openscreenshot": {
      "command": "npx",
      "args": [
        "-y",
        "openscreenshot"
      ],
      "env": {
        "OPENSCREENSHOT_API_KEY": "<YOUR_OPENSCREENSHOT_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "openscreenshot": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "openscreenshot"
      ],
      "env": {
        "OPENSCREENSHOT_API_KEY": "<YOUR_OPENSCREENSHOT_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"openscreenshot","type":"stdio","command":"npx","args":["-y","openscreenshot"],"env":{"OPENSCREENSHOT_API_KEY":"<YOUR_OPENSCREENSHOT_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "openscreenshot": {
      "command": "npx",
      "args": [
        "-y",
        "openscreenshot"
      ],
      "env": {
        "OPENSCREENSHOT_API_KEY": "<YOUR_OPENSCREENSHOT_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add openscreenshot --env 'OPENSCREENSHOT_API_KEY=<YOUR_OPENSCREENSHOT_API_KEY>' -- npx -y openscreenshot
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.openscreenshot]
command = "npx"
args = ["-y", "openscreenshot"]

[mcp_servers.openscreenshot.env]
OPENSCREENSHOT_API_KEY = "<YOUR_OPENSCREENSHOT_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'OPENSCREENSHOT_API_KEY=<YOUR_OPENSCREENSHOT_API_KEY>' openscreenshot npx -- -y openscreenshot
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "openscreenshot": {
      "command": "npx",
      "args": [
        "-y",
        "openscreenshot"
      ],
      "env": {
        "OPENSCREENSHOT_API_KEY": "<YOUR_OPENSCREENSHOT_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `OPENSCREENSHOT_API_KEY` | no | yes | API key for OpenScreenShot Cloud, used with cloud: true. Not needed for local captures. |
| `CHROME_PATH` | no | no | Path to a Chrome, Chromium, or Edge executable. Leave unset to auto-detect. |
| `OPENSCREENSHOT_CLOUD_URL` | no | no | OpenScreenShot Cloud base URL for cloud: true. Defaults to https://cloud.openscreenshot.app. |

## Tools (1)

- `capture_screenshot`: Capture a PNG screenshot of a public web page via the system Chrome, or on OpenScreenShot Cloud with cloud: true. Use redact to cover elements, text patterns, or rectangles with black boxes before the screenshot is taken, in either mode. The capture fails with no image if a selector matches nothing or the page changes during the capture.

## FAQ

### Does OpenScreenShot require an account or API key?

No, it is local by default with no account or API key required. Using OpenScreenShot Cloud is optional.

### Can the tool capture pages that require a login?

No, it cannot see your cookies or signed-in sessions; it only captures what a signed-out visitor can see. For signed-in pages, you should use their browser extension.

### What browsers are supported for local captures?

You need Google Chrome, Chromium, or Microsoft Edge installed on your machine.

### How does the redaction feature work?

It places black boxes over specific CSS selectors, text patterns (like emails or secrets), or defined pixel rectangles before the screenshot is taken.
