Skip to content

Guide

How to publish a document to a share link from Claude Code

Claude Code just wrote you a report as a single HTML file. Instead of downloading it, uploading it somewhere and pasting a link by hand, connect scrolly's MCP server once and let the agent publish, protect and update the document from inside the conversation.

What you need

  • A scrolly account (the free plan is enough) and an API key from Settings.
  • Claude Code, or any MCP client that supports remote HTTP servers with a bearer token.

Connect the server

Claude Code adds a remote HTTP server with one command, in the form: claude mcp add --transport http scrolly https://app.scrolly.net/mcp --header "Authorization: Bearer YOUR_KEY". The Settings page in scrolly shows this exact command with your freshly created key filled in, so you can copy it rather than type it.

Scope matters because the key is a credential. The default local scope keeps the server configured for the current project only, on your machine. User scope makes it available in every project. Avoid project scope for a keyed server, since that writes a shared config file into version control. Check the result with claude mcp list, and remove it later with claude mcp remove scrolly.

The eight tools the agent can use

  • upload_document: send the HTML (inline in the call, or via a presigned upload) and register it as a document.
  • create_share_link: mint a link with an access mode (public, password, email verification, allowlist) and an optional expiry.
  • update_document: push new HTML to the same document, so every link you already sent serves the new version.
  • update_link: change a link's access mode, expiry or enabled state.
  • list_documents and list_links: see what exists.
  • revoke_link: kill a link.
  • get_link_analytics: opens, time spent and scroll depth for a link.

A working session

  1. "Publish report.html to scrolly as a password-protected link that expires in 14 days, password from the vault, and give me the link." The agent calls upload_document, then create_share_link, and returns the URL.
  2. "I fixed the chart. Update the published report." The agent calls update_document. The link you sent yesterday now serves today's file; the previous version is kept and can be restored from the dashboard.
  3. "Did anyone open it?" The agent calls get_link_analytics and reports opens, time spent and scroll depth.

What to keep in mind

The file must be self-contained HTML, under 25 MB on the free plan and 100 MB on Pro. The document is served to recipients from a separate sandbox origin under a strict content security policy, the same as an upload through the dashboard; the MCP route changes how the file gets in, not how it is served. Revoke the key in Settings if you ever paste it somewhere you should not have.

FAQ

Frequently asked questions

Does this work with clients other than Claude Code?
Any MCP client that speaks streamable HTTP and can send a bearer header works: Claude.ai, Codex, Cursor and n8n included. The command differs per client; the server and the key are the same.
Is the key safe in the command?
The key is a credential. Prefer the user or local scope so it stays in your own configuration, never commit a project-scope config that contains it, and revoke the key in Settings if it leaks.
What does the agent get back?
The tools return the document id and the live share URL, so the agent can paste the link into the conversation, a commit message or a Slack post in the same turn.