public-it

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

Endpointhttps://public-it.com/mcp
TransportStreamable HTTP (spec 2025-03-26+)
AuthHeader 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

ToolDescriptionParameters
list_sitesList all sites of the authenticated user, with public URLs and status.
create_siteCreate a new site. The subdomain becomes the public address. Use publish_html afterwards.
name · Human-friendly site name
subdomain · 3-63 chars, lowercase letters, numbers and hyphens
publish_htmlPublish 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 document
siteId? · Site id (or use subdomain)
subdomain? · Alternative to siteId
get_siteGet details of one site (status, live version, URL, storage).
siteId · Site id
list_versionsList the publication history of a site (for rollback).
siteId · Site id
rollback_siteRestore an archived version of a site (paid plans).
siteId · Site id
publicationId · Archived version id
delete_sitePermanently delete a site and its files. Confirm with the user first.
siteId · Site id
get_usageGet 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)…