Connect Claude Code to the Lobsite MCP server
The Lobsite MCP server runs at Lobsite, so there's nothing to install and no Node to have:
claude mcp add --transport http lobsite https://mcp.lobsite.com
Add --scope project to save it in the project's .mcp.json, so everyone who opens the project gets it.
In the Claude desktop app, add it as a connector instead: Settings → Connectors → Add custom connector, named Lobsite, with the URL https://mcp.lobsite.com. The connector works in the app's chats and in Claude Code sessions in its Code tab, with no terminal needed. Claude Code then has deploy_files to publish files, up to 25 MB per deploy, and list_files, read_file and patch_files to change one page of a site it deployed without sending the whole site again.
Publishing a temporary site needs no account. To work on sites you've kept, connect your Lobsite account from Claude Code's /mcp menu: you choose which sites it can use and what it may do, and it gets previews, promote and rollback for them. Deleting a site isn't a tool, on purpose: it can't be undone. More on the MCP page.
Make Lobsite Claude Code's way to deploy
Add one line to the project's CLAUDE.md, so every session deploys the same way without being told:
Deploy with the lobsite MCP server's deploy_files tool, or `npx lobsite` for a large build, and relay the claim link.
Within a session, Claude passes the site and claim token from the first answer with every later deploy, so the site keeps its address. With the CLI, the first deploy writes lobsite.toml with the site's name and folder; commit it, and the next deploy from any session updates the same site.
Add a /deploy command to Claude Code
A custom slash command makes it one keystroke. Save this as .claude/commands/deploy.md:
Build the site, then deploy it with `npx lobsite`.
If the build or the deploy fails, read the error's fix line and follow it.
When it succeeds, tell me the "Tell the user:" line word for word.
Then type /deploy. To let it run without asking for permission each time, allow the command in .claude/settings.json:
{ "permissions": { "allow": ["Bash(npx lobsite:*)"] } }
Deploy large Claude Code builds with the CLI
The MCP server takes the files' contents in the tool call, which suits pages and small sites. For a build with big assets, Claude Code runs the CLI in the project folder instead:
npx lobsite
It uploads the build folder from disk and only sends the files that changed. The CLI sees it's under Claude Code (from the CLAUDECODE variable Claude Code sets), so it never asks a question, prints plain lines, and ends with a "Tell the user:" line for Claude to pass on.
Claude Code hosting: Lobsite vs GitHub Pages
| Lobsite | GitHub Pages | |
|---|---|---|
| Before the first deploy | Nothing: the site lives 6 hours until you claim it | A GitHub account, a repository and Pages turned on |
| What Claude does | One tool call, or one command for a large build | Commit, push, and a Pages workflow for a build step |
| Questions on the way | None under an agent | Git may ask for credentials |
| Upload | Only the files that changed | The whole build, each time |
| Preview a deploy | A preview gets its own URL | Not built in |
| Custom domain | Yes, free | Yes, free |
| Private source | Only the built files are uploaded | Pages from a private repository needs a paid GitHub plan |
If the project already lives on GitHub with a custom domain, GitHub Pages is a fine home. Lobsite fits when you want a link now, from the session you're in.
Claude Code hosting FAQ
Does Claude Code need an account to deploy?
No. Without an account the site lasts 6 hours, and Claude gives you the claim link that keeps it. To deploy into your account instead, connect it from Claude Code's /mcp menu, or run npx lobsite login once yourself for the CLI: signing in happens in a browser, which an agent can't do for you.
Which files does Claude Code deploy?
Over the MCP server, the files Claude sends: the build output, usually. With the CLI, the first of dist/, build/, out/, _site/ or public/ that exists, or the folder you name (npx lobsite site/); the choice is saved in lobsite.toml.
Will it upload my .env file?
Over the MCP server, Claude sends only the files it names. The CLI stops the deploy when it finds secret files (.env*, private keys, .npmrc and similar) until they're removed or listed in .lobsiteignore. Never pass --include-secrets from an agent.
Can Claude Code deploy a preview without changing the live site?
Yes. Ask for a preview: the deploy gets its own URL and the live site stays as it was. With the CLI, that's npx lobsite --preview. Promote it later from the dashboard, with npx lobsite promote <id>, or with the MCP server's promote once your account is connected.
What does Claude see when a deploy fails?
An error that says what happened, why, and what to do, with a code that never changes. With the CLI, add --json for machine-readable output; see Errors.