MCP server

LokalTransfer speaks the Model Context Protocol, so an AI assistant can send and manage transfers on your behalf. An agent can hand a client their files directly, on your own server, without a person driving a browser.

Connecting

Point your MCP client at /mcp and give it an API key:

{
  "mcpServers": {
    "lokaltransfer": {
      "url": "https://transfer.example.com/mcp",
      "headers": { "x-api-key": "your-api-key" }
    }
  }
}

There is nothing to switch on. The endpoint carries no authority of its own — every call needs a valid key, the same credential the REST API takes — so an instance that issues no keys exposes nothing.

The tools

ToolDoes
whoamiWhich account the key acts as, and whether it is read-only
listTransfersWhat the user sent, or what was sent to them
getTransferOne transfer in full, including its file list
listRecipientsTeam members, for resolving a name into an address
createTransferStart a draft — recipients, retention, password, layout
sendTransferDeliver it and return the download link
deleteTransferErase it — files and record, irreversibly

Uploading is deliberately not a tool

File bytes have no business inside a tool call. createTransfer returns the URL to POST them to, and the server's own instructions tell the agent how:

  1. createTransfer with the recipients, a subject and a retention.
  2. POST each file to /api/transfers/<id>/files as multipart form data, with the same x-api-key header.
  3. sendTransfer — this is what mails the recipients, starts the expiry clock and returns the link.

What an agent cannot do

The MCP surface is member-only and inherits every limit the key has:

  • A read-only key can call the read tools and nothing else.
  • No tool administers users.
  • Another account's transfer answers NOT_FOUND rather than FORBIDDEN, so ids cannot be probed for existence by watching which error comes back.
  • A recipient reading a transfer sent to them does not see who else received it.

deleteTransfer is marked destructive and erases the files for good. An agent should confirm with you before calling it, and a well-behaved client will ask.

Errors

Failures come back as CODE: message, where the code is one of UNAUTHORIZED, FORBIDDEN, NOT_FOUND, VALIDATION or INTERNAL — machine-readable, rather than prose an agent has to interpret.