Upload a file and get a URL from an MCP server

pail is an MCP server whose core tool does exactly this: your agent uploads a file, pail returns a public URL that renders it. One tool call in, one URL out. Works from Claude Code, Cursor, Codex CLI, Windsurf, Cline, or anything else that speaks MCP.

One tool call

The share tool takes a filename plus content — UTF-8 text directly, or base64 for binary files — and returns a Share with the URL:

# What the agent calls under the hood
result = upload_content(
    filename="report.html",
    text="<h1>Quarterly numbers</h1>...",
)
print(result["url"])  # https://pail.thalos.ai/aB3xQ9zKpL

In practice you never write that call — you prompt for it:

# In Claude Code (or any connected client):
share report.html as a pail link

What the URL serves

The URL is a rendered page, not a download prompt. Markdown becomes a readable article, notebooks render as notebooks, CSVs as tables, code with syntax highlighting, images inline. HTML files are sanitized (scripts and styles stripped) and rendered as a clean document — see Share HTML from Claude Code for that workflow end to end. Every page links to the raw bytes.

Folders too

upload_folder takes a tarball of a directory and serves the whole tree under one URL, with index.html served at the directory root and relative asset paths resolving normally — right for coverage reports, generated doc sites, and any multi-file output.

Who can see the URL

Shares are public-with-secret-id: the random ~10-character base62 id is the bearer, like an unlisted gist. On top of that you can set:

  • ttl_hours — the share expires on its own (free tier: up to 30 days)
  • access_token — viewers must present a token; the page gates on it
  • max_views — the share dies after N views
  • revoke_share — kill it immediately, any time

Add the MCP server

Sign in at pail.thalos.ai (free tier, no credit card), copy your API key, then add the server. For Claude Code:

claude mcp add --transport http pail https://pail.thalos.ai/mcp \
  --header "Authorization: Bearer $PAIL_API_KEY"

For any other MCP client, the generic HTTP config is:

{
  "mcpServers": {
    "pail": {
      "url": "https://pail.thalos.ai/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

Per-client walkthroughs: Claude Code, Cursor, Codex CLI, Windsurf, Cline.

Prefer plain HTTP?

The same API key works on the REST surface — one bearer-auth model for both:

curl -X POST https://pail.thalos.ai/api/shares/file \
  -H "Authorization: Bearer $PAIL_API_KEY" \
  -F "file=@report.html" \
  -F "ttl_hours=168"

Full REST reference at /api/docs.

Beyond uploads

share is one of ten tools — the others cover asking the user a question (ask), diff review (review), live status pages (status), diagrams, previews, and more. The docs index has the full catalog; pricing starts at a free tier of 30 actions/day and 5 GB of storage.