All articles

How to let Claude publish files as links (MCP setup)

Sunny 7 min read

#ai#aiagents#publish#files#from

Let Claude publish files as links

q3-report.html Live
/p/q3-report

To let Claude publish files as links, connect it to the Link in Seconds MCP server. Create an API key in your dashboard, add the server at https://linkinseconds.com/api/mcp with an Authorization: Bearer header, and ask Claude to “publish this as a link”. It uploads the file and replies with a public URL that opens in any browser. The whole setup takes about two minutes and works in Claude Code, Cursor, VS Code and any other client that supports remote MCP servers.

This guide covers each client, what to ask, what you get back, the limits that apply and how to keep your key safe. If you are new to MCP itself, read what an MCP server is first. It takes five minutes.

Why let an AI assistant publish files?

AI assistants are good at making things: an HTML report, a landing page draft, a chart, a cleaned up CSV. The awkward part comes next. The file sits in a chat or on your disk, and you still have to upload it somewhere before anyone else can see it. With the MCP server connected, the assistant does that last step for you. You say “share it”, and you get a link you can paste into Slack or an email.

The person who opens the link needs no account and no app. HTML opens as a page, PDFs open in a viewer, images and video play in the browser. It is the same kind of link you get when you share an AI-built website from the upload page.

Step 1: create an API key

  1. Sign in and open API keys in your dashboard.
  2. Give the key a name you will recognise later, such as “Claude Code laptop”.
  3. Copy the key. It starts with lis_ and is shown only once. We store a SHA-256 hash of it, not the key itself, so we cannot show it to you again.

You can hold up to 5 keys at a time. One key per tool or machine is a good habit: if a laptop goes missing, you delete that one key and everything else keeps working. More detail is in Authentication and API keys.

Step 2: connect your client

The server speaks MCP over Streamable HTTP. Every client needs the same two things: the URL and the Authorization header. Replace lis_YOUR_KEY with your real key.

Claude Code

Run this once in your terminal:

Terminal
claude mcp add --transport http linkinseconds https://linkinseconds.com/api/mcp \
  --header "Authorization: Bearer lis_YOUR_KEY"

Start a new Claude Code session and run /mcp to check that linkinseconds is connected. Full steps are in Connect Claude Code.

Cursor

Add the server to ~/.cursor/mcp.json (for every project) or .cursor/mcp.json in one project:

~/.cursor/mcp.json
{
  "mcpServers": {
    "linkinseconds": {
      "url": "https://linkinseconds.com/api/mcp",
      "headers": { "Authorization": "Bearer lis_YOUR_KEY" }
    }
  }
}

Then check Cursor's MCP settings to see the four tools listed. See Connect Cursor.

VS Code

Create .vscode/mcp.json in your workspace. Note that VS Code uses servers rather than mcpServers, and wants a type:

.vscode/mcp.json
{
  "servers": {
    "linkinseconds": {
      "type": "http",
      "url": "https://linkinseconds.com/api/mcp",
      "headers": { "Authorization": "Bearer lis_YOUR_KEY" }
    }
  }
}

Open Copilot Chat in agent mode and the tools appear in the tools list. See Connect VS Code. If you commit this file, keep the key out of it and use an input or environment variable instead. Other clients are covered in Other MCP clients.

Step 3: ask in plain words

You do not need to name the tools. Prompts like these work:

  • “Turn this summary into a one page HTML report and publish it as a link.”
  • “Publish ./dist/report.pdf and give me the link.”
  • “Make a simple pricing page for my bakery and share it as a link I can text to my partner.”
  • “List my last 10 links and tell me which ones are still under review.”

Most clients ask you to approve a tool call the first time. That is a good moment to check the file name and content before anything goes public.

What you get back

When the upload works, the tool answers with one line:

Tool result
Published: https://linkinseconds.com/p/q3-summary-k2

The assistant passes that link on to you. Along with the text, the tool also returns structured data (the slug, title and URL) so the assistant can use it in a later step, for example to paste the link into a README.

Sometimes the reply adds a note. If our safety scan flags the file, the link exists but is held for review and goes live once it is cleared. Videos can show a short “still being scanned” note. In both cases the link itself does not change.

The four tools, briefly

  • upload_file publishes a file sent inline: text in content (HTML, Markdown, CSV, SVG, JSON) or base64 in content_base64 (PDF, images, ZIP). Up to 3 MB.
  • create_upload_url starts a bigger upload and returns a one-time URL, valid for 10 minutes. The assistant PUTs the bytes to it, usually with curl.
  • finish_upload checks and scans that file, then returns the public link.
  • list_links lists your links, newest first, with each one's status.

Inputs and outputs for each are in the MCP tools reference.

Limits

The MCP server is not a side door. Every upload runs through the same checks as the website, as the owner of the key, so your plan's limits apply:

LimitFreeProLifetime
Inline upload_file3 MB3 MB3 MB
Per file (create_upload_url)100 MB200 MB250 MB
Live links20 at a timeUnlimitedUnlimited
Uploads per hour with a key30Normal hourly capNormal hourly cap
Per-file and storage caps match the website. Full list: Plans and limits.

The inline cap exists because the file travels inside the request, and base64 adds about a third to its size. Anything bigger goes through create_upload_url, which sends the bytes straight to storage. See Plans and limits for storage totals and Pro features.

Safety: what to watch

  • Treat the key like a password. Anyone with it can publish files as you. Keep it out of public repos, screenshots and prompts you share.
  • Links are public. Anyone with the URL can open the file. Do not ask the assistant to publish anything you would not send by email. For sensitive files, add a password or expiry from the dashboard (a Pro feature).
  • Every file is scanned. Executables and scripts are refused outright, and other files go through the same safety scan as website uploads. See Safety, scanning and reporting.
  • Revoking is instant. Delete a key in the dashboard and the next request with it fails with a 401.
Prefer a script to an assistant? The same uploads work over plain HTTP. See how to upload a file by API for curl, Node and Python examples.

Common questions

Does this work in the Claude desktop app or claude.ai?

It works in any client that can connect to a remote MCP server over Streamable HTTP and send a custom Authorization header. Clients that only offer OAuth sign-in for remote servers will not work yet, because we use API keys, not OAuth.

Can the assistant delete or change my links?

No. The tools can publish new files and list existing ones. Editing, replacing and deleting stay in your dashboard.

Where do I see the links later?

In your dashboard, next to everything you uploaded by hand, with the same view counts and QR codes. You can also ask the assistant to run list_links.

Ready to set it up? Start with the MCP server docs, or browse more guides in AI agents and developers.

Turn any file into a link in seconds

Upload a PDF, image, video, or ZIP and get a clean, trackable link with a QR code, free.

Try Link in Seconds →