MCP server
public-it exposes an MCP (Model Context Protocol) server so AIs can create sites and publish artifacts directly, inside the conversation. Streamable HTTP transport, API-key authentication.
Connection
| Endpoint | https://public-it.com/mcp |
| Transport | Streamable HTTP (spec 2025-03-26+) |
| Auth | Header Authorization: Bearer pit_… — create the key at Dashboard → API & MCP |
Setup per tool
Claude Code
claude mcp add --transport http public-it https://public-it.com/mcp \
--header "Authorization: Bearer YOUR_KEY"
Claude Desktop / claude.ai (custom connector)
URL: https://public-it.com/mcp
Header: Authorization = Bearer YOUR_KEY
Cursor / VS Code (mcp.json)
{
"mcpServers": {
"public-it": {
"url": "https://public-it.com/mcp",
"headers": { "Authorization": "Bearer YOUR_KEY" }
}
}
}
Available tools
| Tool | Description | Parameters |
|---|---|---|
list_sites | List all sites of the authenticated user, with public URLs and status. | — |
create_site | Create a new site. The subdomain becomes the public address. Use publish_html afterwards. | name · Human-friendly site namesubdomain · 3-63 chars, lowercase letters, numbers and hyphens |
publish_html | Publish a complete HTML document as the new live version of a site. Returns the public URL. Prefer self-contained HTML (inline CSS/JS). | html · Complete HTML documentsiteId? · Site id (or use subdomain)subdomain? · Alternative to siteId |
get_site | Get details of one site (status, live version, URL, storage). | siteId · Site id |
list_versions | List the publication history of a site (for rollback). | siteId · Site id |
rollback_site | Restore an archived version of a site (paid plans). | siteId · Site idpublicationId · Archived version id |
delete_site | Permanently delete a site and its files. Confirm with the user first. | siteId · Site id |
get_usage | Get the user's plan, site count and storage usage. | — |
Typical flow
A common conversation between a user and an AI connected to public-it:
You: "Create a site called sales-dashboard and publish this HTML: <html>..."
AI: → create_site(name: "Sales Dashboard", subdomain: "sales-dashboard")
→ publish_html(subdomain: "sales-dashboard", html: "...")
AI: "Published! Your site is live at https://sales-dashboard.public-it.com"
Every publish_html puts a new version live — the history is available for rollback on paid plans (list_versions + rollback_site).
Errors
Without the authorization header the server responds 401. Business errors (quota exceeded, subdomain taken) come back as tool results with isError: true and a message explaining what to do — e.g. quota_exceeded: Your Free plan allows up to 1 site(s)…