MCP tools
The MCP server at https://mcp.tmphost.io/mcp has one tool per operation: uploadFile, downloadFile, listFiles, getUrl, extendFolder and addPinToFolder. Each takes the folder as folderId.
LLM-friendly version (Markdown): https://tmphost.io/docs/mcp.md
Every byte of a file passes through the model's context as a tool argument or result. If the agent can run shell commands, the CLI uploads from disk instead and keeps large files out of the context. Use MCP when there is no shell, or for small files the agent has just written.
For text files (.html, .css, .js, .md, .json, .svg, .txt) set format to textContent and send the text as is. It is a third smaller than base64 and stays readable. Use base64Content only for binary files.
Connect
The server speaks streamable HTTP and is stateless: it offers the tools below and the tmphost skill, and sends no notifications. Add it to any MCP client; clients that support OAuth open the browser to sign in through app.tmphost.io the first time they connect.
Opened in a browser, https://mcp.tmphost.io/mcp shows a setup page with the URL and the tools. Its manifest, the MCP Registry server.json named io.github.tmphost/tmphost, is at https://mcp.tmphost.io/.well-known/mcp.json and https://tmphost.io/.well-known/mcp.json.
{
"mcpServers": {
"tmphost": {
"type": "http",
"url": "https://mcp.tmphost.io/mcp"
}
}
}
$ claude mcp add --transport http tmphost https://mcp.tmphost.io/mcp
Tools
Each tool takes only its own arguments and returns its own fields as structured content, described by an output schema; empty fields are left out. The read-only tools are annotated as such, so clients can run them without asking.
| Tool | What it does | Kind |
|---|---|---|
| uploadFile | Stores a file in a new folder, or in an existing one with folderId, and returns its URL. | Writes, spends credits |
| downloadFile | Reads a file back as base64Content or textContent, free of credits. | Read-only |
| listFiles | Lists a folder's files with their URLs, and the folder's URL and expiry. | Read-only |
| getUrl | Builds the URL of a folder, directory or file without uploading; with pin, a link that carries the PIN. | Read-only |
| extendFolder | Makes a folder expire later. | Writes, spends credits |
| addPinToFolder | Gives a folder a new 6 digit PIN that visitors must enter. | Writes |
The ids, times, PINs and URLs in the examples below are examples; take the real ones from each result.
uploadFile
Stores one file and returns its public URL. Without folderId it creates a new folder; with it, the file goes into that folder, and a file already at the same path is replaced in place.
| Argument | Description |
|---|---|
| folderId | Folder to add the file to or replace it in. Leave out to create a new folder. |
| fileName | Required. File name, without directories, such as index.html. |
| path | Directory inside the folder, such as site/css, at most 5 levels. Empty for the folder root. |
| format | Which field carries the content: base64Content (default) or textContent. |
| textContent | UTF-8 text content, as is, with format: "textContent". |
| base64Content | Base64 content, with format: "base64Content" or no format. |
| ttl | New folder only: its lifetime in whole minutes, such as 30m or 2h (default 30m). |
| pin | New folder only: true gives it a 6 digit PIN visitors must enter (folder PIN). |
| Result field | Description |
|---|---|
| folderId | The folder id, new or as passed in. Pass it to add more files or to the other tools. |
| url | Public URL of the file, working until the folder expires. Give it to the user. |
| fileName, path, size | The file's name, directory and size in bytes. |
| creditsSpent | Credits the upload cost: 1 per started MB of the file per started 30 minutes of the folder's remaining lifetime. |
| expiresAt | Only when this call created the folder: when it is deleted, RFC 3339 in UTC. For an existing folder, listFiles or getUrl return it. |
| pinMode | Only when this call created the folder and a PIN guards it: folder for its own PIN, static or totp for the owner's account PIN. |
| pin | The folder's own PIN, only from the call that made it. Give it to the user with the URL: it can't be read back later. |
Upload an HTML page as text, in a new folder
{
"ttl": "2h",
"fileName": "index.html",
"format": "textContent",
"textContent": "<!doctype html><title>Report</title><link rel=\"stylesheet\" href=\"css/style.css\"><h1>Q3 report</h1>"
}
{
"folderId": "k7q2m9xa",
"url": "https://k7q2m9xa.file.tmphost.io/index.html",
"fileName": "index.html",
"path": "",
"size": 98,
"creditsSpent": 4,
"expiresAt": "2026-10-25T23:08:00Z"
}
A file under 1 MB in a 2 hour folder costs 1 × 4 = 4 credits. Because index.html is at the root, the folder URL https://k7q2m9xa.file.tmphost.io/ serves the page too.
Add a stylesheet to the same folder, in a directory
{
"folderId": "k7q2m9xa",
"path": "css",
"fileName": "style.css",
"format": "textContent",
"textContent": "body{font:16px/1.5 system-ui;margin:40px}"
}
{
"folderId": "k7q2m9xa",
"url": "https://k7q2m9xa.file.tmphost.io/css/style.css",
"fileName": "style.css",
"path": "css",
"size": 41,
"creditsSpent": 4
}
With folderId, leave out ttl and pin: the folder keeps its expiry, and the cost counts its remaining lifetime. Use extendFolder or addPinToFolder to change them.
Upload an image as base64
{
"folderId": "k7q2m9xa",
"path": "img",
"fileName": "logo.png",
"base64Content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
}
{
"folderId": "k7q2m9xa",
"url": "https://k7q2m9xa.file.tmphost.io/img/logo.png",
"fileName": "logo.png",
"path": "img",
"size": 70,
"creditsSpent": 4
}
format defaults to base64Content, so it can be left out here.
Replace a file in place
Upload to the same folderId, path and fileName again. The URL stays https://k7q2m9xa.file.tmphost.io/index.html, so a link already shared shows the new version.
{
"folderId": "k7q2m9xa",
"fileName": "index.html",
"format": "textContent",
"textContent": "<!doctype html><title>Report</title><link rel=\"stylesheet\" href=\"css/style.css\"><h1>Q3 report (final)</h1>"
}
downloadFile
Reads back a file in one of your folders, such as to check an upload or to edit a page and upload it again. It costs no credits and changes nothing. To share a file, give its url instead.
| Argument | Description |
|---|---|
| folderId | Required. The folder id, as uploadFile returned it, such as k7q2m9xa. |
| fileName | Required. File name, without directories, as listFiles returns it. |
| path | Directory inside the folder that holds the file, as listFiles returns it. Leave out for the folder root. |
| format | Which field gets the content: base64Content (default) or textContent. |
The result has folderId, fileName, path, size in bytes and the content in the field format named (an empty string for an empty file).
{ "folderId": "k7q2m9xa", "path": "css", "fileName": "style.css", "format": "textContent" }
{
"folderId": "k7q2m9xa",
"fileName": "style.css",
"path": "css",
"size": 41,
"textContent": "body{font:16px/1.5 system-ui;margin:40px}"
}
A download as textContent fails for a file that is not UTF-8 text; download it with format: "base64Content" instead.
listFiles
Lists the files in one of your folders. It takes only folderId, and returns the folder's url, expiresAt, pinMode when a PIN guards it, and files, sorted by full path (an empty array for an empty folder): each with fileName, path, size, url and agent, what last wrote it (the OAuth client's name, or Web for the web app). Pass a file's fileName and path to downloadFile or getUrl.
{ "folderId": "k7q2m9xa" }
{
"folderId": "k7q2m9xa",
"url": "https://k7q2m9xa.file.tmphost.io/",
"expiresAt": "2026-10-25T23:08:00Z",
"files": [
{ "fileName": "style.css", "path": "css", "size": 41, "url": "https://k7q2m9xa.file.tmphost.io/css/style.css", "agent": "Claude Code" },
{ "fileName": "logo.png", "path": "img", "size": 70, "url": "https://k7q2m9xa.file.tmphost.io/img/logo.png", "agent": "Claude Code" },
{ "fileName": "index.html", "path": "", "size": 106, "url": "https://k7q2m9xa.file.tmphost.io/index.html", "agent": "Claude Code" }
]
}
getUrl
Builds the URL of a folder (folderId), a directory (folderId, path, ending with /) or a file (folderId, fileName, optional path) without uploading anything. It doesn't check that the directory or file exists: use listFiles for that.
| Argument | Description |
|---|---|
| folderId | Required. The folder id, as uploadFile returned it. |
| path | Directory inside the folder to link to, or that holds fileName. Leave out for the folder root. |
| fileName | File name. Leave out for the URL of the folder or of path. |
| pin | The folder's PIN, as uploadFile or addPinToFolder returned it. The URL then carries it as ?pin=, so visitors skip the PIN page. Only for pinMode folder or static. |
The result has folderId, url (a folder or directory URL ends with /), expiresAt, when the link stops working, fileName and path when set, and pinMode when a PIN guards the folder.
{ "folderId": "k7q2m9xa", "path": "img", "fileName": "logo.png" }
{
"folderId": "k7q2m9xa",
"url": "https://k7q2m9xa.file.tmphost.io/img/logo.png",
"expiresAt": "2026-10-25T23:08:00Z",
"fileName": "logo.png",
"path": "img"
}
The server keeps only a hash of a PIN, so it can't add one to a URL by itself, and it doesn't check the pin you pass: pass the right one to get a link that opens without asking. It works for a folder PIN or a static account PIN, not for authenticator codes, which expire within a minute.
{ "folderId": "k7q2m9xa", "pin": "590274" }
{
"folderId": "k7q2m9xa",
"url": "https://k7q2m9xa.file.tmphost.io/?pin=590274",
"expiresAt": "2026-10-25T23:08:00Z",
"pinMode": "folder"
}
extendFolder
Makes a folder expire later. folderId and extendBy, the time to add in whole minutes such as 1h or 90m, are both required. The remaining lifetime can't go past the max TTL. It costs, for each file in the folder, 1 credit per started MB per started 30 minutes of the added time; an empty folder is free. Without enough credits it fails and adds no time.
The result has folderId, the folder's url (unchanged), its new expiresAt and creditsSpent (0 for an empty folder).
{ "folderId": "k7q2m9xa", "extendBy": "1h" }
{
"folderId": "k7q2m9xa",
"url": "https://k7q2m9xa.file.tmphost.io/",
"expiresAt": "2026-10-26T00:08:00Z",
"creditsSpent": 6
}
Three files under 1 MB for one more hour cost 3 × 1 × 2 = 6 credits. Keep the 30 minute default on upload and extend while the folder is still in use: an expired folder can't be brought back.
addPinToFolder
Gives a folder a new random 6 digit PIN that visitors must enter, and replaces its old one: any older PIN stops working. It takes only folderId. The result has folderId, url (unchanged), expiresAt (unchanged), pinMode (always folder) and pin, shown only this once: give it to the user, or pass it to getUrl. It fails while the owner's account PIN guards every folder. See folder PIN.
{ "folderId": "k7q2m9xa" }
{
"folderId": "k7q2m9xa",
"url": "https://k7q2m9xa.file.tmphost.io/",
"expiresAt": "2026-10-25T23:08:00Z",
"pinMode": "folder",
"pin": "590274"
}
The tmphost skill
The server also serves the tmphost Agent Skill: best practices for these tools, such as what not to upload, text versus base64, sharing a site or several files, updating files in place, PINs, Markdown as a page, what to reply and credits. Clients that support the MCP Skills extension (io.modelcontextprotocol/skills) find it with skills/list; any client can read it as a resource.
| Request | What it returns |
|---|---|
| skills/list, skills/get | The skill's URI, its frontmatter (name, description) and its files with their size and SHA-256 digest. |
| resources/read | skill://tmphost/SKILL.md, the skill itself, as Markdown. |
| resources/directory/read | The files in a skill directory, such as skill://tmphost (no trailing slash). |
The server's instructions tell agents to load it before a multi-file site, a PIN-guarded folder or an update to shared files. The plugins ship the same skill.
Errors
A failed call returns an error message that says what to change:
| Message | Fix |
|---|---|
| textContent needs format textContent | Add "format": "textContent", or send base64Content. |
| base64Content needs format base64Content | Leave out "format": "textContent", or send the text as textContent. |
| base64Content must be base64 | Send standard base64, or the text itself as textContent. |
| ttl and pin only apply to a new folder: leave out folderId, or use extendFolder or addPinToFolder | A folder's expiry and PIN are set when it is created; change them with the other tools. |
| ttl must be whole minutes, such as 30m or 2h | Use a duration like 45m or 6h. The same goes for extendBy. |
| extendBy is required: the time to add, such as 1h | Pass extendBy to extendFolder. |
| folderId must be a folder id | Pass the folderId from an earlier result, such as k7q2m9xa. |
| fileName is required and must not contain / | Put directories in path. |
| the file is not UTF-8 text: download it with format base64Content | Use base64Content for binary files. |
| no PIN guards the folder: leave out pin | getUrl only takes pin for a PIN-guarded folder. |
| an authenticator code expires within a minute: leave out pin and let visitors enter a current code | Under an authenticator (totp) account PIN, share the plain URL. |
| the account pin guards this folder | addPinToFolder doesn't apply while the account PIN is on: the folder is already guarded. |