Skip to main content
Glama
BaiqingL

Latchshot for Claude Code

by BaiqingL
README.md
# Latchshot for Claude Code

Give Claude Code two bounded tools for public-page artifacts without installing a browser locally:

- `capture_page` returns a PNG, JPEG, or PDF plus render diagnostics.
- `get_usage` reads the current plan and successful-render allowance without consuming quota.

The plugin contains no executable code. It connects Claude Code directly to Latchshot's hosted MCP Streamable HTTP endpoint and reads the API key from the `LATCHSHOT_API_KEY` environment variable when Claude Code starts.

## Requirements

- Claude Code 2.1.154 or newer for explicit opt-in plugin enablement.
- A [recurring Free-plan Latchshot key](https://latchshot.fly.dev/?intent=claudecode#trial). The Free plan includes 100 successful renders per UTC calendar month and requires no credit card.

## Install from this repository

Export the key in the shell that launches Claude Code, add this repository as a marketplace, install the plugin, then enable it:

```sh
export LATCHSHOT_API_KEY='ls_live_replace_me'
claude plugin marketplace add BaiqingL/latchshot-claude-code
claude plugin install latchshot@latchshot
claude plugin enable latchshot@latchshot
```

Restart Claude Code from the same environment or run `/reload-plugins`, then inspect `/mcp`. The server should expose `capture_page` and `get_usage` under the plugin-scoped Latchshot server name. Keep the key in a shell secret manager or protected environment configuration; do not commit it to the repository or a project `.mcp.json` file.

The plugin is not yet represented as accepted by Anthropic's community marketplace. If it is approved later, the repository will document the exact community install command.

## Example

Ask Claude:

> Use Latchshot to capture https://example.com as an 800 by 450 PNG. Report the byte count, render time, navigation state, fonts state, scripts state, and remaining quota.

A controlled integration check should use a disposable key and one public, non-sensitive URL. Artifact size and render time vary by page.

## Boundaries

- Public HTTP and HTTPS targets on ports 80 and 443 only.
- Private, loopback, link-local, metadata, credential-bearing, mixed public/private DNS, and non-web-port targets are rejected.
- No cookies, sessions, arbitrary scripts, CAPTCHA solving, proxy rotation, or anti-bot bypass.
- The plugin exposes no payment or plan-upgrade tool. Failed direct captures do not consume quota, and automatic overages are disabled.
- Target pages can observe a browser visit from Latchshot infrastructure. Capture only pages you are authorized to use.

## Validate

```sh
npm test
npx --yes @anthropic-ai/claude-code@2.1.215 \
  plugin validate ./plugins/latchshot --strict
npx --yes @anthropic-ai/claude-code@2.1.215 \
  plugin validate . --strict
```

The repository is MIT licensed. The hosted Latchshot service remains a separate proprietary, quota-metered product.