---
title: "Files and transfers"
url: https://docs.corefinity.com/mcp/files-and-transfers
type: page
last_updated: 2026-11-13
feature: mcp
---
# Files and transfers

Read and write a site's files, and move archives and database dumps in and out through signed URLs.

Small files travel inside a tool call. Archives and database dumps travel through a transfer: a signed URL the assistant uploads to or downloads from with `curl`.

| Job                        | Tool                                 | Scope   | Size                                |
| -------------------------- | ------------------------------------ | ------- | ----------------------------------- |
| Read a file                | `corestack_file_read`                | `read`  | 128 KiB a call; page with `offset`  |
| Write a file               | `corestack_file_write`               | `exec`  | 1 MiB                               |
| Upload an archive or dump  | `corestack_transfer_upload_create`   | `write` | 100 GiB                             |
| Unpack an uploaded archive | `corestack_files_sync`               | `write` | 2,000,000 entries, 200 GiB unpacked |
| Import an uploaded dump    | `corestack_db_import`                | `exec`  |                                     |
| Download site files        | `corestack_transfer_download_create` | `read`  |                                     |
| Export the database        | `corestack_db_export`                | `exec`  |                                     |

Paths are relative to the site root. A path that resolves outside it is refused with `path_outside_site`.

## Upload

1. **Open an upload**

   Call `corestack_transfer_upload_create` with `filename` and `size_bytes`. It answers a `transfer_id` and a `url`, shown only once.

2. **Send the file**

   ```bash
   curl --fail -X PUT --upload-file site.tar.zst 'UPLOAD_URL'
   ```

3. **Use it**

   Pass the `transfer_id` to `corestack_files_sync` (tar, tar.gz, tar.zst or zip) or `corestack_db_import` (plain, gzip or zstd SQL).

A file sync never overwrites the platform's own configuration files, such as `wp-config.php` and `.env`. A database import takes a safety backup first, always on production.

## Download

1. **Pack or export**

   Call `corestack_transfer_download_create` for files, or `corestack_db_export` for the database. Each answers the download when it is ready within the call, and a task otherwise: see [Long-running tasks](/mcp/long-running-tasks).

2. **Fetch it**

   The result carries a `download_url`. `corestack_transfer_get` answers a fresh one.

   ```bash
   curl --fail -C - -o site.tar.zst 'DOWNLOAD_URL'
   ```

## Lifetimes and quotas

| Rule                                | Value                  |
| ----------------------------------- | ---------------------- |
| Download URL                        | 1 hour                 |
| Uploaded or packed file             | Deleted after 24 hours |
| Live transfers per environment      | 20                     |
| Live transfer size per organisation | 500 GiB                |

## Files the Control Panel builds

Log exports and invoice PDFs arrive as Control Panel links. Open them in a browser where you are signed in.
