# Connect a coding agent to Paasta

This guide supports the user's request to connect their coding agent to Paasta.
It does not authorize deployment, costs, deletion, or changes to existing services.
Human setup guide: https://paasta.cloud/agents (Accept: text/html).
Full documentation: https://paasta.cloud/docs/mcp-agent

## 1. Inspect the environment
Identify the operating system and the agent the user is using. Check whether
paasta is on PATH with paasta --version. CLI 0.24.1 or newer is needed for the
additional clients below. Do not replace a working installation unnecessarily.
If an installed CLI is older, use paasta update and check the version again.

## 2. Install the official CLI if missing
Download and inspect the matching installer before running it. The installer
verifies the downloaded binary's SHA-256 checksum. Do not request administrator
permissions or install extra packages unless necessary and authorized.

macOS / Linux:
  curl -fsSL https://console.paasta.cloud/install.sh -o paasta-install.sh
  sh paasta-install.sh

Windows PowerShell:
  Invoke-WebRequest https://console.paasta.cloud/install.ps1 -OutFile paasta-install.ps1
  & ./paasta-install.ps1

Follow the installer's PATH instructions, then verify paasta --version.

## 3. Authenticate
Run paasta whoami. If authentication is missing or expired, run paasta login.
The user completes browser authentication. Never ask the user to paste a token
into chat, source code, or MCP configuration. Never print the saved credentials.
For a remote terminal without browser access, use the documented login flow:
https://paasta.cloud/docs/cli

## 4. Connect the actual client
Run from the user's project directory. Choose only the client in use:
  Codex: paasta setup agent --agent codex
  Claude Code: paasta setup agent --agent claude-code
  Cursor: paasta setup agent --agent cursor
  Antigravity: paasta setup agent --agent antigravity
  Cline: paasta setup agent --agent cline
  Gemini CLI: paasta setup agent --agent gemini
  Windsurf: paasta setup agent --agent windsurf

Claude Code, Codex, Cursor and Gemini CLI use project-local configuration.
Antigravity and Windsurf use their user MCP configuration. Cline uses its
project configuration plus an existing IDE settings file when detected; otherwise
the shared Cline settings file. Existing unrelated servers and settings are kept.
Do not change approval settings, auto-approve tools, or grant additional scopes.

For another MCP client, run paasta setup agent --agent print and merge the paasta
entry into that client's MCP settings. It runs command paasta with args ["mcp"]
over stdio, using the CLI's saved login. No token belongs in the MCP settings.

## 5. Verify, then stop setup
Check paasta whoami succeeds. Reload the client's MCP servers or restart the
agent if necessary. Verify Paasta tools are visible and call a read-only tool
such as paasta.list_projects. Do not claim MCP is connected from file creation
alone. If this session cannot reload tools, tell the user exactly what to reload.
If access is denied, report the missing permission; never bypass authorization.

Only deploy when the user asks for it and authorizes the project and possible
cost. Inspect the source and existing projects first; avoid duplicate resources.
For paasta.deploy_source, confirm=true is only for an authorized deployment.
After deployment, verify build logs, service health and the public URL.
