Pages in MCP
Upload local files
media in posts_create takes public URLs. When the user has the file on their device, call media_upload_create and show the returned uploadPageUrl: an Ampost page where they upload up to 35 files in a browser. A client that supports URL elicitation (MCP revision 2026-07-28) opens that page for the user after asking them, and leaves uploadPageUrl out of the result. An agent that has the file and can make HTTP requests can instead PUT it to uploadUrl with the returned headers plus x-content-type. Both expire after 60 minutes.
Then call media_upload_status with the uploadId every 3–5 seconds. When it is completed, each item in files is a ready media item:
{
"id": "3c7e9a1b-5d2f-4e8a-9b6c-1f3d5a7e9c20",
"status": "completed",
"files": [
{
"url": "https://abc123.public.blob.vercel-storage.com/uploads/3c7e9a1b-5d2f-4e8a-9b6c-1f3d5a7e9c20/launch.mp4",
"type": "video",
"mimeType": "video/mp4",
"sizeBytes": 18350112,
"width": 1080,
"height": 1920,
"durationSeconds": 28
}
],
"createdAt": "2026-10-06T12:00:00.000Z",
"expiresAt": "2026-10-06T13:00:00.000Z",
"completedAt": "2026-10-06T12:03:41.000Z",
"error": null
}Pass those items to posts_create unchanged. Ampost checks each file's bytes and reads width, height and duration from them; images are re-saved without metadata (EXIF, GPS). On failed (a direct upload whose content is not the type it was sent as; the reason is in error) or expired, offer the user a new link.
The part of uploadPageUrl after # is a secret for this upload only. Files that no post uses are deleted 24 hours after the upload was created, by the hourly cleanup. Files Ampost stores or converts are at most 200 MB each: uploads, the URL media of a scheduled post (copied to Ampost storage when the post is created) and media it converts for a platform. A larger file goes only as a public URL in a post that is not scheduled and that the platform takes without conversion, up to the platform's own limit (media.maxVideoSizeBytes in GET /api/platforms, e.g. TikTok 4 GB, LinkedIn 500 MB, X 512 MB). At most 20 upload links accept files at once (RATE_LIMITED with Retry-After past that), and each of them holds 200 MB of the plan's media storage while it accepts files (QUOTA_EXCEEDED with details.quota storedMediaBytes when that does not fit).