> ## Documentation Index
> Fetch the complete documentation index at: https://00doc-web.vercel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Publishing a document

> Upload HTML from the dashboard or publish via MCP from Claude and Cursor.

# Publishing a document

You can publish to Unfurl in three ways. Pick the one that matches your workflow.

<Tabs>
  <Tab title="Dashboard upload">
    <Steps>
      <Step title="Open a document">
        Go to the [dashboard](https://unfurl.pub/dashboard), create a new document or open an existing one.
      </Step>

      <Step title="Drop your file">
        Drag an `.html` file onto the upload zone, or use the file picker.
      </Step>

      <Step title="Confirm">
        The preview updates and the share link reflects the new version.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Claude + MCP">
    Connect [MCP](/core-concepts/mcp-overview) with endpoint `https://mcp.unfurl.pub/mcp`, then ask in natural language:

    > "Publish this as an HTML report titled 'Weekly KPIs' to Unfurl"

    Claude calls `publish_document` with `title`, `html`, and optional `note`. You get back `document_id`, `version_id`, and `share_url`.
  </Tab>

  <Tab title="Cursor + MCP">
    Add the same MCP URL in Cursor settings, then prompt from the AI chat:

    > "Generate a one-page HTML spec for the billing API and publish it to Unfurl"

    Cursor invokes `publish_document` the same way Claude does.
  </Tab>
</Tabs>

## HTML quality

* Prefer **valid, complete documents** (`<!DOCTYPE html>`, semantic structure). The sanitizer strips risky markup; broken or empty pages are hard for readers and agents to use.
* **Inline CSS** or linked stylesheets you control work best for predictable rendering in the preview and on `/d/[token]`.
* **Test locally** in a browser before upload if you use heavy scripts — the public view runs in a sandboxed iframe with a tightened CSP.

<Tip>
  **Titles matter.** Use a specific title ("Q3 renewal — Contoso") instead of "Document 2". It shows in the dashboard, in history, and when agents fetch metadata.
</Tip>

## Prompts for AI-generated HTML

Give the model:

* **Audience** (executive, engineer, customer)
* **Structure** (sections, tables, callouts)
* **Output format:** "Return a single HTML file with embedded CSS"

Then ask it to publish via Unfurl so you do not paste multi-kilobyte HTML manually.

<CardGroup cols={2}>
  <Card title="Quickstart: Upload" icon="upload" href="/getting-started/quickstart-upload" />

  <Card title="publish_document" icon="code" href="/api-reference/publish-document" />
</CardGroup>
