ShareHTML

Turn one HTML file into a link: publish, replace, list and delete pages from Claude, ChatGPT or any MCP client.

Hosted MCP Server

npx add-mcp 'https://sharehtml.org/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

Publish HTML from an agent

Agents write HTML files, and ShareHTML gives a human a link to one. Claude and ChatGPT publish through the ShareHTML connector; any agent that can make web requests publishes with a single POST and an API key.

  • Add to Claude Ask Claude for a page and the link comes back in the chat
  • Add to ChatGPT Ask ChatGPT for a page and the link comes back in the chat
  • Copy for your coding agent For Claude Code, Codex, Cursor and other agents

Chat apps can’t publish from a pasted prompt; the connector lets them, after you sign in once.

Publishing needs an account. Claude and ChatGPT sign in through the connector, where the owner allows them once. An agent that can make web requests signs in through the API with the owner's email and the 6-digit code the owner reads out to it, or the owner makes an API key in the dashboard and hands it over. A page can be held before it goes live, so the answer carries a status. Full reference: API reference.

Use ShareHTML in Claude

Claude on the web, in the desktop app and on a phone publishes pages itself once ShareHTML is one of its connectors. You sign in once, with your email and a code.

  1. In Claude, open Customize, then Connectors. Choose Add, then Add custom connector.
  2. Name it ShareHTML, enter https://sharehtml.org/mcp as its URL and choose Continue. Keep the settings Claude marks Detected, then choose Add.
  3. Choose Connect. ShareHTML opens: sign in with your email and the 6-digit code we send (a new account ticks the terms and 18+ first), then choose Allow.
  4. In a chat, ask Claude to publish your page on ShareHTML. It gives you the link once the page is live.

On a Team or Enterprise plan, an Owner adds the connector in Organization settings, under Connectors, and then each person connects with their own account. Claude’s Free plan allows one custom connector.

Use ShareHTML in ChatGPT

ChatGPT publishes pages itself through the same connector, where your plan or your workspace allows custom connectors.

  1. Open chatgpt.com/plugins, choose the plus button, then Add custom MCP server.
  2. Name it ShareHTML, and under Connection enter https://sharehtml.org/mcp. Set its authentication to OAuth, read the warning, choose I understand and want to continue, then Create as a plugin.
  3. Install it and sign in to ShareHTML when it asks: your email, the 6-digit code, then Allow.
  4. In a new chat, type @, choose ShareHTML and ask it to publish your page.

Every app you connect is listed in your account, where Disconnect stops it at once. Its pages follow the same rules as yours.

The prompt for coding agents

For Claude Code, Codex, Cursor and other agents that can make web requests: copy this into the agent. It reads the rules, then publishes through the API. An AI that can do neither gives you the page to paste.

Publish HTML for me on sharehtml.org. Read https://sharehtml.org/agents.md first and follow its rules.

/agents.md holds the rules and the API steps. Signed in, the dashboard shows the full prompt with your email in it.

Sign in without a browser

The agent asks the owner for their email, then asks ShareHTML to send them a code. The answer is 202 whether or not the email has an account.

curl -sS -X POST https://sharehtml.org/api/v1/auth/code \
  -H "Content-Type: application/json" \
  -d '{"email": "owner@example.com"}'

The agent asks the owner for the 6-digit code from that email (it never opens their mailbox unless they asked it to), then sends it with a name for its key:

curl -sS -X POST https://sharehtml.org/api/v1/auth/verify \
  -H "Content-Type: application/json" \
  -d '{"email": "owner@example.com", "code": "<the 6-digit code>", "keyName": "Claude 2026-11-17"}'

An account that exists gets its key at once, good for 30 days:

{
  "key": "shtml_...",
  "name": "Claude 2026-11-17",
  "scopes": ["pages:read", "pages:write"],
  "expiresAt": "2026-12-17T09:30:00.000Z"
}

A new email gets needsConsent, a signupToken good for 10 minutes, and links to the terms and the acceptable use policy. The agent shows the owner both and asks: "Do you accept the ShareHTML Terms and Acceptable Use Policy, and are you 18 or older?" Only after a clear yes does it send:

curl -sS -X POST https://sharehtml.org/api/v1/auth/sign-up \
  -H "Content-Type: application/json" \
  -d '{"signupToken": "<signupToken>", "acceptTerms": true, "adult": true, "keyName": "Claude 2026-11-17"}'

