Let your AI assistant publish for you. The htmlhost MCP server connects Claude, Cursor, VS Code, Windsurf, Codex and other Model Context Protocol clients to your htmlhost.co account, so you can say “deploy this folder” and get a live URL back.
It runs locally over stdio and signs in with the same API token as the htmlhost CLI. It can deploy, list, inspect, download and delete your sites.
You need Node.js 18 or later and an htmlhost.co account.
~/.htmlhostrc, which the MCP server reads.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.
bashclaude mcp add htmlhost -- npx -y htmlhost-mcp
# Make it available in every project
claude mcp add --scope user htmlhost -- npx -y htmlhost-mcpOpen 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"]
}
}
}Add to ~/.cursor/mcp.json for all projects, or .cursor/mcp.json for one project:
json{
"mcpServers": {
"htmlhost": {
"command": "npx",
"args": ["-y", "htmlhost-mcp"]
}
}
}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"]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
json{
"mcpServers": {
"htmlhost": {
"command": "npx",
"args": ["-y", "htmlhost-mcp"]
}
}
}bashcodex mcp add htmlhost -- npx -y htmlhost-mcpCline, Zed and any other MCP client that supports stdio servers work the same way: the command is npx with the arguments -y htmlhost-mcp. 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.pathstringslugstringtitlestringttlstringPublish 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. No parameters.
Shows a site's current version, its pages, and its assets with their sizes.
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.
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.slugstringconfirmbooleanReturns the signed-in account's email, name, handle and plan. No parameters.
If 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.
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.Run npx htmlhost-cli login in a terminal, then try again. The server reads the token from ~/.htmlhostrcon each request, so you don't need to restart your AI tool.
The token was revoked or deleted. Create a new one at Settings → API keys and run htmlhost login again.
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