Install AutoKap
AutoKap is an MCP server: pick your IDE, paste a one-liner, your AI assistant gets the AutoKap tools. The bundled CLI binary stays available for CI / Cloud Run pipelines.
Pick your IDE — one command
Each tab includes a one-liner that installs the MCP server AND embeds your API key in a single step. After pasting, restart your IDE. From any chat you'll be able to call autokap_list_projects, autokap_start_capture, and the rest.
Run this in your terminal
npx -y @autokap/mcp@latest install --ide claude-code --key ak_cli_xxxConfig file: ~/.claude.json
Or paste this JSON into the config file
{
"mcpServers": {
"autokap": {
"command": "npx",
"args": [
"-y",
"@autokap/mcp@latest"
],
"env": {
"AUTOKAP_API_KEY": "ak_cli_xxx"
}
}
}
}Notes
Writes ~/.claude.json with the autokap MCP entry. After login, this command will contain your key automatically.
Sign in to autokap.app/api-keys to get a one-liner pre-filled with your real API key.
MCP vs CLI — when do you need which?
MCP server (recommended) — runs inside your IDE. Your AI assistant calls AutoKap tools directly from chat. This is what 99% of users want.
CLI binary (bundled, internal) — used by Recapture Cloud, by GitHub Actions, and as the underlying engine spawned by the MCP server for local captures. You normally never invoke it by hand; the only direct usage is CI pipelines (npx autokap run …, see below).
Run in CI/CD
The official CI/CD path is Recapture Cloud. Enable auto-recapture on the presets you want refreshed, generate a webhook secret from the project Recapture page, then call the signed webhook after deployment. CI does not run the AutoKap CLI binary and does not need an AutoKap API key.
BODY='{}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$AUTOKAP_WEBHOOK_SECRET" -binary | xxd -p -c 256)
curl -X POST "https://autokap.app/api/webhooks/cloud-recapture/<project-id>" \
-H "Content-Type: application/json" \
-H "X-AutoKap-Signature: sha256=$SIG" \
-d "$BODY"Before wiring the workflow, create project environments in the project settings page. Recapture Cloud always captures the public prod URL. In each preset editor, turn on Auto-recapture on deploy only for assets that should refresh automatically.
Recapture Cloud reserves credits at launch and refunds them automatically if the worker crashes before completion.
GitHub Actions webhook example
name: AutoKap recapture
on:
push:
branches: [main]
workflow_dispatch:
jobs:
recapture:
runs-on: ubuntu-latest
env:
AUTOKAP_WEBHOOK_SECRET: ${{ secrets.AUTOKAP_WEBHOOK_SECRET }}
AUTOKAP_PROJECT_ID: ${{ secrets.AUTOKAP_PROJECT_ID }}
steps:
- run: |
BODY='{}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$AUTOKAP_WEBHOOK_SECRET" -binary | xxd -p -c 256)
curl -X POST "https://autokap.app/api/webhooks/cloud-recapture/$AUTOKAP_PROJECT_ID" \
-H "Content-Type: application/json" \
-H "X-AutoKap-Signature: sha256=$SIG" \
-d "$BODY"The local CLI binary is still useful for debugging a single preset from your machine, but it is not the CI/CD recapture path.
AUTOKAP_API_KEY=ak_cli_... npx -y autokap@latest run <preset-id> --env stagingPresets that need authentication should use a project credentials account or session profile saved from the dashboard. For local clip debugging, install ffmpeg and fallback fonts if your app renders CJK, emoji, or special symbols.
CLI binary reference
The full CLI command set, kept short on purpose. CI pipelines and Cloud Run hit these directly; everything else goes through MCP.
| Command | Description |
|---|---|
| autokap login <key> | Authenticate with your API key (used by Cloud Run + CI; from the IDE, call autokap_authenticate via MCP instead) |
| autokap run <preset-id> --env local | Run a preset capture using local Playwright (also spawned by autokap_start_capture from the MCP server) |
| autokap auto-recapture --project <project-id> --env local | Run every preset enabled for Recapture Cloud in a project (the canonical surface for Cloud Run + CI; MCP exposes autokap_start_auto_recapture for end users) |
| autokap doctor | Run environment diagnostics (Node version, config, API key validity, Chromium cache, ffmpeg) |
| autokap --version | Show the installed version |