That makes the account and answers with the key. Throwaway email services are refused. If sign-in by API is busy, the agent signs in on the site with its browser instead and makes a key in the dashboard.

API keys

A key starts with shtml_, is shown once, and has the scope pages:read or pages:write. A key from sign-in by API has both and lasts 30 days; one made in the dashboard expires after 30, 90 or 365 days, or never. Keep it in an environment variable such as SHAREHTML_KEY, never in a page, a log or a repository, and revoke it in the dashboard when the work is done.

Publish

curl -sS -X POST https://sharehtml.org/api/v1/pages \
  -H "Authorization: Bearer $SHAREHTML_KEY" \
  -H "Content-Type: text/html; charset=utf-8" \
  --data-binary @report.html

The HTML can also be sent as a multipart field named file. The answer is JSON:

{
  "id": "5d0f6c1e-1f7a-4d0b-9a55-0b6f8e0c2a17",
  "url": "https://k3p9x2a.shrz.in/",
  "status": "reviewing"
}

url is the link to hand the user.

Check the status

  • reviewing: not live yet, usually for a few seconds. Ask again with GET /api/v1/pages/{id}.
  • live: share the url with the user.
  • held: not served. Tell the user the reasons exactly as given, and stop. The owner can ask for a review in the dashboard: the automatic review looks again within a minute or so, and a person looks only if it still holds the page.

Never change a held page and upload it again to get it through. Tell the owner the reasons exactly as given and let them decide.

Replace and keep the link

curl -sS -X PUT https://sharehtml.org/api/v1/pages/$PAGE_ID \
  -H "Authorization: Bearer $SHAREHTML_KEY" \
  -H "Content-Type: text/html; charset=utf-8" \
  --data-binary @report.html

Same link, new file; read its status as above. List pages with GET /api/v1/pages. Delete with DELETE /api/v1/pages/{id}; a deleted page's address is never reused.

Rules of the road

  • One HTML file per page. Inline CSS, JavaScript and images before uploading.
  • 5 MB per file, 25 pages and 5,000 views a month across them on the free plan; once the views are used, the pages answer 503 until the 1st. 60 requests a minute per key, 10 uploads a minute per account, and the daily limits.
  • Errors are {"error":{"code","message"}}. Match on code. Do not retry a 4xx; on 429 or 503, wait for Retry-After.
  • Pages are unlisted, not private. Do not upload secrets: anyone with the link can read the page.
  • Follow the terms and acceptable use policy. Print the URL to the user, and never the key.

AGENTS.md / CLAUDE.md snippet

## Publishing HTML for the user
- No key yet? Sign in by API with the user's email and the 6-digit code they read out: POST https://sharehtml.org/api/v1/auth/code, then /api/v1/auth/verify. Steps and rules: https://sharehtml.org/agents.md
- To give the user a link to an HTML file, POST it to https://sharehtml.org/api/v1/pages with Authorization: Bearer $SHAREHTML_KEY and Content-Type: text/html (curl --data-binary @file.html). The JSON response has "id", "url" and "status".
- status "reviewing": ask again with GET /api/v1/pages/{id} until it is "live", then tell the user the "url". status "held": tell the user the "reasons" exactly as given and stop; never change a held page to get it through.
- To update the same link, PUT the new file to https://sharehtml.org/api/v1/pages/{id}, then read its status as above.
- Pages are unlisted. Only when the user asks, on Pro, PATCH https://sharehtml.org/api/v1/pages/{id} with {"listed": true} lists one in search engines.
- When the user wants Pro, POST https://sharehtml.org/api/v1/billing/upgrade-link with the key and give them the "url": it opens Stripe's checkout for their account (7 days). Never pay for them.
- In Claude or ChatGPT with the ShareHTML connector (https://sharehtml.org/mcp), publish with its publish_page tool instead. With neither the connector nor web requests, give the user the whole HTML to paste at https://sharehtml.org with "Paste HTML instead".
- Limits: one HTML file per page, 5 MB on the free plan, 60 requests a minute per key, 10 uploads a minute per account. Errors are JSON {"error":{"code","message"}}; do not retry a 4xx, except 429: wait for Retry-After.
- Never paste the key into a page, a log or a repository. Rules and full steps: https://sharehtml.org/agents.md