Basely

Publish a site from Claude Code with one MCP command

R
Rafaell Sousa

updated Oct 5, 2026 · 4 min

The short answer

Install the Basely Connector with npm i -g @baselyai/conector, sign in with basely login, and register the MCP server in Claude Code with claude mcp add basely -- basely mcp. From then on, Claude Code sees your sites, files, domains and servers as tools, and you can ask it to publish in plain English. To publish a folder straight from the terminal without the agent, run basely deploy ./folder --site name.

The short answer: four commands

If you already use Claude Code to write websites, the missing step is usually the last one: getting it live. FTP uploads, DNS records, SSL, remembering which host has which project. With an MCP server connected to your hosting, the agent handles that part itself.

On Basely, it looks like this:

npm i -g @baselyai/conector
basely login
claude mcp add basely -- basely mcp

The first installs the Connector (CLI plus MCP server). The second links this machine to your account. The third registers the server in Claude Code. After that, you just ask: "publish this site on the bakery's domain" or "show me the latest contact form submissions."

And if you want to publish a folder without going through the agent:

basely deploy ./folder --site name

What MCP is, in two sentences

MCP (Model Context Protocol) is an open standard that lets an AI agent talk to outside tools. Instead of you pasting commands, the MCP server declares what it can do (list sites, write a file, publish) and the agent calls those tools when it needs them.

For developers, the practical win is context. The agent that wrote the code is the same one that ships it, so it knows which folder is the build output, which site maps to the project, and can check that the deploy worked.

Step by step

1. Install the Connector. You need Node.js with npm. npm i -g @baselyai/conector installs the basely binary globally.

2. Sign in. basely login links this machine to your Basely account and stores a token on it. The token is scoped, lasts 90 days and belongs to this machine only, so your laptop and your office desktop each get their own.

3. Register the MCP server. claude mcp add basely -- basely mcp tells Claude Code to start basely mcp as a tool server. Open a new session and the Basely tools are available to the agent.

4. Ask for the deploy. Inside Claude Code, describe what you want. The agent picks the tools: find the site, upload files, publish and check the status.

5. Or deploy directly. For scripts, or when you just want to push a finished folder, basely deploy ./folder --site name deploys that folder to the named site.

What the agent can do on your account

The Connector gives your agent 153 tools on your account. In broad groups:

AreaThings you can ask for
SitesList, create, read and write files, publish
DataQuery and write to the site's database, read form submissions
DomainsSearch names, point a domain at a site
ServersRead logs, run allowed commands, manage SSH keys
PublishingDeploy and follow the status

This changes the kind of request you make. Instead of "generate some HTML," you can say "fix the contact form on the clinic's site, publish it, and confirm that submissions reach the database."

What is left out, on purpose

A tool an agent can call on its own needs limits. In the Connector:

  • Buying, canceling and deleting stay in the dashboard. No prompt, not even one injected into a file the agent happened to read, can make it buy a domain or delete a site.
  • Tokens are scoped. They reach what your account allows, and anything outside the scope is refused.
  • One token per machine, with an expiry. It lasts 90 days, and you can revoke one machine without affecting the rest.

That separation is what lets you run the agent with fewer manual approvals without worrying about next month's bill.

Cursor, Codex and VS Code

The server is standard MCP, so it works with other compatible clients: Cursor, Codex and VS Code. The difference is where you register it. In Claude Code it is claude mcp add; elsewhere you add an MCP server in the editor's settings that runs the basely mcp command. Sign-in (basely login) is the same and applies to the whole machine.

When to ask the agent and when to use basely deploy

Both paths publish, but they fit different moments.

Ask the agent when publishing is part of a bigger task: it just changed the code, needs to check the result, adjust something in the site's database or point a domain. The win is keeping context between writing and shipping.

Use basely deploy ./folder --site name when the folder is already built and you just want to push it. It fits a build that came out of another tool, a continuous integration script, or any time you do not want to open an agent session just for this.

A common routine: the agent works and publishes during development, and basely deploy goes into the script that runs after each approved build. Either way, the site, domain and SSL are the same, and the history lives in the same dashboard.

How to do it on Basely

The full flow:

  1. Have a Basely account. The platform plan includes hosting, SSL and a monthly allowance of credits.
  2. Run npm i -g @baselyai/conector and basely login on your machine.
  3. Run claude mcp add basely -- basely mcp for Claude Code.
  4. Ask the agent to create or publish the site, or use basely deploy ./folder --site name.
  5. Point the client's domain, which gets DNS and SSL connected to the site.

If you sell the site to a client, it stays in the same dashboard: your client list, proposals and the client portal live in the Hub, and the Connector remains your way in from the terminal.

Install the Connector and ship your next site without leaving the terminal.

Try it on Basely

The first AI site is free with a confirmed email.

See how it works

Questions

Does it only work with Claude Code?
No. The Connector runs a standard MCP server, so it works with other compatible clients such as Cursor, Codex and VS Code. claude mcp add is the Claude Code shortcut; in the others you point an MCP server entry at the same basely mcp command in their settings.
Can the agent delete my site or buy something without me knowing?
No. Buying, canceling and deleting stay in the Basely dashboard, behind your real session. Through the Connector the agent edits, publishes and reads, within the token's scope.
What happens when the token expires?
Tokens are per machine and last 90 days. When one expires, run basely login again. If you lose a laptop, you can revoke that machine's token without touching the others.
Do I need to be a developer to use this?
It helps, since the workflow lives in the terminal. If you would rather chat in a browser, Basely's AI Builder writes and publishes the site from there.