Home / MCP / Upload File MCP Server

Upload File MCP Server

A Node-based MCP server that uploads files to a remote URL with configurable form fields and optional extra data.

javascript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "upload_file": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-upload-file@latest"
            ],
            "env": {
                "UPLOAD_URL": "YOUR_UPLOAD_URL",
                "FILE_KEY": "YOUR_FILE_KEY",
                "FILE_NAME": "OPTIONAL_FILENAME",
                "EXTRA_FORM": "{\"other_form_key\":\"other_form_value\"}"
            }
        }
    }
}

You can upload files to a remote destination using an MCP-based file upload service. This server is designed to trigger a dedicated uploader via MCP configuration, letting you specify where to send files, how the form data is named, and any extra fields you want to include. It’s useful when you want a standardized, configurable way to push files from your MCP ecosystem to a target server.

How to use

Set up your MCP environment with the upload-file MCP server as a stdio (local) runtime. You will run the uploader process with environment variables that control where the file goes, what the form field is named, and any extra data you want to attach.

How to install

Prerequisites you need before using this uploader are Node.js and npm (or npx). Install Node.js from the official site, which also installs npm.

Create a configuration file that defines the MCP server you want to use for the upload action. You can use a JSON file with the MCP server entry shown below.

{
  "mcpServers": {
    "upload-file": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-upload-file@latest"
      ],
      "env": {
        "UPLOAD_URL": "https://example.com/upload",
        "FILE_KEY": "file",
        "FILE_NAME": "myfile.txt",
        "EXTRA_FORM": "{\"other_form_key\":\"other_form_value\"}"
      }
    }
  }
}

Additional content

The uploader is configured to connect to a remote endpoint and submit a file along with a form field named as specified by FILE_KEY. You supply the destination URL, the file field name, the desired file name, and any extra JSON-formatted form data.

Example usage for testing the uploader standalone (with a test destination) is shown here. This runs the uploader directly with environment variables set, using npx to fetch the latest version.

UPLOAD_URL="https://example.com/upload" 
FILE_KEY="file" 
FILE_NAME="myfile.txt" 
EXTRA_FORM='{"other_form_key":"other_form_value"}' 

npx -y mcp-upload-file@latest

Configuration details and notes

In your MCP config, you define the upload-file server under mcpServers. The required environment variables are UPLOAD_URL and FILE_KEY, while FILE_NAME and EXTRA_FORM are optional.