temp-file-share-mcp

tflink-tmpfile/temp-file-share-mcp

3.2

If you are the rightful owner of temp-file-share-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Model Context Protocol (MCP) server facilitates the uploading of local files to tmpfile.link, providing shareable download URLs without the need for dedicated storage solutions.

Tools
1
Resources
0
Prompts
0

temp-file-share-mcp

Model Context Protocol (MCP) server that uploads local files to tfLink and returns shareable download URLs. The server exposes a single tool, upload_file_to_get_temp_share_link, which can be used by MCP-compatible assistants or automation environments to share artifacts without provisioning storage.

Features

  • tfLink client with filename sanitisation, file size limits, and optional authenticated uploads.
  • MCP tool arguments align with the tmpfile.link upload API (filePath plus optional userId/authToken).
  • Minimal stdio transport flow that works entirely on the local machine.
  • Configuration via environment variables with sensible defaults (see below).
  • Comprehensive Jest tests and an ESLint flat config.

Installation

npm install
npm run build

Running the Server

  • npx (recommended):
    npx -y temp-file-share-mcp@latest
    
  • From source:
    npm run start
    

The CLI prints a ready-to-use Cherry Studio configuration. Because the server runs locally in stdio mode, clients can safely reference files using absolute paths.

Sample configuration emitted on startup:

{
  "mcpServers": {
    "temp-file-share-mcp": {
      "type": "stdio",
      "name": "temp-file-share-mcp",
      "description": "Upload a local file to tmpfile.link and return a temporary download URL.",
      "command": "npx",
      "args": ["-y", "temp-file-share-mcp@latest"],
      "env": {
        "TFLINK_USER_ID": "<configured via environment>",
        "TFLINK_AUTH_TOKEN": "<configured via environment>"
      }
    }
  }
}

The tool response includes both the structured metadata above and a plain-text success message containing the download URL plus the encoded variant, making it easy to copy and share.

A manifest example for stdio transport lives in examples/temp-file-share-mcp.manifest.json.

Example Prompt

Please use mcp tool to upload `/Users/chris/Downloads/xx.log` and get a temporary download link.

Environment Configuration

VariablePurpose
TFLINK_BASE_URLOverride tfLink endpoint (defaults to https://tmpfile.link).
TFLINK_MAX_FILE_SIZE_MBMaximum upload size guardrail (defaults to 100).
TFLINK_USER_ID, TFLINK_AUTH_TOKENOptional credentials; set these in your shell or MCP client env block to enable authenticated uploads.

Development

  • Lint: npm run lint
  • Tests: npm test
  • TypeScript build: npm run build

Official Homepage

Learn more about the project and release updates at tmpfile.link/temp-file-share-mcp.

npm Package

Install from npm: temp-file-share-mcp.

GitHub Repository

Browse the code and report issues at github.com/tflink-tmpfile/temp-file-share-mcp.

Testing Notes

Critical paths (configuration, tfLink client, and tool wiring) are unit-tested with Jest. Live tfLink integration is intentionally out of scope to avoid leaking credentials; add such checks behind a guarded LIVE_TFLINK_TEST=1 when required.

License

ISC