@autokap/mcp
v1.8.7
Published
AutoKap MCP server — exposes AutoKap tools to MCP clients (Claude Code, Cursor, Codex, Windsurf, etc.)
Readme
@autokap/mcp
The official AutoKap MCP (Model Context Protocol) server. Lets AI coding assistants drive AutoKap — listing projects, creating presets, starting captures, fetching usage — directly from their IDE chat.
Install
# Claude Code (one-liner — initial install)
claude mcp add autokap -- npx -y @autokap/mcpPer-IDE installer (Cursor / Windsurf / Cline / Continue / VS Code)
The MCP package ships an installer that writes the autokap entry into the
IDE config in one step and embeds the API key as an env var, so no extra
autokap_authenticate call is needed afterwards.
npx -y @autokap/mcp install --ide <name> --key ak_cli_...Supported --ide values: cursor, windsurf, cline, continue,
vscode, generic. (For Claude Code, the native claude mcp add above
is the canonical install path; reauth then rotates the embedded key.)
Manual snippet (fallback)
If you'd rather edit the IDE config by hand, drop this snippet into the
mcpServers section (path varies — see the per-IDE guides):
{
"mcpServers": {
"autokap": {
"command": "npx",
"args": ["-y", "@autokap/mcp"]
}
}
}Per-IDE guides live in the main repo
under docs/install-*.md.
Authenticate
Get an API key from autokap.app/api-keys, then from the IDE chat:
autokap_authenticate({ apiKey: "ak_cli_..." })This persists the key to ~/.autokap/config.json (chmod 0600 on POSIX).
Re-authenticate (rotate the key without reinstalling)
When an embedded key expires or is revoked, rotate it in-place — no need to
rerun the install flow. The MCP package ships a reauth subcommand that
rewrites AUTOKAP_API_KEY in the IDE config(s) it can find.
# Rotate a specific IDE config
npx -y @autokap/mcp reauth --ide <name> --key ak_cli_...
# Scan every supported IDE and rotate any that has an autokap entry
npx -y @autokap/mcp reauth --all --key ak_cli_...
# Read the key from stdin (useful in CI)
echo "ak_cli_..." | npx -y @autokap/mcp reauth --ide <name> --key-stdin
# Interactive (when stdin is a TTY)
npx -y @autokap/mcp reauthSupported --ide values: claude-code, cline, continue, cursor,
vscode, windsurf. Add --dry-run to preview changes without writing.
Tools
The server exposes 40 tools across these groups (canonical list lives in
packages/mcp/src/tools/index.ts and is asserted by
server.integration.test.ts):
- Auth & diagnostic (5):
autokap_authenticate,autokap_whoami,autokap_logout,autokap_get_setup_url,autokap_doctor - Projects & setup (6):
autokap_list_projects,autokap_get_project,autokap_create_project,autokap_update_project,autokap_set_project_environment,autokap_update_project_branding - Presets (6):
autokap_list_presets,autokap_get_preset,autokap_get_preset_info,autokap_create_preset,autokap_update_preset,autokap_delete_preset - Captures, sync listing + async run (5):
autokap_list_captures,autokap_get_usage,autokap_start_capture,autokap_check_capture,autokap_start_auto_recapture - Endpoints (3):
autokap_list_endpoints,autokap_get_endpoint,autokap_export_endpoints - Branding & logos (3):
autokap_import_branding,autokap_upload_project_logo,autokap_export_branding - Video (2):
autokap_create_video,autokap_update_video - Credentials (5):
autokap_list_credentials,autokap_create_credential,autokap_upload_credential_session,autokap_update_credential,autokap_delete_credential - Proxy (2):
autokap_register_proxy,autokap_verify_proxy - Project lifecycle (1):
autokap_finalize_project(finalizes a draft project — status draft → active) - Skill fallbacks (2):
autokap_get_skill,autokap_get_project_setup_skill(return canonical markdown skills when the client can't read MCP resources directly)
Resources & prompts
- Resource
autokap://skill/preset-spec— the canonical AutoKap preset creation skill (98 KB compiled markdown). Use this resource (or theautokap_get_skilltool fallback) to make any IDE assistant feature-aware before you ask it to author a preset. - Resource
autokap://skill/project-setup— the canonical project setup skill for creating/configuring an AutoKap project from a codebase. Use this resource (orautokap_get_project_setup_skill) for the dashboard "Setup with prompt" flow. - Prompt
autokap-create-preset()— guided workflow that points at the skill resource and the tools to call. Useful to bootstrap a new-preset session.
Async capture pattern
autokap_start_capture spawns the bundled autokap CLI binary as a detached
child process and returns a jobId in <1s. Poll with
autokap_check_capture({ jobId }). Job state is tracked in
~/.autokap/jobs/<jobId>/ (POSIX chmod 0700).
The autokap binary ships as an npm dependency of @autokap/mcp and is
resolved automatically — no second install step. The first capture installs
Chromium via Playwright on demand (≈300 MB, one-time); subsequent captures
reuse the local cache.
Env vars
| Var | Purpose |
|---|---|
| AUTOKAP_API_KEY | API key (alt to autokap_authenticate). |
| AUTOKAP_API_BASE_URL | Override the AutoKap server. Defaults to https://autokap.app. |
| AUTOKAP_CLI_BIN | Override the bundled autokap binary path (e.g. point at a globally installed copy). Rarely needed. |
| AUTOKAP_RUN_TOKEN | Cloud Run ephemeral token (CI use). |
| AUTOKAP_ALLOW_UNSAFE_SERVER_ORIGIN | Set to 1 to allow AUTOKAP_API_BASE_URL to point outside https://autokap.app / http://localhost:3000. |
| PLAYWRIGHT_BROWSERS_PATH | Honored by autokap_doctor for the Chromium cache check. |
License
ISC. © AutoKap.
