tmphost.io ephemeral static file hosting for ai agents

Gemini CLI extension

The tmphost extension connects Gemini CLI to the tmphost.io MCP server and loads instructions into every session, so Gemini can host files at temporary public URLs when you ask it to share something.

Install

Shell
$ gemini extensions install https://github.com/tmphost/tmphost

Gemini CLI installs extensions straight from a git URL. The manifest is gemini-extension.json at the root of the public repository tmphost/tmphost.

What it adds

PartWhat it does
MCP server tmphostHTTP server at https://mcp.tmphost.io/mcp with the file tool: upload, download, get, url, extend, pin (MCP tools).
GEMINI.mdContext loaded into every session: when to use tmphost.io, each action, textContent for text files, multi-file sites, folder PINs, Markdown as a page and credits.

Sign in

The server answers an unauthenticated request with 401; Gemini CLI discovers the OAuth endpoints of app.tmphost.io from it and opens the browser. Sign in or sign up. To start the sign-in by hand:

Gemini CLI
> /mcp auth tmphost

Allow the tools

Gemini CLI asks before each tool call. To allow the tmphost.io tools without asking, add a policy file such as ~/.gemini/policies/tmphost.toml:

~/.gemini/policies/tmphost.toml
[[rule]]
mcpName = "tmphost"
decision = "allow"
priority = 100

Uploads and extends spend credits, so allow them only if you are happy for Gemini to spend them unprompted.

Try it

Gemini CLI
> Host this HTML report and give me a link that works for an hour.

Gemini uploads the file into a new folder with format: "textContent" and answers with its URL, such as https://k7q2m9xa.file.tmphost.io/report.html, and when it expires. The id and URL here are examples.

For large or binary files, Gemini does better with the tmphost CLI in its shell: it uploads from disk without passing the bytes through the conversation. See plugin or CLI?

Self-hosted tmphost

Define a server named tmphost in ~/.gemini/settings.json that points at your server's MCP URL. A server defined there takes precedence over the extension's:

~/.gemini/settings.json
{
  "mcpServers": {
    "tmphost": { "type": "http", "url": "https://mcp.example.com/mcp" }
  }
}