---
name: vibiz-get-started
area: Getting Started
supported_surfaces: [cli, skills, mcp]
description: |-
  Hand your agent this playbook to set up thelastapi. On a computer it installs the
  CLI, adds the agent skills and connects the thelastapi MCP server once; in a chat
  app (Claude, ChatGPT) it has the person add thelastapi as a connector.
title: 'Onboard your agent to thelastapi'
url: https://thelastapi.dev/get-started.md
---

# Set up thelastapi for your AI agent

Use this playbook to prepare the current agent for thelastapi: hosting, a Postgres database, sign-in, payments, email, social and AI for a new business, on one account. Set it up once; create a project only when the person asks you to build something.

## First: where are you running?

One prompt works everywhere; how you set up depends on what you can do. Decide now, then follow only your path.

## Before you start: an account

Someone with an account goes through the setup below as usual. Someone new creates theirs at https://thelastapi.dev/start, or lets the sign-in below open one on the way: tell them that up front if they say they have no account.

If the sign-in page, `vibiz login` or a tool says this email can't open a new account yet (`reason: signup_closed`), stop there. Don't retry and don't look for another way in. Tell the person, in plain words, give them the link it returns (`waitlist_url`, https://thelastapi.dev/start), and report the rest of the setup as blocked until they can sign in. If they do have an account, they may have signed in with a different email: ask them to sign out and use that one.

- **You can run shell commands on the person's computer** (Claude Code, Codex, Cursor, Windsurf, Gemini CLI, OpenCode, VS Code with Copilot, or Claude/ChatGPT desktop with a terminal tool): follow **Path A: on a computer** below (sections 1 to 3).
- **You can't** (claude.ai, ChatGPT, a phone, any chat without a terminal): follow **Path B: in a chat** right below. Don't try to install anything.

## Path B: in a chat (Claude, ChatGPT), nothing to install

1. If thelastapi tools are already available to you (`vibiz_capabilities`, `vibiz_deploy`…), call `vibiz_project_status` with no `project_id`. If it answers, setup is done: skip to **Build something**.
2. If they aren't, you can't add them yourself. Tell the person, in these words, and wait:
   - In **Claude** (claude.ai, desktop or mobile): **Settings ▸ Connectors ▸ Add custom connector**, name it `thelastapi`, URL `https://thelastapi.dev/mcp`, click **Add**, then **Connect**, sign in and click **Authorize**. Works on every plan (Free allows one custom connector); on Team and Enterprise an Owner adds it.
   - In **ChatGPT**: turn on Developer mode (**Settings ▸ Apps ▸ Advanced settings**), create an app with the URL `https://thelastapi.dev/mcp` and OAuth, then sign in. Menu names vary by plan; it needs a plan that allows custom connectors.
   - Then: "Start a new chat (or refresh the tools) and ask me again."
   - The same steps, to share as a link: https://thelastapi.dev/get-started?via=chat
3. Once connected, build in the chat: `vibiz_create_project`, then `vibiz_deploy { project_id, files: [{ path, content }] }` publishes the site (up to 300 files per call), and later edits read the live code with `vibiz_code` and send only the changed files. Secrets go through `vibiz_request_secret` (a link the person pastes into), never the chat. Bigger apps or an existing codebase belong on a computer (Path A).

Report: `◆ thelastapi is connected in this chat (<account>)`, or exactly which step the person still has to do.

## Path A: on a computer

Run section 1 once per machine. Run sections 2 and 3 once per coding agent.

For section 3, use `vibiz mcp add` first, and the route for your client below if it isn't supported. If neither covers it, adapt the closest route. If a step is blocked, record why and continue with the remaining steps.

Perform actions yourself when terminal or file access is available. Global or user-scoped installation is the default. Pause only for the person's sign-in, approval, or UI actions you cannot perform. Do not merely return commands for the person to copy. Never ask the person to paste a key into the chat.

## 1. Install the thelastapi CLI

Check for an existing installation:

```sh
vibiz --version
```

If the CLI is missing, install the latest version (Node.js 20+):

```sh
npm install --global @vibiz/cli@latest
vibiz --version
```

If a global install isn't possible, use `npx @vibiz/cli@latest` in place of `vibiz` for every command below.

Check who is signed in:

```sh
vibiz whoami
```

If no one is, run `vibiz login` (or `vibiz signup`; they are the same step). It prints a link and a short code and opens the browser. Show the person the link and ask them to sign in with their thelastapi account and click **Authorize**. If they have no thelastapi account yet, one is opened on the way; if the login refuses that, see **Before you start**. If your shell times out while it waits, run `vibiz login` again: it resumes the same code.

Pause while the person completes sign-in, then verify using:

```sh
vibiz whoami
```

Do not create a thelastapi project during global setup. Run `vibiz init` later, in the app's folder, when the person asks you to build something.

## 2. Add thelastapi guidance

The thelastapi agent skills teach the workflows for each product (deploy, database, sign-in, email, payments, social, connectors, company). Install them for the current agent:

```sh
vibiz skills list
vibiz skills add --global
vibiz skills list
```

`vibiz skills add` installs for the agent it runs in (Claude Code, Codex or Cursor). Pass `--agent claude|codex|cursor` to choose, and confirm the installation path it prints.

### Fallback: download the skills

If the CLI can't be used, unpack each skill from https://thelastapi.dev/skills/index.json into the agent's skills folder:

```sh
mkdir -p ~/.claude/skills
curl -fsSL https://thelastapi.dev/skills/vibiz-deploy.tar.gz | tar -xz -C ~/.claude/skills
```

