Using slim.to with Claude
Two ways to let Claude create slim.to links from the artifacts and files it produces: the MCP server (best — native tools) or the REST API (no setup beyond an API key).
Prerequisite for both: a personal API key.
Approach 1 — MCP server
Claude Code (CLI)
One command:
claude mcp add slimto \
--env SLIMTO_API_KEY=slim_your_key_here \
-- uvx --from /path/to/slimto/mcp slimto-mcp
Then in any session:
You: Write up the Q3 numbers as a PDF and give me a slim.to link for it.
Claude: (writes the PDF, calls
create_link_from_file) Done — https://slim.to/4h7bqn. I can check who's opened it whenever you ask.
Scope the server to one project with claude mcp add --scope project …
(writes .mcp.json in the repo) or make it available everywhere with
--scope user.
Claude Desktop
Add the server to claude_desktop_config.json
(Settings → Developer → Edit Config):
{
"mcpServers": {
"slimto": {
"command": "uvx",
"args": ["--from", "/path/to/slimto/mcp", "slimto-mcp"],
"env": {
"SLIMTO_API_KEY": "slim_your_key_here"
}
}
}
}
Restart Claude Desktop; the slimto tools appear under the tools icon. Because the server runs on your machine, Claude Desktop can upload any local file it can see — including files it just created.
claude.ai (web) / mobile — hosted connector
slim.to ships a hosted remote MCP server, so no install is needed:
- On claude.ai: Settings → Connectors → Add custom connector.
- Enter the URL
https://slim.to/mcp. - Claude opens the slim.to sign-in/consent page — click Authorize.
That's it. Claude on web and mobile can now shorten URLs, publish the HTML
pages it writes as tracked links (create_link_from_content), update an
already-shared link in place (replace_link_content — same URL, analytics
intact), delete links, list your links, and answer "did anyone open it?" from
your analytics. Revoke access anytime from Dashboard → Settings → Connected
apps.
Large files. Content sent inline has to be generated token-by-token by Claude, which is slow for big files and can be cut short by tool-call size limits. slim.to handles this three ways:
source_url— slim.to downloads the content itself. By far the fastest path, but the URL must be publicly readable; slim.to fetches it as an anonymous visitor, so private links won't work.- Chunked upload (
start_content_upload) — for content Claude is writing itself. This guarantees the file arrives whole; it does not make it quicker, since Claude still has to write every byte. sha256/expected_bytes— an integrity check, so a truncated upload is rejected instead of published broken. Only pass values computed with a code tool; a guessed digest will always fail the check.
Note the remote server's upload tool takes content rather than a file path (hosted Claude has no access to your disk) — for uploading arbitrary local files, Claude Desktop/Code with the local server is the better fit.
Approach 2 — REST API (no MCP)
Claude Code can drive the API with plain curl — handy when you don't want to
install anything. Put the key in your shell env (~/.zshrc):
export SLIMTO_API_KEY=slim_your_key_here
Then ask Claude Code:
Upload
./report.pdfto slim.to and give me the short link. UsePOST https://slim.to/api/v1/fileswith theX-API-Keyheader from$SLIMTO_API_KEY, sending the file as multipart fieldfile.
Or teach it once by adding a note to your project's CLAUDE.md:
## Sharing deliverables
When I ask for a shareable link for a file, upload it to slim.to:
`curl -s -X POST https://slim.to/api/v1/files -H "X-API-Key: $SLIMTO_API_KEY" -F "file=@<path>" -F "title=<title>"`
and give me the `link.short_url` from the response.
The full endpoint reference is in the API quickstart.
Which approach?
| Local MCP (stdio) | Hosted MCP connector | REST | |
|---|---|---|---|
| Setup | one-time config | paste a URL, click Authorize | just an env var |
| Claude discovers tools by itself | ✅ | ✅ | needs prompting / CLAUDE.md |
| Works on claude.ai web + mobile | ❌ | ✅ | ❌ (no shell) |
| Upload arbitrary local files | ✅ file path | content only | ✅ |
| Analytics queries ("who opened it?") | ✅ | ✅ | manual curl |
Use MCP where you can; REST is the universal fallback.