lobsite! Sign in Sign up

AI agents

Coding agents (Claude Code, Cursor, Codex and others) deploy with the same CLI as people, and chat assistants without a filesystem deploy through a remote MCP server. This page shows how to set each one up.

npx lobsite

If you're an AI agent, read lobsite.com/ai first: the guide written for you, with each way of publishing, how to read the answer and how to keep updating the same site. It's also Markdown at /ai.md.

How agent mode works

The CLI knows it runs under an agent from the variables agents set: CLAUDECODE (Claude Code), CURSOR_AGENT (Cursor), CODEX_SANDBOX (Codex), GEMINI_CLI, COPILOT_AGENT, GOOSE_TERMINAL, REPLIT_AGENT and AGENT. Set LOBSITE_AGENT=<name> to name another agent, or LOBSITE_AGENT=0 to turn agent mode off. Under an agent:

  • Nothing is ever asked. The first deploy of a folder prints its summary and carries on; commands that can't be undone need --yes.
  • There are no colours, spinners, QR codes or clipboard copies, only plain lines.
  • A deploy ends with a line written for the agent to pass on:
Tell the user: the site is live at https://quiet-fox-4821.lobsite.app. It's temporary and is removed in 6h. To keep it, open https://lobsite.com/claim/quiet-fox-4821#lob_claim_… and sign in (free).

Sites deployed without an account last 6 hours. The claim link keeps the site: the person opens it and signs in, without touching a terminal. Running the same command again updates the same site, because lobsite.toml remembers it.

What your user should see

Every way of deploying (the CLI, curl, the MCP servers and the API) gives the agent the same facts to pass on. After a deploy, the person should know:

  1. The live URL. It's in the "Tell the user" line, and in url and the tell_user step.
  2. When a temporary site is removed. "It's removed in 6h", site_expires_at, and the claim step's deadline.
  3. The claim link that keeps it. claim_url and the claim step's url. Opening it and signing in keeps the site at the same address, free.
  4. Once it's kept, their own domain. For a site in an account that can still add a domain, the add_domain step links to the site's Domains page. Mention it once; it's optional.

Claude Code

Claude Code can deploy with the shell command alone. To have it use Lobsite every time, add a line to the project's CLAUDE.md:

Deploy with `npx lobsite` and relay the "Tell the user:" line from the output.

Or add the MCP server, which gives Claude tools to deploy, list sites and deploys, roll back and promote:

claude mcp add lobsite -- npx -y lobsite@latest mcp

Cursor

Add the MCP server to .cursor/mcp.json:

{ "mcpServers": { "lobsite": { "command": "npx", "args": ["-y", "lobsite@latest", "mcp"] } } }

Or add a project rule in .cursor/rules/ with the section from AGENTS.md.

Codex and other agents

Codex and the other agents that read AGENTS.md pick up a section like this one. Paste it into the project's AGENTS.md:

## Deploying

This site deploys with [Lobsite](https://lobsite.com). Build it, then from the project folder run:

```bash
npx lobsite
```

- Tell the user the URL, and relay the "Tell the user:" line from the output word for word.
- Sites deployed without logging in are removed after 6 hours. The claim link in the output keeps the site; the user opens it and signs in.
- `lobsite.toml` remembers the site, so the same command updates it. Use `--preview` to deploy without changing the live site, and `--json` for machine-readable output.
- If a deploy fails, follow the fix in the error message. Never pass `--include-secrets`.
- Forms need no backend: point a form at `/_lobsite/forms/<name>` with `method="POST"` and `data-lobsite-type` (`contact`, `waitlist`, `survey` or `quiz`). Read https://lobsite.com/docs/forms.md before adding one.

Any agent that speaks MCP over stdin/stdout can run npx -y lobsite@latest mcp instead.

ChatGPT and Claude.ai

Chat assistants write pages but have no folder to deploy. Add Lobsite as a custom connector (an MCP server) with this URL:

https://mcp.lobsite.com

It speaks Streamable HTTP. deploy_files takes the files' contents and get_deploy_status follows a deploy. list_files, read_file and patch_files let the assistant change one page of a site it deployed without sending the whole site again. Then ask the assistant to put the page online. Temporary sites are published anonymously: the answer carries the claim link that keeps them, and the site and claim_token to pass with every later change, so the site keeps its URL.

In ChatGPT, choose OAuth or no authentication. To work on a claimed site, use list_sites to connect and select a site. Use deploy_site_preview or patch_site_preview to stage changes and promote to publish a ready preview.

Without Node: curl

Where npx can't run, one curl command deploys a page or a few files and answers with the URL, when the site is removed, the claim link and how to update the site. The answer speaks to the person reading it, with one line for agents: give the user the link, the live URL and when it's removed.

curl --data-binary @index.html https://lobsite.com/api/v1/drop
curl -F index.html=@index.html -F css/site.css=@site.css https://lobsite.com/api/v1/drop

Every change goes to the same site: pass its name and the claim token from the first answer. Deploying without them creates a separate site with a new URL.

curl --data-binary @index.html -H "Authorization: Bearer lob_claim_…" "https://lobsite.com/api/v1/drop?site=quiet-fox-4821"

?preview=1 deploys without changing the live site. Sending files that are already live changes nothing and isn't counted as a deploy: the answer says Unchanged. To retry safely after a timeout, send -H "Idempotency-Key: <a new UUID>" with each publish and the same key on its retry: you get the same site instead of a second one. A direct deploy carries up to 25 MB. Add ?format=json for a JSON answer.

MCP tools

Server Tools
Local: npx -y lobsite@latest mcp deploy, list_sites, list_deploys, rollback, promote, whoami
Remote: https://mcp.lobsite.com deploy_files, get_deploy_status, get_limits, list_files, read_file, patch_files
Remote, with a Lobsite account connected list_sites, list_deploys, get_site_deploy_status, get_site_limits, list_site_files, read_site_file, deploy_site_preview, patch_site_preview, promote, rollback

patch_files changes some files of the deploy you read (base_deploy_id) and deploys the result to the same site. If the live site changed since you read it, nothing is deployed (deploy.stale_base), so a change never overwrites one made in the meantime. The local tools run the CLI commands with --json --yes and take path, the project folder (by default, the folder the server started in). deploy answers with the "Tell the user" line first. Logging in and deleting sites aren't tools: one needs the person in a browser, the other can't be undone. Example prompts and how connecting an account works are on the MCP server page.

JSON output

--json prints one JSON object on stdout, with logs on stderr:

{
  "site": "quiet-fox-4821",
  "deploy_id": "d7k2m9qa",
  "url": "https://quiet-fox-4821.lobsite.app",
  "preview_url": "https://d7k2m9qa--quiet-fox-4821.lobsite.app",
  "live": true,
  "expires_at": "2026-10-13T16:20:38Z",
  "claim_url": "https://lobsite.com/claim/quiet-fox-4821#lob_claim_…",
  "files": { "total": 42, "uploaded": 3 },
  "bytes_uploaded": 14336,
  "duration_ms": 812
}

claim_url and expires_at are null for sites with an account. A failure is { "error": { "code", "message", "why", "fix", "exit_code", "retryable" } }. Branch on code, which never changes (see Errors), and retry only when retryable is true.