← Back to home

AI access methods

Three ways — none require manually copying secrets. Authorize once in the browser.

Unified entry · let AI choose capabilities

When you are not sure whether to use deploy, user auth, or a future capability, send:

Choose and use PocketBay capabilities based on my needs. Capability directory: https://pocketbay.com/ai

AI will query the capability directory first, then read the specific runbook. Directory: /ai

Method 1 · one-line (zero config, recommended)

Send this to your AI coding agent (Cursor / Claude Code / Codex, etc.):

Please deploy the current project to PocketBay. Deployment guide: https://pocketbay.com/deploy

AI fetches the link, reads the deployment runbook, creates a pairing session, and gives you an authorization link. After you approve, it packages, uploads, and builds; on failure it reads logs and repair guidance, updates code with your consent, and retries up to 3 times.

Visual guide: /deploy;machine-readable runbook: /api/deploy/instructions

One-line PocketBay user auth

When your app needs login or per-user data, send this to AI:

Add PocketBay user auth to the current project. Integration guide: https://pocketbay.com/app-auth

AI picks the correct identity API for static or dynamic projects, updates data isolation, and reminds you to redeploy and enable project auth.

Visual entry: /app-auth

Method 2 · CLI

pip install pocketbay
cd your-project
# framework is chosen by AI after analysis, e.g. nextjs:
pocketbay deploy --framework nextjs

First run prints an authorization link — click once (same directory is authorized later). On success you get the live URL. AI can also invoke it directly: failures exit non-zero with build logs so AI can fix and rerun.

Method 3 · MCP Server

After install, add one stdio server in your AI client's MCP config:

pip install "pocketbay[mcp]"
{
  "mcpServers": {
    "pocketbay": {
      "command": "pocketbay-mcp"
    }
  }
}

Tools: start_deploy → check_authorized → finish_deploy → get_status (failure self-heal loop).

Deployment conventions