Publish via API & MCP

Publish pages to html buddy programmatically — including straight from Claude, ChatGPT, or any MCP client.

1. Get your API token

Go to settingsgenerate API token. It looks like hb_…. It's a per-account key — pages publish to your account, and regenerating it instantly revokes the old one. Treat it like a password.

2. The publish API

One endpoint. Send the token as a bearer header with a JSON body:

curl -X POST https://htmlbuddy.app/api/publish/ \
  -H "Authorization: Bearer hb_your_token" \
  -H "Content-Type: application/json" \
  -d '{"html": "<!doctype html><title>Hi</title><body>hello</body>", "title": "Hi"}'

Returns {"public_id", "url", "status": "pending"}. The page runs through the same render + moderation pipeline as an upload and appears once approved. API / MCP publishing is free — only on-platform generation is metered.

3. The MCP server (no install)

html buddy hosts a remote MCP server, so there's nothing to download or run. Add this URL as a custom connector — the token in the URL is your authentication, so keep it private:

https://htmlbuddy.app/mcp/hb_your_token

Generate a token and you'll see your personal URL here, ready to copy.

It exposes one tool, publish_page(html, title?). To connect:

Then just ask it to “build an X and publish it to html buddy.”

Limits: HTML up to 2 MB; standard per-account rate limits apply; every page is moderated before it goes public.