Back to files

API & MCP

Platphorm Files exposes the same storage to humans, scripts, and agents. Use the REST API from any language, or connect an MCP client to drive it from an AI assistant. Both surfaces are protected by your PLATPHORM_API_KEY.

Authentication

Send your key as a Bearer token (or the x-platphorm-key header). The browser UI uses an unlock cookie instead, so you never paste the key into the page.

curl
curl -s "https://files.platphormnews.com/api/v1/stats" \
  -H "Authorization: Bearer $PLATPHORM_API_KEY"

REST API

v1
GET/api/v1/list?prefix=docs/

List folders and files at a prefix. Omit prefix for the root.

GET/api/v1/list?search=report&prefix=docs/

Search files by substring on their path, optionally scoped to a prefix.

POST/api/v1/upload

Upload a file. Send multipart/form-data with `file` and optional `prefix`, or raw body with `?path=`.

POST/api/v1/folder

Create an empty folder. JSON body: { path: 'projects/alpha/' }.

POST/api/v1/move

Move or rename a file. JSON body: { from, to }.

DELETE/api/v1/delete?path=notes/todo.md

Delete a file. Use ?prefix= to recursively delete a folder.

GET/api/v1/stats

Totals: file count, folder count, and bytes stored.

GET/api/files/raw?path=img/logo.png

Stream raw file bytes. Append &download=1 to force download.

Upload a file

curl
curl -s -X POST "https://files.platphormnews.com/api/v1/upload" \
  -H "Authorization: Bearer $PLATPHORM_API_KEY" \
  -F "prefix=docs/2026/" \
  -F "file=@./report.pdf"

List & search (JSON via fetch)

javascript
const res = await fetch("https://files.platphormnews.com/api/v1/list?prefix=docs/", {
  headers: { Authorization: `Bearer ${process.env.PLATPHORM_API_KEY}` },
})
const { folders, files } = await res.json()

MCP Server

Connect any Model Context Protocol client (Claude Desktop, Cursor, the AI SDK, or your own agent) to the endpoint below. Tools are auth-gated with the same key.

MCP endpoint
https://files.platphormnews.com/api/mcp

Claude Desktop / Cursor config

mcp.json
{
  "mcpServers": {
    "platphorm-files": {
      "url": "https://files.platphormnews.com/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_PLATPHORM_API_KEY"
      }
    }
  }
}

Available tools

list_files

List folders and files at a prefix.

search_files

Search all files by substring on their path.

read_file

Read a text file's contents as a string.

write_file

Create or overwrite a text file.

create_folder

Create an empty folder.

delete_file

Delete a single file.

delete_folder

Recursively delete a folder.

move_file

Move or rename a file.

storage_stats

Get store totals and a sample of paths.