| Agent | Personal (every project) |
| --- | --- |
| Claude Code | `~/.claude/skills` |
| Codex | `~/.agents/skills` |
| Cursor | `~/.cursor/skills` |

Reload only if the new skills don't show up.

## 3. Connect thelastapi MCP

Connect the shared thelastapi MCP endpoint once to reach projects, deployments, databases, payments, email, analytics and the docs across projects. It needs nothing installed: the client signs in over OAuth the first time it calls a tool.

If you know your client supports remote MCP with OAuth, use its route below. If it supports only stdio servers, configure the client's MCP server command as `npx` with arguments `["mcp-remote", "https://thelastapi.dev/mcp"]`, as in the Gemini CLI route. If unsure, try the route; record MCP as blocked only if it fails.

Before changing an MCP configuration file, inspect it and merge the `vibiz` entry without replacing unrelated settings.

For clients supported by the thelastapi CLI, configure the shared endpoint:

```sh
vibiz mcp add --clients "<client>"
```

Use the exact `<client>` value:

- Claude Code: `Claude Code`
- Codex: `Codex`
- Cursor: `Cursor`
- VS Code with GitHub Copilot: `VS Code with Copilot`
- Windsurf: `Windsurf`
- Gemini CLI: `Gemini CLI`
- OpenCode: `OpenCode`

It runs the client's own CLI where there is one (Claude Code, Codex) and otherwise merges the entry into the client's user config, never replacing other servers. Use only one route per client.

### Claude Code

Manual user-scoped fallback:

```bash
claude mcp add --transport http vibiz --scope user https://thelastapi.dev/mcp
```

Inspect existing MCP entries before adding (`claude mcp list`). To authenticate, open `/mcp`, select `vibiz`, and choose the authentication action.

### Codex CLI

First inspect:

```bash
codex mcp list
```

Its add command uses Codex's user-wide configuration:

```bash
codex mcp add vibiz --url https://thelastapi.dev/mcp
```

Codex should open a browser during setup. If the server exists but is not authenticated, run:

```bash
codex mcp login vibiz
```

### Cursor

Manual fallback: merge this into `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "vibiz": {
      "url": "https://thelastapi.dev/mcp"
    }
  }
}
```

Cursor displays `Needs login` when authorization is required. Ask the person to click it.

### VS Code with GitHub Copilot

Run **MCP: Add Server**, choose **HTTP**, enter `https://thelastapi.dev/mcp`, name it `vibiz`, and select **Global**. Then run **MCP: List Servers**, start vibiz, and allow authentication.

### OpenCode

```bash
opencode mcp add vibiz --global --url https://thelastapi.dev/mcp
```

To authenticate, ask the person to run `/mcps` in OpenCode, select `vibiz`, and sign in.

### Windsurf

Merge this into `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "vibiz": {
      "serverUrl": "https://thelastapi.dev/mcp"
    }
  }
}
```

Refresh the MCP configuration in Windsurf after saving.

### Gemini CLI

Merge this into `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "vibiz": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://thelastapi.dev/mcp"
      ]
    }
  }
}
```

Run Gemini CLI and use `/mcp list` to load the server.

### Common authorization and verification

Before authorizing, verify the endpoint is exactly:

```text
https://thelastapi.dev/mcp
```

When a browser or consent screen opens, pause for the person to sign in and click **Authorize**. The connection gets its own agent key, named after the client, on the console's API keys page; revoking it there disconnects the client.

After authorization:

1. Call `vibiz_docs` with no topic (read-only: lists the guides).
2. Call the authenticated, read-only `vibiz_project_status` with no `project_id` (lists the person's projects; an empty list is fine).
3. Refresh the client's MCP tools or server list if either is unavailable.
4. Start or resume a session, or reload or restart the client, only if refreshing does not load the server.

Keep human confirmation enabled for every MCP mutation. The connection gets its own key, with Full access unless the person chose Limited on the approval screen (Limited keeps live money, real company filings and production secrets with the person). Errors carry `details.next_step`: pass it on.

## Completion

Report only verified state:

```text
◆ thelastapi agent setup is ready
CLI: <version>, signed in as <account>
Guidance: <skills|blocked: reason>, global or project scope, <path>
MCP: <connected|blocked: reason>, global shared endpoint, https://thelastapi.dev/mcp
MCP config: <path|managed by the client's CLI>
Authenticated MCP check: <vibiz_project_status succeeded|not requested>
Reload: <not needed|completed>
```

## Build something

When the person is ready, work in a new, empty folder and start from what they want. For example:

```text
Use thelastapi to build and deploy a small shop with sign-in, a database, a $9/month plan, welcome emails and AI product descriptions.
```

**Building on a computer: start from a real project, never one loose HTML file.** It gives the code a structure that can grow, and pick by what the app needs:

- **It has several pages, or needs accounts, a database, payments or server code: Next.js.** `vibiz init "<name>" --template nextjs-saas` gives you the starter app with all of it wired in.
- **One page and nothing else (a landing page, a simple tool): Vite with React and TypeScript.** Don't add page routes to it: a direct link to one answers 404. Run `npm create vite@latest . -- --template react-ts`, then `vibiz init "<name>" --resources hosting,analytics,replay`.

Put pages, components and styles in their own folders. In a chat with no files, plain files through `vibiz_deploy` are fine.

Then `vibiz dev` for the development environment, and `vibiz deploy` to go live at `<slug>.vibiz.app`. Everything else is in https://thelastapi.dev/llms.txt.

Sources:

- https://thelastapi.dev/llms.txt
- https://thelastapi.dev/docs/quickstart
- https://thelastapi.dev/docs/agents
- https://thelastapi.dev/docs/cli
- https://thelastapi.dev/skills
