Let your AI assistant publish for you. The htmlhost MCP server connects Claude, Cursor, VS Code, Windsurf, Codex, Antigravity, Cline and other Model Context Protocol clients to your htmlhost.co account, so you can say “deploy this folder” and get a live URL back.
Use the hosted connector to continue a saved project in Claude mobile or web. Coding tools can also run the local server, which shares sign-in with the htmlhost CLI and works with files on your computer.
Claude on web & mobile
Work through larger, more complex edits with Claude. It opens your project, works across your files, and saves changes back to htmlhost.
Save your project in htmlhost, then ask Claude: “Open my htmlhost project my-site, change the heading, and save a draft for me to preview.” Enable the connector from Claude's conversation menu. Your saved files and drafts remain in the same project, and you can return to the htmlhost editor at any time.
The hosted connector offers list_projects, get_project, read_file, search_files, save_draft, get_preview and publish_draft. It can also start a project for you: create_project saves the pages Claude built as a private draft in your account, and nothing is public until you ask Claude to publish it. get_account tells you which htmlhost account is connected. It reads selected files and applies focused changes while retaining other pages and assets. Publishing is a separate action; connecting an account or saving a draft does not publish it. get_project also lists the site's keys, secure calls and collections, so Claude can build with them by name.
Claude's usage limits apply to the conversation. The connector uses your existing htmlhost project permissions and hosting limits. If you also edit in htmlhost, save there before continuing in Claude and reload the editor after Claude saves changes.
Files can go straight into your Media library: import_media downloads a public file URL;create_media_upload, prepare_media_upload and get_media_upload handle uploads and return hosted URLs. Claude can transfer accessible attachments directly when its network permits. Otherwise, open its upload link, choose your files, and return to the conversation and say “Done”—no file URLs to copy. Media access requires its own approval. Hosted files are public to anyone with their link, and normal Media limits apply. Imported CSS includes bounded dependency copying; unresolved dependencies are reported. JavaScript dependencies need separate inspection.
You need Node.js 18 or later and an htmlhost.co account.
~/.htmlhostrc.whoami. If it replies with your email and plan, you're connected.bashnpx htmlhost-cli loginAlready use the CLI? You're signed in. If you'd rather not go through npx each time, install the server globally with npm i -g htmlhost-mcp and use htmlhost-mcp as the command in the configs below.
Staying up to date: with htmlhost-mcp@latest, npx fetches the newest version each time your AI tool starts the server. A global install checks once a day and updates itself in the background; restart your AI tool to load it. Either way, when a newer version exists, your AI tool tells you once per session.
bashclaude mcp add htmlhost -- npx -y htmlhost-mcp@latest
# Make it available in every project
claude mcp add --scope user htmlhost -- npx -y htmlhost-mcp@latestFor saved htmlhost projects, use the Claude directory setup above. The local setup below is for files on your computer.
Open Settings → Developer → Edit Config, add the server to claude_desktop_config.json, then quit and reopen Claude.
json{
"mcpServers": {
"htmlhost": {
"command": "npx",
"args": ["-y", "htmlhost-mcp@latest"]
}
}
}Add to ~/.cursor/mcp.json for all projects, or .cursor/mcp.json for one project:
json{
"mcpServers": {
"htmlhost": {
"command": "npx",
"args": ["-y", "htmlhost-mcp@latest"]
}
}
}To deploy with a button instead of asking an assistant, install the htmlhost VS Code extension. The two work side by side.
Add to .vscode/mcp.json in your project. VS Code uses a servers key:
json{
"servers": {
"htmlhost": {
"type": "stdio",
"command": "npx",
"args": ["-y", "htmlhost-mcp@latest"]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
json{
"mcpServers": {
"htmlhost": {
"command": "npx",
"args": ["-y", "htmlhost-mcp@latest"]
}
}
}bashcodex mcp add htmlhost -- npx -y htmlhost-mcp@latestAdd to ~/.gemini/config/mcp_config.json for all projects, or .agents/mcp_config.json for one project. In the Antigravity app it's under Manage MCP Servers → View raw config; in the CLI, /mcp reloads it:
json{
"mcpServers": {
"htmlhost": {
"command": "npx",
"args": ["-y", "htmlhost-mcp@latest"]
}
}
}In the Cline panel, open MCP Servers → Configure → Configure MCP Servers and add the server to cline_mcp_settings.json:
json{
"mcpServers": {
"htmlhost": {
"command": "npx",
"args": ["-y", "htmlhost-mcp@latest"]
}
}
}Zed and any other MCP client that supports stdio servers work the same way: the command is npx with the arguments -y htmlhost-mcp@latest. No environment variables are needed.
Your AI picks these tools itself; you just describe what you want. Each one returns JSON, including the live URL after a deploy.
Deploy a local folder or a single HTML file. Without a slug, a new site is created.
pathstringRequired. Absolute path to a folder or an .html file.slugstringOptional. An existing site to update. Omit to create a new site.titlestringOptional. The site title.ttlstringOptional. 1d, 7d, 30d or never. Defaults to your plan's default.pathstringslugstringtitlestringttlstringFor deploy and deploy_html, isDraft: true saves without changing publication. To publish an unpublished site, first ask the user to confirm making it public, then pass confirmPublish: true. Never automatically retry a refusal with confirmation enabled.
For the site's owner, Admins and Editors: takes a website offline while retaining files, drafts and history. Pass slug and confirm: true after the user agrees. Everyone keeps their access, and a role that publishes can explicitly publish again.
list_sites and get_site report publication state. pull_site defaults to source: "working", including saved drafts; choose "published" only when deliberately retrieving last-deployed files, or "draft" to require a draft.
Publish HTML the AI has just written, with no file on disk. Deploys a single page.
htmlstringRequired. The full HTML document.slugstringOptional. An existing site to update.titlestringOptional. The site title.ttlstringOptional. 1d, 7d, 30d or never.htmlstringslugstringtitlestringttlstringLists your sites with their slug, URL, title, size, TTL and expiry, plus your plan usage, then the sites shared with you (shared, with their owner and your role). What you can do on a shared site follows your role: Admins and Editors pull, deploy to and restore it with your own key; Contributors pull and save drafts (isDraft: true) but can't publish; Viewers can't change it. Only its owner can delete it. See People & roles. No parameters.
Shows a site's current version, its pages, and its assets with their sizes, plus its keys, secure calls and collections when it has them.
slugstringRequired. The site slug, e.g. bold-fern-x3k.slugstringDownloads every page and asset of a site into a local folder, creating the folder if needed. Useful for bringing edits made in the browser editor back into your project. Its result lists the site's keys, secure calls and collections too.
slugstringRequired. The site to download.directorystringRequired. Absolute path of the folder to write into.slugstringdirectorystringPermanently deletes a site. This can't be undone.
slugstringRequired. The site to delete.confirmbooleanRequired. Must be true, or nothing is deleted.slugstringconfirmbooleanSigns in to your htmlhost.co account. Opens an approval page in your browser and waits briefly; if you haven't approved yet, it returns the link and code, and your AI calls it again once you have. No parameters.
Returns the signed-in account's email, name, handle and plan. No parameters.
Lists a site's published versions, newest first, with what each one changed and which one is live.
slugstringRequired. The site to list.slugstringMakes an earlier version live again by publishing it as a new version, so it can be undone the same way. Needs the site owner to be on Pro.
slugstringRequired. The site to restore.versionnumberRequired. The version number from list_versions.confirmbooleanRequired. Must be true, or nothing changes.confirmPublishbooleanFor an unpublished website, true only after the user agrees to make it publicly accessible again.slugstringversionnumberconfirmbooleanconfirmPublishbooleanIf you build sites with forms, also run htmlhost agents in your project (see the CLI docs). It tells your AI how htmlhost hosting and forms work, so the forms it writes deliver to your inbox.
Describe the feature you want and ask your AI tool to use your saved keys or collections. It can set up missing calls and collections for the owner or an Admin. Tools discover the existing setup through: the local tools get_site and pull_site, the connector's get_project, and the CLI's htmlhost keys (which pull and clone also write into AGENTS.md).
POST /__hh/call/<name> with the fields listed and gets the answer's listed parts./__hh/data/<name>. Collection tools do not return record contents; publicly readable records remain accessible through the site API.Give your AI tool a key and it can save it for you: set_site_key and remove_site_key in both the local tools and the connector, or htmlhost keys set in a terminal. It works out whether the key is public or secret from its value, and asks you only when it can't tell. Collections can be set up the same way: set_collection creates or updates one when a page needs it, or htmlhost collections set in a terminal. So can secure calls: set_secure_call (or htmlhost calls set) creates the call a page needs, after you confirm the service it goes to and the key it uses. Secure calls and collections work on the published site only. Guides: accept payments, use API keys safely and add a database.
You can also ask AI for a secure-call JSON definition and add it yourself: Dashboard → your site → Keys → Secure calls → Paste a definition. Paste one definition, select Review call, check the service, keys and visitor fields, then Add call. Use this when you prefer dashboard review or your tool cannot create calls. Edit details lets you adjust the request before saving. See the walkthrough and prompt.
To find collections, open Dashboard → your site → Data (the section is headed Collections). If your tool cannot create a collection, ask it for the fields and read/add rules to enter there. Paste a definition is for secure calls, not collections.
The hosted connector's set_site_key, remove_site_key, set_collection and set_secure_call use the existing projects:write permission. Each requires the site owner or an Admin. Saving or replacing a key needs Pro; removing one does not, but removal is refused while a secure call uses it. Secure calls need Pro. Collections follow the owner's plan limits. These operations take effect when called; they are not staged as page drafts.
An unclear key kind returns KEY_KIND_UNKNOWN. A secret-looking value saved as public needs confirmation after KEY_LOOKS_SECRET. Opening personal fields or existing private records to public reading needs confirmation after COLLECTION_NEEDS_CONFIRM. Creating or changing a secure call that uses a key needs confirmation after CALL_NEEDS_CONFIRM; the tool never receives a key's value. The first time a connected tool sends one of your secret keys to a service, an unfamiliar destination may leave the call switched off for dashboard review. Open Keys → Secure calls, select the switch, review the call and choose Enable call. Save any named missing keys too. An enabled call has not necessarily been tested; test it on the published site. set_collection replaces the field definition and returns a record count, but does not read or edit record contents. Removing a field hides its values rather than deleting them.
A key you supply to an AI assistant passes through that assistant as part of your request and is subject to its data practices. You can instead save it in the dashboard and refer to it by name. These tools set up secure calls but do not run them or take payments. Visitor accounts and per-person record permissions are not built in; see passwords and sign-in.
index.html → /, about.html → /about, blog/index.html → /blog) and every other file (CSS, JS, images, fonts) is uploaded next to it..htmlhost link file, so without a slug every deploy creates a new site. Tell your AI which site to update, or ask it to find the slug with list_sites.node_modules, .git, .env files, lockfiles, editor folders, .htmlhost, and agent files such as AGENTS.md, CLAUDE.md and .cursor are never uploaded.pull_site replaces local files that have the same name and leaves other files alone. Commit or back up local changes first.Ask your AI to sign in (the login tool), or run npx htmlhost-cli login in a terminal, then try again. The server reads the token from ~/.htmlhostrc on each request, so you don't need to restart your AI tool.
The token was revoked or deleted. Ask your AI to sign in again, or run htmlhost login.
Desktop apps don't always see the same PATH as your terminal, which is common with nvm or Homebrew installs of Node. Run which npx and use that full path as the command, for example /opt/homebrew/bin/npx.
Restart your AI tool after editing its config, and check the JSON is valid. Most clients show the server's status and logs in their MCP settings.
Questions? Reach out at hey@htmlhost.co